Am Montag, 23. September 2013, 20:14:37 schrieb Jason Gunthorpe:

> The version of the TPM should not depend on the bus it is connected

> through. 1.1, 1.2 and soon 2.0 TPMS will be all be able to use the

> same bus interfaces.

>

> Make tpm_show_caps try the 1.2 capability first. If that fails then

> fall back to the 1.1 capability. This effectively auto-detects what

> interface the TPM supports at run-time.

>

> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>

> ---

> drivers/char/tpm/tpm.c | 56

> +++++++++++++++---------------------- drivers/char/tpm/tpm.h

> | 2 --

> drivers/char/tpm/tpm_i2c_atmel.c | 2 +-

> drivers/char/tpm/tpm_i2c_infineon.c | 2 +-

> drivers/char/tpm/tpm_i2c_nuvoton.c | 2 +-

> drivers/char/tpm/tpm_i2c_stm_st33.c | 2 +-

> drivers/char/tpm/tpm_ibmvtpm.c | 2 +-

> drivers/char/tpm/tpm_spi_stm_st33.c | 2 +-

> drivers/char/tpm/tpm_tis.c | 2 +-

> 9 files changed, 30 insertions(+), 42 deletions(-)

>

Good idea -

We definitely have to revise the tpm_tis driver for 2.0 soon...

 

 

Except for the tpm_spi_stm_st33, tpm_i2c_nuvoton and tpm_i2c_atmel

 

Reviewed-by: Peter Huewe <peterhuewe@gmx.de>

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>

 

Staged here
https://github.com/PeterHuewe/linux-tpmdd for-james

 

 

Since the tpm_spi_stm_st33, tpm_i2c_nuvoton and tpm_i2c_atmel drivers are not yet merged and were heavily improved by you anyway, please include this improvement directly in the new drivers.

 

(However, for reviewing purposes I do like it as an improvement patch)

 

Thanks,

Peter