Messages in this thread | | | Date | Fri, 3 Mar 2017 10:11:07 -0700 | From | Jason Gunthorpe <> | Subject | Re: [PATCH v3] tpm: do not suspend/resume if power stays on |
| |
On Fri, Mar 03, 2017 at 05:09:59PM +0100, Enric Balletbo i Serra wrote: > From: Sonny Rao <sonnyrao@chromium.org> > > The suspend/resume behavior of the TPM can be controlled by setting > "powered-while-suspended" in the DTS. This is useful for the cases > when hardware does not power-off the TPM. > > Signed-off-by: Sonny Rao <sonnyrao@chromium.org> > Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> +++ b/drivers/char/tpm/tpm_of.c > @@ -34,6 +34,9 @@ int tpm_read_log_of(struct tpm_chip *chip) > else > return -ENODEV; > > + if (of_property_read_bool(np, "powered-while-suspended")) > + chip->flags |= TPM_CHIP_FLAG_ALWAYS_POWERED; > +
It is really weird that this is in a function called tpm_read_log_of, but it makes sense to use the existing conditional infrastructure for OF as well.
We should try to tidy this later...
Jason
| |