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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 17 Oct 2014 14:39:15 +0200
From:	Javier Martinez Canillas <javier.martinez@...labora.co.uk>
To:	Mark Brown <broonie@...nel.org>
CC:	Lee Jones <lee.jones@...aro.org>,
	Doug Anderson <dianders@...omium.org>,
	Chanwoo Choi <cw00.choi@...sung.com>,
	Olof Johansson <olof@...om.net>,
	Chris Zhong <zyw@...k-chips.com>,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	Abhilash Kesavan <kesavan.abhilash@...il.com>,
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org
Subject: Re: [PATCH v2 5/7] regulator: max77802: Document regulator opmode
 DT properties

Hello Mark,

On 10/17/2014 01:57 PM, Mark Brown wrote:
> On Thu, Oct 16, 2014 at 06:48:51PM +0200, Javier Martinez Canillas wrote:
> 
>> +- maxim,regulator-initial-mode: initial operating mode.
>> +  This property can only be used on regulators that support changing their mode
>> +  during normal operation. These regulators are LDO1, LDO3, LDO20 and LDO21.
>> +- maxim,regulator-disk-mode: operating mode for the regulator when the system
>> +  enters in the Suspend-to-Disk state.
>> +- maxim,regulator-mem-mode: operating mode for the regulator when the system
>> +  enters in the Suspend-to-RAM state.
> 
> This seems pretty ugly since it's not integrated with the suspend state
> binding at all - adding new suspend modes is going to involve changing
> the binding which seems icky.  Adding a standard property to set modes
> doesn't seem so bad, I think a translation function to parse device
> specific mode bindings in properties might be the way forwards.
> 

Just to be sure I understood correctly, are you suggesting something like this?

	ldo1_reg: LDO1 {
		regulator-name = "vdd_1v0";
		regulator-min-microvolt = <1000000>;
		regulator-max-microvolt = <1000000>;
		regulator-state-mem {
			regulator-on-in-suspend;
			regulator-mode = <MAX77802_OPMODE_LP>;
		};
	};

In other words, extending Chanwoo Choi's original suspend state binding to add
the regulator-mode property that was present in his v3 [0] but instead trying
to use the standard REGULATOR_MODE_*, say that each regulator driver should
define it's own device-specific set of modes and a do the translation to fill
standard modes in the struct regulation_constraints {initial,disk,mem} mode?

That way adding new suspend states, will only require changing the generic
regulator binding but not the regulator driver specific bindings.

Best regards,
Javier

[0]: https://lkml.org/lkml/2014/8/13/768
--
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