regulator, dt: add dt support for tps6502x regulator
Subsystems (2)
PATCH 1/1 regulator, dt: add dt support for tps6502x regulator
add DT support for the tps6502x regulators.
---
.../devicetree/bindings/regulator/tps6502x.txt | 56 ++++ arch/arm/boot/dts/tps65023.dtsi | 46 +++ drivers/regulator/tps65023-regulator.c | 326 +++++++++++++++------ 3 files changed, 331 insertions(+), 97 deletions(-) create mode 100644 Documentation/devicetree/bindings/regulator/tps6502x.txt create mode 100644 arch/arm/boot/dts/tps65023.dtsi
Documentation/devicetree/bindings/regulator/tps6502x.txt new file +56 -0
@@ -0,0 +1,56 @@ +TPS6502x family of regulators + +Required properties: +- compatible: "ti,tps65020", "ti,tps65021" or "ti,tps65023" +- reg: I2C slave address +- regulators: list of regulators provided by this controller, must be named + after their hardware counterparts: dcdc[1-3] and ldo[1-2] +- regulators: This is the list of child nodes that specify the regulator + initialization data for defined regulators. Not all regulators for the given + device need to be present. The definition for each of these nodes is defined + using the standard binding for regulators found at + Documentation/devicetree/bindings/regulator/regulator.txt. + + The valid names for regulators are: + tps6502x: dcdc1, dcdc2, dcdc3, ldo1 and ldo2 + +Each regulator is defined using the standard binding for regulators. + +Example: + + tps: tps@48 { + compatible = "ti,tps65023"; + + regulators { + vdcdc1_reg: regulator@0 { + regulator-name = "vdd_core"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + }; + vdcdc2_reg: regulator@1 { + regulator-name = "vddshv"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + vdcdc3_reg: regulator@2 { + regulator-name = "vdds"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + vldo1_reg: regulator@3 { + regulator-name = "vdda1p8v_usbphy"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + vldo2_reg: regulator@4 { + regulator-name = "vdda3p3v_usbphy"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; + };
arch/arm/boot/dts/tps65023.dtsi new file +46 -0
46 lines not on this page · raw message
drivers/regulator/tps65023-regulator.c +229 -97
371 lines not on this page · raw message
Signature · 6 lines
2.1.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
kbuild test robot
build bot[RFC PATCH] regulator, dt: tps6502x_parse_dt_data() can be static
-- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at…
--- tps65023-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/tps65023-regulator.c +1 -1
@@ -360,7 +360,7 @@ static struct of_regulator_match tps65023_matches[] = { };struct regulator_init_data -*tps6502x_parse_dt_data (struct device *dev, +static *tps6502x_parse_dt_data (struct device *dev,const struct tps_driver_data *drv_data,struct of_regulator_match **tps6502x_reg_matches) {
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
kbuild test robot
build boturl: https://github.com/0day-ci/linux/commits/Heiko-Schocher/regulator-dt-add-dt-support-for-tps6502x-regulator/20151019-143244 reproduce:
Hi Heiko,
[auto build test WARNING on v4.3-rc6 -- if it's inappropriate base, please suggest rules for selecting the more suitable base]
url: https://github.com/0day-ci/linux/commits/Heiko-Schocher/regulator-dt-add-dt-support-for-tps6502x-regulator/20151019-143244
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__sparse warnings: (new ones prefixed by >>)
>> drivers/regulator/tps65023-regulator.c:363:1: sparse: symbol 'tps6502x_parse_dt_data' was not declared. Should it be static?
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
maintainerarch/arm/boot/dts/tps65023.dtsi
Quoted 2 lines · Heiko Schocher
arch/arm/boot/dts/tps65023.dtsi new file +0
-0
If this file is needed there is something broken, if this file is not needed then it is just noise since everything in it needs to be overridden by users anyway. Either way please remove it.
arch/arm/boot/dts/tps65023.dtsi line 43
Quoted 3 lines
arch/arm/boot/dts/tps65023.dtsi new file +3
-0+ vldo2_reg: regulator@4 { + reg = <4>; + regulator-compatible = "vldo2", "regulator-compatible";
Modern bindings no longer use regulator-compatible, they just use the node name - please look at recently added bindings for examples.
Hello Mark,
Am 21.10.2015 um 14:19 schrieb Mark Brown:
Quoted 8 lines · Heiko Schocher
arch/arm/boot/dts/tps65023.dtsi
Quoted 3 lines
arch/arm/boot/dts/tps65023.dtsi new file +0
-0If this file is needed there is something broken, if this file is not needed then it is just noise since everything in it needs to be overridden by users anyway. Either way please remove it.
Uh, I thought to do it like:
arch/arm/boot/dts/tps65217.dtsi
but, okay, removed.
Quoted 6 lines
arch/arm/boot/dts/tps65023.dtsi line 43
Quoted 3 lines
arch/arm/boot/dts/tps65023.dtsi new file +3
-0+ vldo2_reg: regulator@4 { + reg = <4>; + regulator-compatible = "vldo2", "regulator-compatible";Modern bindings no longer use regulator-compatible, they just use the node name - please look at recently added bindings for examples.
removed.
Thanks for the review!
bye,
Heiko
Signature · 6 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
maintainerQuoted 7 lines · Heiko Schocher
Am 21.10.2015 um 14:19 schrieb Mark Brown:
Quoted 5 lines · Heiko Schocher
If this file is needed there is something broken, if this file is not needed then it is just noise since everything in it needs to be overridden by users anyway. Either way please remove it.
Quoted 5 lines
Uh, I thought to do it like:
arch/arm/boot/dts/tps65217.dtsibut, okay, removed.
That too is broken and should be removed :(
Hello Mark,
Am 21.10.2015 um 18:17 schrieb Mark Brown:
Quoted 8 lines · Heiko Schocher
Quoted 6 lines
Am 21.10.2015 um 14:19 schrieb Mark Brown:
Quoted 5 lines · Heiko Schocher
If this file is needed there is something broken, if this file is not needed then it is just noise since everything in it needs to be overridden by users anyway. Either way please remove it.
Quoted 7 lines
Quoted 5 lines
Uh, I thought to do it like:
arch/arm/boot/dts/tps65217.dtsibut, okay, removed.
That too is broken and should be removed :(
Ok, I have a board which uses this regulator ... can you give me a hint, how to remove it correctly?
I would do:
move from arch/arm/boot/dts/tps65217.dtsi into board dts
&tps {
+ compatible = "ti,tps65217"; [...]
and the reg and "regulator-compatible" into the corresponding nodes ...
dcdc1_reg: regulator@0 {+ reg = <0>;
+ regulator-compatible = "dcdc1";
Thanks!
bye,
Heiko
Signature · 6 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
maintainerQuoted 23 lines · Heiko Schocher
Am 21.10.2015 um 18:17 schrieb Mark Brown:
Quoted 5 lines
Quoted 3 lines
arch/arm/boot/dts/tps65217.dtsibut, okay, removed.
That too is broken and should be removed :(
Ok, I have a board which uses this regulator ... can you give me a hint, how to remove it correctly?
I would do:
move from
arch/arm/boot/dts/tps65217.dtsiinto board dts&tps {
(quoted diff) +1
-0+ compatible = "ti,tps65217";and the reg and "regulator-compatible" into the corresponding nodes ...
dcdc1_reg: regulator@0 {
Review
Quoted 2 lines
(quoted diff) +2
-0+ reg = <0>; + regulator-compatible = "dcdc1";
Yes, you should just put everything directly into the board DT.