From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Doug Anderson <dianders@chromium.org>, Chris Zhong <zyw@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>,
linux-rockchip@lists.infradead.org,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Chanwoo Choi" <cw00.choi@samsung.com>
Subject: Re: [PATCH] regulator: rk808: Add support setting suspend voltage
Date: Wed, 08 Oct 2014 10:46:28 +0200 [thread overview]
Message-ID: <5434F9E4.7020109@collabora.co.uk> (raw)
In-Reply-To: <CAD=FV=W_6_JSn5ZWEG7YBDw5xf+tGReSB-WCV798gBqXyhikgg@mail.gmail.com>
Hello Doug,
On 10/07/2014 07:48 PM, Doug Anderson wrote:
>
> I don't have all the right patches to test this right now. Hopefully
> you can point me at what we're using right now. I'd expect that this
> will need the patches that Chanwoo and Javier are working on, so I've
> added them to this.
>
Yes, you will need Chanwoo's series in order to use this. If also the
driver needs to set a default initial regulator operating mode, it will
need the series I'll post today but in that case also a .set_mode handler
is needed.
> One point of curiosity (maybe this is a question for Chanwoo and
> Javier): I'd expect that if someone didn't explicitly setup a "suspend
> voltage" that their voltage would just be left alone at suspend time.
> I believe that won't be the case for your driver. The rk808 will (I
> think) automatically transition to the "suspend voltage" settings for
> ALL regulators at suspend time. If you didn't explicitly set the
> suspend voltage then you'll move to whatever the default voltage is,
> right?
>
On system suspend, the regulator core only calls the .set_suspend_voltage
handler if struct regulator_state *rstate->uV > 0 for the given suspend
state (mem,disk,standby) and only calls .set_suspend_{enable,disable} if
struct regulator_state *rstate->{enabled,disable} are set for that state.
Chanwoo's series have different DT properties that are used to set the
suspend state uV (regulator-volt) and disabled (regulator-off-in-suspend):
ldoX_reg: LDOx {
...
regulator-state-mem {
regulator-volt = <1200000>;
regulator-off-in-suspend;
};
...
};
So answering your question, the transition to the "suspend voltage" setting
will only happen if uV is set (regulator-volt), otherwise it will be left
alone at suspend time just like is left alone on disable.
However, Chanwoo said that he will drop the regulator-volt DT property from
v5 [0]. It seems that is a useful use case for others to set the regulator
voltage on suspend, so maybe Chanwoo can address the issues pointed out by
Mark about renaming it to regulator-uV [1] and revise the check for the
voltage range [2] but kept the DT property on v5?
> -Doug
>
Thanks a lot and best regards,
Javier
[0]: https://lkml.org/lkml/2014/9/28/202
[1]: https://lkml.org/lkml/2014/9/4/652
[2]: https://lkml.org/lkml/2014/9/4/651
next prev parent reply other threads:[~2014-10-08 8:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 8:43 Chris Zhong
2014-10-07 17:48 ` Doug Anderson
2014-10-08 8:46 ` Javier Martinez Canillas [this message]
2014-10-08 16:30 ` Doug Anderson
2014-10-08 12:49 ` Mark Brown
2014-10-08 16:12 ` Doug Anderson
2014-10-08 18:19 ` Mark Brown
2014-10-07 18:13 ` Mark Brown
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=5434F9E4.7020109@collabora.co.uk \
--to=javier.martinez@collabora.co.uk \
--cc=broonie@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=dianders@chromium.org \
--cc=heiko@sntech.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=zyw@rock-chips.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome