Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752492AbdCATjq (ORCPT ); Wed, 1 Mar 2017 14:39:46 -0500 Received: from quartz.orcorp.ca ([184.70.90.242]:42170 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751009AbdCATjl (ORCPT ); Wed, 1 Mar 2017 14:39:41 -0500 Date: Wed, 1 Mar 2017 11:43:33 -0700 From: Jason Gunthorpe To: Mark Rutland Cc: Enric Balletbo i Serra , linux-kernel@vger.kernel.org, Rob Herring , tpmdd-devel@lists.sourceforge.net, Sonny Rao Subject: Re: [tpmdd-devel] [PATCH] tpm: do not suspend/resume if power stays on Message-ID: <20170301184333.GA12197@obsidianresearch.com> References: <20170301115116.19696-1-enric.balletbo@collabora.com> <20170301135429.GF28874@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170301135429.GF28874@leverpostej> User-Agent: Mutt/1.5.24 (2015-08-30) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.156 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 696 Lines: 18 > > +Optional properties: > > +- powered-while-suspended: present when the TPM is left powered on between > > + suspend and resume (makes the suspend/resume callbacks do nothing). > > This reads like configuration rather than a HW property. I read this to mean the HW does not cut power to the TPM when Linux does 'suspend'. We recently added global suspend/resume callbacks to the TPM core. Those call backs do not power off the TPM, they just prepare its internal state to loose power to the chip. Skipping that process on hardware that does not power-off the TPM makes sense to me. But, Sonny, perhaps this should be a global flag in tpm_chip, not a per-interface-driver override? Jason