tpmc: add 'tpmversion' command

Add command for printing TPM version: 1.2 or 2.0. The command works
even when trunksd/tcsd is running and /dev/tpm0 is busy, so it can
be used to first determine which TPM we are dealing with, and then
select the right name of the daemon to stop based on that.

TEST=run 'tpmc tpmver'

Change-Id: Ib8db81ff2af6dc6b0d5aecf30e2688a908b5c3d3
Commit-Ready: Andrey Pronin <>
Tested-by: Andrey Pronin <>
Reviewed-by: Vadim Bendebury <>
1 file changed