Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: anatop: patching to device-tree property "reg".

Change "reg" to "anatop-reg-offset" due to there is a warning of handling no
size field in reg.

This patch also adds the missing device-tree binding documentation.

Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

authored by

Ying-Chun Liu (PaulLiu) and committed by
Mark Brown
2f2cc27f 93009286

+32 -2
+29
Documentation/devicetree/bindings/regulator/anatop-regulator.txt
··· 1 + Anatop Voltage regulators 2 + 3 + Required properties: 4 + - compatible: Must be "fsl,anatop-regulator" 5 + - anatop-reg-offset: Anatop MFD register offset 6 + - anatop-vol-bit-shift: Bit shift for the register 7 + - anatop-vol-bit-width: Number of bits used in the register 8 + - anatop-min-bit-val: Minimum value of this register 9 + - anatop-min-voltage: Minimum voltage of this regulator 10 + - anatop-max-voltage: Maximum voltage of this regulator 11 + 12 + Any property defined as part of the core regulator 13 + binding, defined in regulator.txt, can also be used. 14 + 15 + Example: 16 + 17 + regulator-vddpu { 18 + compatible = "fsl,anatop-regulator"; 19 + regulator-name = "vddpu"; 20 + regulator-min-microvolt = <725000>; 21 + regulator-max-microvolt = <1300000>; 22 + regulator-always-on; 23 + anatop-reg-offset = <0x140>; 24 + anatop-vol-bit-shift = <9>; 25 + anatop-vol-bit-width = <5>; 26 + anatop-min-bit-val = <1>; 27 + anatop-min-voltage = <725000>; 28 + anatop-max-voltage = <1300000>; 29 + };
+3 -2
drivers/regulator/anatop-regulator.c
··· 138 138 rdesc->type = REGULATOR_VOLTAGE; 139 139 rdesc->owner = THIS_MODULE; 140 140 sreg->mfd = anatopmfd; 141 - ret = of_property_read_u32(np, "reg", &sreg->control_reg); 141 + ret = of_property_read_u32(np, "anatop-reg-offset", 142 + &sreg->control_reg); 142 143 if (ret) { 143 - dev_err(dev, "no reg property set\n"); 144 + dev_err(dev, "no anatop-reg-offset property set\n"); 144 145 goto anatop_probe_end; 145 146 } 146 147 ret = of_property_read_u32(np, "anatop-vol-bit-width",