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

regulator: lm363x: Use generic property for hardware enable pins

With index usages, device specific properties can be replaced with generic
one. Vpos is index 0 and Vneg is index 1.
DT examples are added as well.

Signed-off-by: Milo Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Milo Kim and committed by
Mark Brown
45493684 9503b508

+76 -2
+76 -2
Documentation/devicetree/bindings/regulator/lm363x-regulator.txt
··· 8 8 9 9 Optional properties: 10 10 LM3632 has external enable pins for two LDOs. 11 - - ti,lcm-en1-gpio: A GPIO specifier for Vpos control pin. 12 - - ti,lcm-en2-gpio: A GPIO specifier for Vneg control pin. 11 + - enable-gpios: Two GPIO specifiers for Vpos and Vneg control pins. 12 + The first entry is Vpos, the second is Vneg enable pin. 13 13 14 14 Child nodes: 15 15 LM3631 ··· 29 29 Please refer to [1]. 30 30 31 31 Examples: Please refer to ti-lmu dt-bindings [2]. 32 + 33 + lm3631@29 { 34 + compatible = "ti,lm3631"; 35 + reg = <0x29>; 36 + 37 + regulators { 38 + compatible = "ti,lm363x-regulator"; 39 + 40 + vboost { 41 + regulator-name = "lcd_boost"; 42 + regulator-min-microvolt = <4500000>; 43 + regulator-max-microvolt = <6350000>; 44 + regulator-always-on; 45 + }; 46 + 47 + vcont { 48 + regulator-name = "lcd_vcont"; 49 + regulator-min-microvolt = <1800000>; 50 + regulator-max-microvolt = <3300000>; 51 + }; 52 + 53 + voref { 54 + regulator-name = "lcd_voref"; 55 + regulator-min-microvolt = <4000000>; 56 + regulator-max-microvolt = <6000000>; 57 + }; 58 + 59 + vpos { 60 + regulator-name = "lcd_vpos"; 61 + regulator-min-microvolt = <4000000>; 62 + regulator-max-microvolt = <6000000>; 63 + regulator-boot-on; 64 + }; 65 + 66 + vneg { 67 + regulator-name = "lcd_vneg"; 68 + regulator-min-microvolt = <4000000>; 69 + regulator-max-microvolt = <6000000>; 70 + regulator-boot-on; 71 + }; 72 + }; 73 + }; 74 + 75 + lm3632@11 { 76 + compatible = "ti,lm3632"; 77 + reg = <0x11>; 78 + 79 + regulators { 80 + compatible = "ti,lm363x-regulator"; 81 + 82 + /* GPIO1_16 for Vpos, GPIO1_28 is for Vneg */ 83 + enable-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>, 84 + <&gpio1 28 GPIO_ACTIVE_HIGH>; 85 + 86 + vboost { 87 + regulator-name = "lcd_boost"; 88 + regulator-min-microvolt = <4500000>; 89 + regulator-max-microvolt = <6400000>; 90 + regulator-always-on; 91 + }; 92 + 93 + vpos { 94 + regulator-name = "lcd_vpos"; 95 + regulator-min-microvolt = <4000000>; 96 + regulator-max-microvolt = <6000000>; 97 + }; 98 + 99 + vneg { 100 + regulator-name = "lcd_vneg"; 101 + regulator-min-microvolt = <4000000>; 102 + regulator-max-microvolt = <6000000>; 103 + }; 104 + }; 105 + }; 32 106 33 107 [1] ../regulator/regulator.txt 34 108 [2] ../mfd/ti-lmu.txt