[U-Boot] [PATCH v2 03/19] tpm: add support for TPMv2 SPI modules
Miquel Raynal
miquel.raynal at bootlin.com
Tue Apr 24 13:02:30 UTC 2018
Hi Simon,
On Fri, 30 Mar 2018 06:41:52 +0800, Simon Glass <sjg at chromium.org>
wrote:
> Hi Miquel,
>
> On 29 March 2018 at 15:43, Miquel Raynal <miquel.raynal at bootlin.com> wrote:
> > Add the tpm_tis_spi driver that should support any TPMv2 compliant (SPI)
> > module.
> >
> > Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
> > ---
> > drivers/tpm/Kconfig | 9 +
> > drivers/tpm/Makefile | 1 +
> > drivers/tpm/tpm_tis.h | 3 +
> > drivers/tpm/tpm_tis_spi.c | 656 ++++++++++++++++++++++++++++++++++++++++++++++
> > 4 files changed, 669 insertions(+)
> > create mode 100644 drivers/tpm/tpm_tis_spi.c
>
> I think this came up in another context. Would it make sense to create
> a common interface to i2c and SPI and then have a common driver?
I hesitated to do it (even started to write down some common code), and
finally there was not so much of it, I was not sure if it would bring
something more than obfuscation so I chose not to add an extra layer as
I had currently only one SPI chip and no I2C chip to check the
architecture. Maybe the question should be asked again when someone
will want I2C support.
Regards,
Miquèl
More information about the U-Boot
mailing list