From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [RFC 2/2] regulator: qcom-rpm: Implement RPM assisted disable Date: Tue, 11 Nov 2014 11:59:59 +0000 Message-ID: <20141111115959.GY24004@x1> References: <1415659966-16200-1-git-send-email-bjorn.andersson@sonymobile.com> <1415659966-16200-3-git-send-email-bjorn.andersson@sonymobile.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-ig0-f169.google.com ([209.85.213.169]:33613 "EHLO mail-ig0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751313AbaKKMAG (ORCPT ); Tue, 11 Nov 2014 07:00:06 -0500 Received: by mail-ig0-f169.google.com with SMTP id hn18so942166igb.4 for ; Tue, 11 Nov 2014 04:00:05 -0800 (PST) Content-Disposition: inline In-Reply-To: <1415659966-16200-3-git-send-email-bjorn.andersson@sonymobile.com> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Bjorn Andersson Cc: Stephen Boyd , David Collins , Lina Iyer , Mark Brown , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org On Mon, 10 Nov 2014, Bjorn Andersson wrote: > Some regulators are used to power e.g. PLLs that clocks the core we'r= e > running on, so we can't turn them off directly; but we do want them o= ff > when the core is powered down. To handle this the Qualcomm SoC provid= es > a means to specify a "sleep state" for RPM resources that can be > triggered by the hardware when the cores are brought down. >=20 > Resources of this type should be considered always-on while the CPU(s= ) > are running and we can utilize the "sleep state" functionality to def= er > disabling them until the CPU(s) go to sleep, if not used by other > peripherals at that time. >=20 > Other properties are kept in sync between the states, so that if the > CPU(s) go to sleep with a particular regulator still enabled there wi= ll > be no change. >=20 > Signed-off-by: Bjorn Andersson > --- > Documentation/devicetree/bindings/mfd/qcom-rpm.txt | 28 ++++++++ Please place this into a seperate patch. See: Documentation/devicetree/bindings/submitting-patches.txt > drivers/regulator/qcom_rpm-regulator.c | 68 ++++++++++= +++++----- > 2 files changed, 79 insertions(+), 17 deletions(-) >=20 > diff --git a/Documentation/devicetree/bindings/mfd/qcom-rpm.txt b/Doc= umentation/devicetree/bindings/mfd/qcom-rpm.txt > index 4264021..4671eef 100644 > --- a/Documentation/devicetree/bindings/mfd/qcom-rpm.txt > +++ b/Documentation/devicetree/bindings/mfd/qcom-rpm.txt > @@ -112,6 +112,13 @@ of valid subnodes that can operate on these reso= urces. > Definition: select that the power supply should operate in hysteret= ic > mode, instead of the default pwm mode > =20 > +- qcom,rpm-assisted-disable: > + Usage: optional > + Value type: > + Definition: select that the regulator is supplying the active CPU(s= ) > + and can only be disabled with the assistans from the RPM > + after going to sleep > + This requires a DT Ack. > Standard regulator bindings are used inside switch mode power supply= subnodes. > Check Documentation/devicetree/bindings/regulator/regulator.txt for = more > details. > @@ -160,6 +167,13 @@ details. > qcom,rpm-pm8921-nldo, > qcom,rpm-pm8921-nldo1200 > =20 > +- qcom,rpm-assisted-disable: > + Usage: optional > + Value type: > + Definition: select that the regulator is supplying the active CPU(s= ) > + and can only be disabled with the assistans from the RPM > + after going to sleep > + Eh? I think I'm seeing double. > Standard regulator bindings are used inside switch low-dropout regul= ator > subnodes. Check Documentation/devicetree/bindings/regulator/regulat= or.txt for > more details. > @@ -190,6 +204,13 @@ more details. > 2740000, 2400000, 2130000, 1920000, 1750000, 1600000, > 1480000, 1370000, 1280000, 1200000 > =20 > +- qcom,rpm-assisted-disable: > + Usage: optional > + Value type: > + Definition: select that the regulator is supplying the active CPU(s= ) > + and can only be disabled with the assistans from the RPM > + after going to sleep > + Triple? > Standard regulator bindings are used inside negative charge pump reg= ulator > subnodes. Check Documentation/devicetree/bindings/regulator/regulat= or.txt for > more details. > @@ -215,6 +236,13 @@ more details. > QCOM_RPM_PM8921_LVS1 - QCOM_RPM_PM8921_LVS7, > QCOM_RPM_PM8921_MVS > =20 > +- qcom,rpm-assisted-disable: > + Usage: optional > + Value type: > + Definition: select that the regulator is supplying the active CPU(s= ) > + and can only be disabled with the assistans from the RPM > + after going to sleep > + There must be a better way to document this. > =3D EXAMPLE > =20 > #include [...] --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 From: lee.jones@linaro.org (Lee Jones) Date: Tue, 11 Nov 2014 11:59:59 +0000 Subject: [RFC 2/2] regulator: qcom-rpm: Implement RPM assisted disable In-Reply-To: <1415659966-16200-3-git-send-email-bjorn.andersson@sonymobile.com> References: <1415659966-16200-1-git-send-email-bjorn.andersson@sonymobile.com> <1415659966-16200-3-git-send-email-bjorn.andersson@sonymobile.com> Message-ID: <20141111115959.GY24004@x1> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, 10 Nov 2014, Bjorn Andersson wrote: > Some regulators are used to power e.g. PLLs that clocks the core we're > running on, so we can't turn them off directly; but we do want them off > when the core is powered down. To handle this the Qualcomm SoC provides > a means to specify a "sleep state" for RPM resources that can be > triggered by the hardware when the cores are brought down. > > Resources of this type should be considered always-on while the CPU(s) > are running and we can utilize the "sleep state" functionality to defer > disabling them until the CPU(s) go to sleep, if not used by other > peripherals at that time. > > Other properties are kept in sync between the states, so that if the > CPU(s) go to sleep with a particular regulator still enabled there will > be no change. > > Signed-off-by: Bjorn Andersson > --- > Documentation/devicetree/bindings/mfd/qcom-rpm.txt | 28 ++++++++ Please place this into a seperate patch. See: Documentation/devicetree/bindings/submitting-patches.txt > drivers/regulator/qcom_rpm-regulator.c | 68 +++++++++++++++----- > 2 files changed, 79 insertions(+), 17 deletions(-) > > diff --git a/Documentation/devicetree/bindings/mfd/qcom-rpm.txt b/Documentation/devicetree/bindings/mfd/qcom-rpm.txt > index 4264021..4671eef 100644 > --- a/Documentation/devicetree/bindings/mfd/qcom-rpm.txt > +++ b/Documentation/devicetree/bindings/mfd/qcom-rpm.txt > @@ -112,6 +112,13 @@ of valid subnodes that can operate on these resources. > Definition: select that the power supply should operate in hysteretic > mode, instead of the default pwm mode > > +- qcom,rpm-assisted-disable: > + Usage: optional > + Value type: > + Definition: select that the regulator is supplying the active CPU(s) > + and can only be disabled with the assistans from the RPM > + after going to sleep > + This requires a DT Ack. > Standard regulator bindings are used inside switch mode power supply subnodes. > Check Documentation/devicetree/bindings/regulator/regulator.txt for more > details. > @@ -160,6 +167,13 @@ details. > qcom,rpm-pm8921-nldo, > qcom,rpm-pm8921-nldo1200 > > +- qcom,rpm-assisted-disable: > + Usage: optional > + Value type: > + Definition: select that the regulator is supplying the active CPU(s) > + and can only be disabled with the assistans from the RPM > + after going to sleep > + Eh? I think I'm seeing double. > Standard regulator bindings are used inside switch low-dropout regulator > subnodes. Check Documentation/devicetree/bindings/regulator/regulator.txt for > more details. > @@ -190,6 +204,13 @@ more details. > 2740000, 2400000, 2130000, 1920000, 1750000, 1600000, > 1480000, 1370000, 1280000, 1200000 > > +- qcom,rpm-assisted-disable: > + Usage: optional > + Value type: > + Definition: select that the regulator is supplying the active CPU(s) > + and can only be disabled with the assistans from the RPM > + after going to sleep > + Triple? > Standard regulator bindings are used inside negative charge pump regulator > subnodes. Check Documentation/devicetree/bindings/regulator/regulator.txt for > more details. > @@ -215,6 +236,13 @@ more details. > QCOM_RPM_PM8921_LVS1 - QCOM_RPM_PM8921_LVS7, > QCOM_RPM_PM8921_MVS > > +- qcom,rpm-assisted-disable: > + Usage: optional > + Value type: > + Definition: select that the regulator is supplying the active CPU(s) > + and can only be disabled with the assistans from the RPM > + after going to sleep > + There must be a better way to document this. > = EXAMPLE > > #include [...] -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog