Re: [PATCH] regulator: Support different config and dev of_nodes in regulator_register

From: Mark Brown
Date: Wed Feb 04 2015 - 20:59:58 EST


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

> charger@1000 {
> 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.

Attachment: signature.asc
Description: Digital signature