lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 08 Oct 2014 10:46:28 +0200
From:	Javier Martinez Canillas <javier.martinez@...labora.co.uk>
To:	Doug Anderson <dianders@...omium.org>,
	Chris Zhong <zyw@...k-chips.com>
CC:	Heiko Stübner <heiko@...ech.de>,
	linux-rockchip@...ts.infradead.org,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Chanwoo Choi <cw00.choi@...sung.com>
Subject: Re: [PATCH] regulator: rk808: Add support setting suspend voltage

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ