lkml.org 
[lkml]   [2019]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/4] tpm: Add a flag to indicate TPM power is managed by firmware
From
Date
Quoting Jarkko Sakkinen (2019-08-09 11:02:01)
> On Tue, 2019-08-06 at 15:07 -0700, Stephen Boyd wrote:
> > On some platforms, the TPM power is managed by firmware and therefore we
> > don't need to stop the TPM on suspend when going to a light version of
> > suspend such as S0ix ("freeze" suspend state). Add a chip flag to
> > indicate this so that certain platforms can probe for the usage of this
> > light suspend and avoid touching the TPM state across suspend/resume.
>
> The commit message should mention the new constant.

Alright.

>
> > + if (chip->flags & TPM_CHIP_FLAG_FIRMWARE_POWER_MANAGED)
> > + if (!pm_suspend_via_firmware())
>
> Why both checks are needed?
>
> If both checks are needed, you could write it as a single
> conditional statement:
>
> if (chip->flags & TPM_CHIP_FLAG_FIRMWARE_POWER_MANAGED &&
> !pm_suspend_via_firmware())
>

Ok. I'll combine them.

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