lkml.org 
[lkml]   [2019]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2019-08-29 20:05    [W:0.049 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site