[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190829180451.4lfj76tucxcoyik3@linux.intel.com>
Date: Thu, 29 Aug 2019 21:04:51 +0300
From: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To: Stephen Boyd <swboyd@...omium.org>
Cc: Peter Huewe <peterhuewe@....de>, linux-kernel@...r.kernel.org,
linux-integrity@...r.kernel.org,
Andrey Pronin <apronin@...omium.org>,
Duncan Laurie <dlaurie@...omium.org>,
Jason Gunthorpe <jgg@...pe.ca>, Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Guenter Roeck <groeck@...omium.org>,
Alexander Steffen <Alexander.Steffen@...ineon.com>,
Heiko Stuebner <heiko@...ech.de>
Subject: Re: [PATCH v5 4/4] tpm: tpm_tis_spi: Support cr50 devices
On Thu, Aug 29, 2019 at 09:48:50AM -0700, Stephen Boyd wrote:
> > > +int tpm_tis_spi_resume(struct device *dev)
> > > +{
> > > + struct tpm_chip *chip = dev_get_drvdata(dev);
> > > + struct tpm_tis_data *data = dev_get_drvdata(&chip->dev);
> > > + struct tpm_tis_spi_phy *phy = to_tpm_tis_spi_phy(data);
> > > + struct cr50_spi_phy *cr50_phy;
> > > +
> > > + if (phy->is_cr50) {
> > > + cr50_phy = to_cr50_spi_phy(phy);
> > > + /*
> > > + * Jiffies not increased during suspend, so we need to reset
> > > + * the time to wake Cr50 after resume.
> > > + */
> > > + cr50_phy->wake_after = jiffies;
> > > + }
> >
> > To simplify the code I would just put also wake_after to
> > tpm_tis_spi_phy.
>
> Ok. But keep the other members in cr50_spi_phy as they are?
Yes, just want to get rid of that boolean and branching since the
operations done have insignificant cost.
/Jarkko
Powered by blists - more mailing lists