From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Date: Tue, 15 May 2018 18:32:43 +0200 Subject: [U-Boot] [PATCH v4 26/32] tpm: add the possibility to reset the chip with a gpio In-Reply-To: References: <20180515095728.16572-1-miquel.raynal@bootlin.com> <20180515095728.16572-27-miquel.raynal@bootlin.com> Message-ID: <20180515183243.674e80d1@xps13> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Simon, Tom, On Wed, 16 May 2018 02:05:01 +1000, Simon Glass wrote: > On 15 May 2018 at 19:57, Miquel Raynal wrote: > > On some designs, the reset line could not be connected to the SoC reset > > line, in this case, request the GPIO and ensure the chip gets reset. > > > > Signed-off-by: Miquel Raynal > > --- > > drivers/tpm/tpm2_tis_spi.c | 17 +++++++++++++++++ > > 1 file changed, 17 insertions(+) =20 >=20 > Reviewed-by: Simon Glass >=20 > Question below >=20 > > > > diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c > > index 6a4d5284c9..1c7f8f3673 100644 > > --- a/drivers/tpm/tpm2_tis_spi.c > > +++ b/drivers/tpm/tpm2_tis_spi.c > > @@ -24,6 +24,9 @@ > > #include > > #include > > #include > > +#ifdef CONFIG_DM_GPIO > > +#include > > +#endif > > > > #include "tpm_tis.h" > > #include "tpm_internal.h" > > @@ -574,6 +577,20 @@ static int tpm_tis_spi_probe(struct udevice *dev) > > struct tpm_chip_priv *priv =3D dev_get_uclass_priv(dev); > > struct tpm_chip *chip =3D dev_get_priv(dev); > > int ret; > > +#ifdef CONFIG_DM_GPIO =20 >=20 > Can this use if (IS_ENABLED(CONFIG_DM_GPIO)) ? >=20 > It helps to improve build coverage. >=20 Sure! Tom, I guess the series needs the following changes: - update the old license identifiers - two occurrences of "#ifdef CONFIG_DM_GPIO" in this patch to be replaced by "#if (IS_ENABLED(CONFIG_DM_GPIO))" I can either repost a new iteration of the whole series/just this patch or let you make the changes. Let me know what is best for you. Thanks you very much, both of you, for your guidance. Regards, Miqu=C3=A8l --=20 Miquel Raynal, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com