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.

BUG=none
BRANCH=none
TEST=run 'tpmc tpmver'

Change-Id: Ib8db81ff2af6dc6b0d5aecf30e2688a908b5c3d3
Reviewed-on: https://chromium-review.googlesource.com/410703
Commit-Ready: Andrey Pronin <apronin@chromium.org>
Tested-by: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
1 file changed