All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
To: Javier Martinez Canillas <javier@dowhile0.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>,
	David Collins <collinsd@codeaurora.org>,
	Lina Iyer <lina.iyer@linaro.org>, Mark Brown <broonie@kernel.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	Lee Jones <lee.jones@linaro.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC 2/2] regulator: qcom-rpm: Implement RPM assisted disable
Date: Tue, 11 Nov 2014 11:23:10 -0800	[thread overview]
Message-ID: <20141111192309.GH16980@sonymobile.com> (raw)
In-Reply-To: <CABxcv=nGyV2F9kYALOhTzmUfO8CC6NEwv4v3SPmrum-bBi-eDw@mail.gmail.com>

On Tue 11 Nov 06:21 PST 2014, Javier Martinez Canillas wrote:

> Hello Bjorn,
> 

Hi Javier,

> On Mon, Nov 10, 2014 at 11:52 PM, Bjorn Andersson
> <bjorn.andersson@sonymobile.com> 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.
> >
> 
> The regulator core already has support to control the state of
> regulators when the system enters into a sleep state. Now the generic
> regulator DT binding has also been extended to support defining if a
> regulator should be "regulator-{on,off}-in-suspend". Please take a
> look at the topic/suspend branch [0] in the regulator tree that has
> the latest binding.
> 

I was planning to utilize the suspend states functionality in the core and was
looking at implementing [0] myself, so glad that's coming in place.

However, as a practical example we have LDO12 on the MSM8974 SoC that is used
for powering CPU PLLs, WiFi/BT PLLs, display, camera sensor and hdmi.

In a phone it's most reasonable to expect the WiFi core keeping a vote for the
regulators to be enabled during a suspend, but if you're in airplane mode (or
WiFi is turned off) you want to save the power - so it's not possible to
configure this statically.

Further more, the CPU vote is not tied to suspend state but rather cpuidle
state. It's not unreasonable to think of a state where we're clocking out
pixels to the display in Android with the CPU turned off and hence the CPU PLL
vote lifted.

> If that is not enough for your hardware and use case, I've been
> working on adding initial and suspend mode for regulators. The latest
> series is [1] and the needed bits for the max77802 regulator driver is
> [2].
> 

Looks good.

> It's always better to use existing functionality if possible, instead
> of adding custom per driver DT bindings. So it would be great if you
> can take a look to the mentioned patches.
> 

I totally agree, but due to the dynamic nature described above I have a hard
time figuring out how to make it fit; hence this RFC.

> >  Documentation/devicetree/bindings/mfd/qcom-rpm.txt |   28 ++++++++
> >  drivers/regulator/qcom_rpm-regulator.c             |   68 +++++++++++++++-----
> 
> Against which tree this patch has been developed? afaict
> Documentation/devicetree/bindings/mfd/qcom-rpm.txt does not exist even
> in the latest for-next [3] branch of the mfd tree.
> 

v3.18-rc1 + https://lkml.org/lkml/2014/9/22/731

As I tried to explain in the cover letter, the DT bindings that I change here
are not acked and this RFC is an attempt to come to a conclusion in how to
design the sleep state part - which will change the bindings.

> >
> >         #include <dt-bindings/mfd/qcom-rpm.h>
> 
> This file doesn't exit either and the regulator driver depends on
> MFD_QCOM_RPM which also is not present in mainline.
> 
> By looking at the mail archives I see that you posted both the
> regulator and mfd driver in the same series [4] but only the regulator
> driver was picked by Mark so I guess Lee has to pick the mfd driver in
> order to allow the regulator driver to be built.
> 

Correct, I hope that after sorting the sleep state part out we can get some
acks on things.

Thanks for your review!

Regards,
Bjorn

WARNING: multiple messages have this Message-ID (diff)
From: bjorn.andersson@sonymobile.com (Bjorn Andersson)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 2/2] regulator: qcom-rpm: Implement RPM assisted disable
Date: Tue, 11 Nov 2014 11:23:10 -0800	[thread overview]
Message-ID: <20141111192309.GH16980@sonymobile.com> (raw)
In-Reply-To: <CABxcv=nGyV2F9kYALOhTzmUfO8CC6NEwv4v3SPmrum-bBi-eDw@mail.gmail.com>

On Tue 11 Nov 06:21 PST 2014, Javier Martinez Canillas wrote:

> Hello Bjorn,
> 

Hi Javier,

> On Mon, Nov 10, 2014 at 11:52 PM, Bjorn Andersson
> <bjorn.andersson@sonymobile.com> 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.
> >
> 
> The regulator core already has support to control the state of
> regulators when the system enters into a sleep state. Now the generic
> regulator DT binding has also been extended to support defining if a
> regulator should be "regulator-{on,off}-in-suspend". Please take a
> look at the topic/suspend branch [0] in the regulator tree that has
> the latest binding.
> 

I was planning to utilize the suspend states functionality in the core and was
looking at implementing [0] myself, so glad that's coming in place.

However, as a practical example we have LDO12 on the MSM8974 SoC that is used
for powering CPU PLLs, WiFi/BT PLLs, display, camera sensor and hdmi.

In a phone it's most reasonable to expect the WiFi core keeping a vote for the
regulators to be enabled during a suspend, but if you're in airplane mode (or
WiFi is turned off) you want to save the power - so it's not possible to
configure this statically.

Further more, the CPU vote is not tied to suspend state but rather cpuidle
state. It's not unreasonable to think of a state where we're clocking out
pixels to the display in Android with the CPU turned off and hence the CPU PLL
vote lifted.

> If that is not enough for your hardware and use case, I've been
> working on adding initial and suspend mode for regulators. The latest
> series is [1] and the needed bits for the max77802 regulator driver is
> [2].
> 

Looks good.

> It's always better to use existing functionality if possible, instead
> of adding custom per driver DT bindings. So it would be great if you
> can take a look to the mentioned patches.
> 

I totally agree, but due to the dynamic nature described above I have a hard
time figuring out how to make it fit; hence this RFC.

> >  Documentation/devicetree/bindings/mfd/qcom-rpm.txt |   28 ++++++++
> >  drivers/regulator/qcom_rpm-regulator.c             |   68 +++++++++++++++-----
> 
> Against which tree this patch has been developed? afaict
> Documentation/devicetree/bindings/mfd/qcom-rpm.txt does not exist even
> in the latest for-next [3] branch of the mfd tree.
> 

v3.18-rc1 + https://lkml.org/lkml/2014/9/22/731

As I tried to explain in the cover letter, the DT bindings that I change here
are not acked and this RFC is an attempt to come to a conclusion in how to
design the sleep state part - which will change the bindings.

> >
> >         #include <dt-bindings/mfd/qcom-rpm.h>
> 
> This file doesn't exit either and the regulator driver depends on
> MFD_QCOM_RPM which also is not present in mainline.
> 
> By looking at the mail archives I see that you posted both the
> regulator and mfd driver in the same series [4] but only the regulator
> driver was picked by Mark so I guess Lee has to pick the mfd driver in
> order to allow the regulator driver to be built.
> 

Correct, I hope that after sorting the sleep state part out we can get some
acks on things.

Thanks for your review!

Regards,
Bjorn

  reply	other threads:[~2014-11-11 19:22 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10 22:52 [RFC 0/2] Qualcomm RPM sleep states Bjorn Andersson
2014-11-10 22:52 ` Bjorn Andersson
2014-11-10 22:52 ` [RFC 1/2] mfd: qcom-rpm: Expose sleep state resources to clients Bjorn Andersson
2014-11-10 22:52   ` Bjorn Andersson
2014-11-11 12:04   ` Lee Jones
2014-11-11 12:04     ` Lee Jones
2014-11-11 18:33     ` Bjorn Andersson
2014-11-11 18:33       ` Bjorn Andersson
2014-11-12  9:52       ` Lee Jones
2014-11-12  9:52         ` Lee Jones
2014-11-12 14:45         ` Lina Iyer
2014-11-12 14:45           ` Lina Iyer
2014-11-12 19:23           ` Bjorn Andersson
2014-11-12 19:23             ` Bjorn Andersson
2014-11-19 18:06             ` Lina Iyer
2014-11-19 18:06               ` Lina Iyer
2014-11-12 19:55         ` Bjorn Andersson
2014-11-12 19:55           ` Bjorn Andersson
2014-11-10 22:52 ` [RFC 2/2] regulator: qcom-rpm: Implement RPM assisted disable Bjorn Andersson
2014-11-10 22:52   ` Bjorn Andersson
2014-11-11  9:11   ` Andreas Färber
2014-11-11  9:11     ` Andreas Färber
2014-11-11 18:34     ` Bjorn Andersson
2014-11-11 18:34       ` Bjorn Andersson
2014-11-11 11:59   ` Lee Jones
2014-11-11 11:59     ` Lee Jones
2014-11-11 18:39     ` Bjorn Andersson
2014-11-11 18:39       ` Bjorn Andersson
2014-11-11 14:21   ` Javier Martinez Canillas
2014-11-11 14:21     ` Javier Martinez Canillas
2014-11-11 19:23     ` Bjorn Andersson [this message]
2014-11-11 19:23       ` Bjorn Andersson
2014-11-21 23:10 ` [RFC 0/2] Qualcomm RPM sleep states Stephen Boyd
2014-11-21 23:10   ` Stephen Boyd
2014-11-21 23:27   ` Mark Brown
2014-11-21 23:27     ` Mark Brown
2014-11-21 23:43     ` Stephen Boyd
2014-11-21 23:43       ` Stephen Boyd
2014-11-21 23:54       ` Mark Brown
2014-11-21 23:54         ` Mark Brown
2014-11-22  0:03         ` Stephen Boyd
2014-11-22  0:03           ` Stephen Boyd
2014-11-22  0:16         ` Bjorn Andersson
2014-11-22  0:16           ` Bjorn Andersson
2014-11-24 18:16       ` Mark Brown
2014-11-24 18:16         ` Mark Brown
2014-11-24 21:19         ` Stephen Boyd
2014-11-24 21:19           ` Stephen Boyd
2014-11-25 20:44           ` Mark Brown
2014-11-25 20:44             ` Mark Brown
2014-11-26  1:02             ` Stephen Boyd
2014-11-26  1:02               ` Stephen Boyd
2014-11-26 13:40               ` Mark Brown
2014-11-26 13:40                 ` Mark Brown
2014-11-27  1:51                 ` Stephen Boyd
2014-11-27  1:51                   ` Stephen Boyd
2014-11-27 18:56                   ` Mark Brown
2014-11-27 18:56                     ` Mark Brown
2014-11-26 23:34             ` Bjorn Andersson
2014-11-26 23:34               ` Bjorn Andersson
2014-11-27 19:02               ` Mark Brown
2014-11-27 19:02                 ` Mark Brown
2014-11-27 19:42                 ` Bjorn Andersson
2014-11-27 19:42                   ` Bjorn Andersson
2014-11-28 20:16                   ` Mark Brown
2014-11-28 20:16                     ` Mark Brown
2014-12-04 21:15                     ` Stephen Boyd
2014-12-04 21:15                       ` Stephen Boyd
2014-12-08 18:06                       ` Bjorn Andersson
2014-12-08 18:06                         ` Bjorn Andersson
2014-12-08 19:39                         ` Mark Brown
2014-12-08 19:39                           ` Mark Brown
2014-12-08 20:55                           ` Bjorn Andersson
2014-12-08 20:55                             ` Bjorn Andersson
2014-12-09 18:16                             ` Mark Brown
2014-12-09 18:16                               ` Mark Brown
2014-12-09 19:25                               ` Bjorn Andersson
2014-12-09 19:25                                 ` Bjorn Andersson
2014-12-09 20:28                                 ` Mark Brown
2014-12-09 20:28                                   ` Mark Brown
2014-12-11 22:36                                   ` Bjorn Andersson
2014-12-11 22:36                                     ` Bjorn Andersson
2014-12-15 18:04                                     ` Mark Brown
2014-12-15 18:04                                       ` Mark Brown
2014-12-16  6:05                                       ` Bjorn Andersson
2014-12-16  6:05                                         ` Bjorn Andersson
2014-12-26 17:09                                         ` Mark Brown
2014-12-26 17:09                                           ` Mark Brown
2014-12-29 21:54                                           ` Bjorn Andersson
2014-12-29 21:54                                             ` Bjorn Andersson
2014-12-30 16:43                                             ` Mark Brown
2014-12-30 16:43                                               ` Mark Brown
2014-11-24 17:02   ` Bjorn Andersson
2014-11-24 17:02     ` Bjorn Andersson
2014-11-24 21:19     ` Stephen Boyd
2014-11-24 21:19       ` Stephen Boyd
2014-11-24 21:59       ` Bjorn Andersson
2014-11-24 21:59         ` Bjorn Andersson
2014-11-25  0:02         ` Stephen Boyd
2014-11-25  0:02           ` Stephen Boyd
2014-11-26 22:49           ` Bjorn Andersson
2014-11-26 22:49             ` Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141111192309.GH16980@sonymobile.com \
    --to=bjorn.andersson@sonymobile.com \
    --cc=broonie@kernel.org \
    --cc=collinsd@codeaurora.org \
    --cc=javier@dowhile0.org \
    --cc=lee.jones@linaro.org \
    --cc=lina.iyer@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=sboyd@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.