On Fri, Mar 03, 2017 at 05:09:59PM +0100, Enric Balletbo i Serra wrote:
> From: Sonny Rao <sonny...@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 <sonny...@chromium.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balle...@collabora.com>

Reviewed-by: Jason Gunthorpe <jguntho...@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

Reply via email to