Skip to contentSkip to conversation

regulator: tps65023: add device tree support

PATCH New Thomas Elste 1 participant 1 message Sep 21, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 regulator: tps65023: add device tree support

Add device tree based initialization support for tps65023 regulators. Therefore add macros for regulator definition setting of_match and regulators_node members. Add initialization of regulator_desc data using these macros. Remove old regulator_desc initialization.

Add device tree binding document for tps65023 regulators.

---

Changes in v2:
- don't match the regulator nodes in the driver anymore
- add regulator_desc initialization macros
- add regulator_desc data
- remove old regulator_desc initialization code
- remove tps_info struct and data
- move driver_data to tps_pmic struct

 .../devicetree/bindings/regulator/tps65023.txt     |  60 +++++
 drivers/regulator/tps65023-regulator.c             | 282 ++++++++-------------
 2 files changed, 168 insertions(+), 174 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/tps65023.txt
Documentation/devicetree/bindings/regulator/tps65023.txt new file +60 -0
new file mode 100644
index 0000000..a4714e4
@@ -0,0 +1,60 @@
+TPS65023 family of regulators
+
+Required properties:
+- compatible: Must be one of the following.
+	"ti,tps65020",
+	"ti,tps65021",
+	"ti,tps65023",
+- reg: I2C slave address
+- regulators: list of regulators provided by this controller, must be named
+  after their hardware counterparts: VDCDC[1-3] and LDO[1-2]
+- regulators: This is the list of child nodes that specify the regulator
+  initialization data for defined regulators. The definition for each of
+  these nodes is defined using the standard binding for regulators found at
+  Documentation/devicetree/bindings/regulator/regulator.txt.
+
+Each regulator is defined using the standard binding for regulators.
+
+Example:
+
+	tps65023@48 {
+		compatible = "ti,tps65023";
+		reg = <0x48>;
+
+		regulators {
+			VDCDC1 {
+				regulator-name = "vdd_mpu";
+				regulator-always-on;
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+			};
+
+			VDCDC2 {
+				regulator-name = "vdd_core";
+				regulator-always-on;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+			};
+
+			VDCDC3 {
+				regulator-name = "vdd_io";
+				regulator-always-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+			};
+
+			LDO1 {
+				regulator-name = "vdd_usb18";
+				regulator-always-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+			};
+
+			LDO2 {
+				regulator-name = "vdd_usb33";
+				regulator-always-on;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+			};
+		};
+	};
drivers/regulator/tps65023-regulator.c +108 -174

361 lines not on this page · raw message

Signature · 6 lines
2.3.6

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