Re: [PATCH v4 3/6] tpm: tpm_tis_spi: Add a pre-transfer callback

2019-08-21 Thread Stephen Boyd
Quoting Jarkko Sakkinen (2019-08-21 12:11:31) > On Mon, Aug 19, 2019 at 10:07:41AM -0700, Stephen Boyd wrote: > > Any name is fine for me. Any suggestions? > > What if just add @ready to struct tpm_tis_spi_phy add drop this patch > altogether? > > It is only used only by CR50 but I think it is

Re: [PATCH v4 3/6] tpm: tpm_tis_spi: Add a pre-transfer callback

2019-08-21 Thread Jarkko Sakkinen
On Mon, Aug 19, 2019 at 10:07:41AM -0700, Stephen Boyd wrote: > Any name is fine for me. Any suggestions? What if just add @ready to struct tpm_tis_spi_phy add drop this patch altogether? It is only used only by CR50 but I think it is less of an overkill than adding a callback. /Jarkko

Re: [PATCH v4 3/6] tpm: tpm_tis_spi: Add a pre-transfer callback

2019-08-19 Thread Stephen Boyd
Quoting Jarkko Sakkinen (2019-08-19 09:35:05) > On Mon, Aug 12, 2019 at 03:36:19PM -0700, Stephen Boyd wrote: > > Cr50 firmware has a requirement to wait for the TPM to wakeup before > > sending commands over the SPI bus. Otherwise, the firmware could be in > > deep sleep and not respond. Add a

Re: [PATCH v4 3/6] tpm: tpm_tis_spi: Add a pre-transfer callback

2019-08-19 Thread Jarkko Sakkinen
On Mon, Aug 12, 2019 at 03:36:19PM -0700, Stephen Boyd wrote: > Cr50 firmware has a requirement to wait for the TPM to wakeup before > sending commands over the SPI bus. Otherwise, the firmware could be in > deep sleep and not respond. Add a hook to tpm_tis_spi_transfer() before > we start a SPI

[PATCH v4 3/6] tpm: tpm_tis_spi: Add a pre-transfer callback

2019-08-12 Thread Stephen Boyd
Cr50 firmware has a requirement to wait for the TPM to wakeup before sending commands over the SPI bus. Otherwise, the firmware could be in deep sleep and not respond. Add a hook to tpm_tis_spi_transfer() before we start a SPI transfer so we can keep track of the last time the TPM driver accessed