Re: [PATCH] tpm: Add sysfs interface to show TPM family version

From: Jarkko Sakkinen
Date: Mon Mar 13 2017 - 14:36:10 EST


On Mon, Mar 13, 2017 at 10:55:47AM -0600, Jason Gunthorpe wrote:
> On Mon, Mar 13, 2017 at 04:59:58PM +0200, Jarkko Sakkinen wrote:
> > if (chip->flags & TPM_CHIP_FLAG_TPM2)
> > ret = sprintf(buf, "TPM 2.0");
> > else
> > ret = sprintf(buf, "TPM 1.x");
>
> And 1.x should be 1.2 or 1.1
>
> Jason

Or maybe just create a patch that adds "family_major", which prints
1 or 2.

That is sufficient to pick the right daemon in the user space for
example.

/Jarkko