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]
Message-Id: <7FA6C80D-8076-4E41-AF55-11BBA2FD9AB0@codeaurora.org>
Date:	Thu, 29 May 2014 11:30:31 -0500
From:	Kumar Gala <galak@...eaurora.org>
To:	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:	Bjorn Andersson <bjorn.andersson@...ymobile.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Lee Jones <lee.jones@...aro.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	Josh Cartwright <joshc@...eaurora.org>,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH 1/3] mfd: devicetree: bindings: Add Qualcomm RPM DT binding


On May 29, 2014, at 11:19 AM, Srinivas Kandagatla <srinivas.kandagatla@...aro.org> wrote:

>> += SUBDEVICES
>> +
>> +The RPM exposes resources to its subnodes. The below bindings specify the set
>> +of valid subnodes that can operate on these resources.
> 
> Why should these devices be on sub nodes?
> 
> Any reason not to implement it like this,
> 
> rpm: rpm@...000 {
> 	compatible = "qcom,rpm-msm8960";
> 	reg = <0x108000 0x1000 0x2011008 0x4>;
> 
> 	interrupts = <0 19 0>, <0 21 0>, <0 22 0>;
> 	interrupt-names = "ack", "err", "wakeup";
> };
> 
> pm8921_s1: pm8921-s1 {
> 	compatible = "qcom,rpm-pm8921-smps";
> 	
> 	regulator-min-microvolt = <1225000>;
> 	regulator-max-microvolt = <1225000>;
> 	regulator-always-on;
> 
> 	qcom,rpm = <&rpm QCOM_RPM_PM8921_S1>;
> 	qcom,switch-mode-frequency = <3200000>;
> 	qcom,hpm-threshold = <100000>;
> };
> 
> This would simplify the driver code too and handle the interface neatly then depending on device hierarchy.
> rpm would be a interface library to the clients. Makes the drivers more independent, and re-usable if we do this way.
> 
> ??

One reason to go with sub nodes is it creates a proper driver ordering dependency as I assume rpm driver will end up calling of_platform_populate for the sub nodes at the point that the RPM driver is ready.  We could do this with deferred probe but doing it explicitly is better in my opinion as it limits the amount of time between when RPM is ready vs when the children can start doing things

- k

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

--
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