[PATCH 0/2] Allow regulator nodes to hold their own init data

From: Charles Keepax
Date: Thu Nov 29 2018 - 05:28:28 EST

Unfortunately due to a rather large testing oversight on my
part the recently merged Lochnagar regulator binding does not
actually work. The binding looks like this:

lochnagar {
compatible = "cirrus,lochnagar1";


lochnagar-micvdd: MICVDD {
compatible = "cirrus,lochnagar2-micvdd";

SYSVDD-supply = <&wallvdd>;

regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
lochnagar-vddcore: VDDCORE {
compatible = "cirrus,lochnagar2-vddcore";

SYSVDD-supply = <&wallvdd>;

regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;

The trouble is that each regulator node individually binds
in a driver and contains the init data. The regulator core
appears to require the init data to be a sub-node of the node
that bound in the regulator driver. As the above binding seems
reasonable I opted to try and update the core to support the
current binding, although as the rest of the Lochnagar driver
isn't merged yet we could still update the binding if that comes
out of the review as a preferred option. Apologies for missing
such a glaring issue in my testing.


Charles Keepax (2):
regulator: Factor out location of init data OF node
regulator: Allow regulator nodes to contain their own init data

drivers/regulator/of_regulator.c | 72 ++++++++++++++++++++++++----------------
1 file changed, 43 insertions(+), 29 deletions(-)