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: <54D3A96B.2020704@sonymobile.com>
Date:	Thu, 5 Feb 2015 09:33:31 -0800
From:	Tim Bird <tim.bird@...ymobile.com>
To:	Mark Brown <broonie@...nel.org>
CC:	"lgirdwood@...il.com" <lgirdwood@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Andersson, Björn" 
	<Bjorn.Andersson@...ymobile.com>
Subject: Re: [PATCH] regulator: Support different config and dev of_nodes
 in regulator_register



On 02/04/2015 05:59 PM, Mark Brown wrote:
> On Wed, Feb 04, 2015 at 03:19:57PM -0800, Tim Bird wrote:
> 
>> Support calling regulator_register with a dev node and a config node
>> with different of_nodes.  This is useful when a single driver
>> wishes to register multiple child regulators.
> 
>> Without this you get silent failures allocating a supply
>> for a regulator which is registered using the device node of the
>> regulator's DT parent (but it's own DT node).
> 
> This is explicitly not supported; such bindings are invariably attempts
> to encode the Linux MFD structure into the device tree (which isn't a
> wonderful idea as the way we split things into subsystems can and does
> change) or...

Sorry - what is the "Linux MFD structure"?

> 
>> charger@...0 {
>>       compatible = "qcom,pm8941-charger";
>>       reg = <0x1000 0x700>;
>>       ....
>>       chg_otg {
>>           regulator_name = "chg_otg";
>>           otg-supply = <&pm8941_mvs1>;
>>           ...
>>       }
>> }
> 
> ...this which just looks like the supply has been placed in the wrong
> place, it should be in the parent node.  Supplies are always defined at
> the package level, that way we can consistently define the bindings for
> supplies for a device without having to completely support it and we
> don't have to bind the same supply multiple times.  It should really be
> possible to wire up the supplies based only on the schematics.
> 
Well, the above DT node is not complete.  Let me give some more
context.  I eventually want to have the charger driver support 2
regulators - one for the OTG vbus output (shown above) and one
for a boost hardware device, which controls voltage for this and
other parts of the system.  These are both for IP blocks that are
in the register range of this charger hardware (and hence belong, IMHO
in this driver).  I can easily move the otg-supply to the charger DT node,
as you request, but what do I do about other regulator attributes,
if I need to specify them for both the chg_otg and boost regulators
provided by this driver? How would this be handled?  I can't put them
all in the charger DT node.

Thanks,
 -- Tim


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