[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-integrity
Subject: Re: [PATCH v5 4/4] tpm: tpm_tis_spi: Support cr50 devices
From: Jarkko Sakkinen <jarkko.sakkinen () linux ! intel ! com>
Date: 2019-08-29 18:04:51
Message-ID: 20190829180451.4lfj76tucxcoyik3 () linux ! intel ! com
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic