Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752555AbeAESxc (ORCPT + 1 other); Fri, 5 Jan 2018 13:53:32 -0500 Received: from mail-ot0-f196.google.com ([74.125.82.196]:42558 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752136AbeAESxa (ORCPT ); Fri, 5 Jan 2018 13:53:30 -0500 X-Google-Smtp-Source: ACJfBossPJ4p2qjXtUQ1MS5oCGgRItPQe8NN0yA2diSiuZVktbJMgvjioyL97jdXAs3kwSf06pShYg== Date: Fri, 5 Jan 2018 12:53:28 -0600 From: Rob Herring To: Chunyan Zhang Cc: Mark Brown , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Ulf Hansson , Chunyan Zhang Subject: Re: [PATCH V2 1/5] bindings: regulator: added support for suspend states Message-ID: <20180105185328.zmt33idv2cqled62@rob-hp-laptop> References: <1515050568-23876-1-git-send-email-zhang.chunyan@linaro.org> <1515050568-23876-2-git-send-email-zhang.chunyan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515050568-23876-2-git-send-email-zhang.chunyan@linaro.org> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 04, 2018 at 03:22:44PM +0800, Chunyan Zhang wrote: > Some systems need to set regulators to specific states when they enter > low power modes, especially around CPUs. There are many of these modes > depending on the particular runtime state. > > Currently the regulator consumers are not granted permission to change > suspend state of regulator devices, the constraints are configured at > startup. In order to allow changes in a vlotage range, we need to add > new properties for voltage range and a flag to give permission to > change the suspend voltage and suspend on/off in suspend mode. > > Signed-off-by: Chunyan Zhang > --- > Documentation/devicetree/bindings/regulator/regulator.txt | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt > index 378f6dc..532e286 100644 > --- a/Documentation/devicetree/bindings/regulator/regulator.txt > +++ b/Documentation/devicetree/bindings/regulator/regulator.txt > @@ -42,8 +42,19 @@ Optional properties: > - regulator-state-[mem/disk] node has following common properties: > - regulator-on-in-suspend: regulator should be on in suspend state. > - regulator-off-in-suspend: regulator should be off in suspend state. > - - regulator-suspend-microvolt: regulator should be set to this voltage > - in suspend. > + - regulator-suspend-min-microvolt: minimum voltage may be set in > + suspend state. > + - regulator-suspend-max-microvolt: maximum voltage may be set in > + suspend state. > + - regulator-suspend-microvolt: the default voltage which regulator > + would be set in suspend. The voltage for suspend also can be > + adjusted among {regulator-suspend-min-microvolt, > + regulator-suspend-max-microvolt} by calling > + regulator_set_suspend_voltage(). This property is not deprecated, You mean "is deprecated", right? > + setting voltage for suspend mode via API the regulator driver > + provides is recommended. > + - regulator-changeable-in-suspend: whether the default voltage and > + the regulator on/off in suspend can be changed in runtime. Is this not implied by having the constraints? Or the driver should know this. The simply means you have some 2nd bank of registers for settings while in suspend mode, right? > - regulator-mode: operating mode in the given suspend state. > The set of possible operating modes depends on the capabilities of > every hardware so the valid modes are documented on each regulator > -- > 2.7.4 >