Re: [U-Boot] [PATCH v2 03/19] tpm: add support for TPMv2 SPI modules

2018-04-24 Thread Miquel Raynal
Hi Simon,

On Fri, 30 Mar 2018 06:41:52 +0800, Simon Glass 
wrote:

> Hi Miquel,
> 
> On 29 March 2018 at 15:43, Miquel Raynal  wrote:
> > Add the tpm_tis_spi driver that should support any TPMv2 compliant (SPI)
> > module.
> >
> > Signed-off-by: Miquel Raynal 
> > ---
> >  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

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 03/19] tpm: add support for TPMv2 SPI modules

2018-03-29 Thread Simon Glass
Hi Miquel,

On 29 March 2018 at 15:43, Miquel Raynal  wrote:
> Add the tpm_tis_spi driver that should support any TPMv2 compliant (SPI)
> module.
>
> Signed-off-by: Miquel Raynal 
> ---
>  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?

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot