Skip to contentSkip to conversation

regulators: max8660: add DT bindings

PATCH Applied Daniel Mack 2 participants 2 messages Aug 2, 2013

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

PATCH v3 1/1 regulators: max8660: add DT bindings

This patch adds devicetree bindings for max8660, along with some documentation.

---
v3:
- fix non-dt function stub

v2:
- fixed documentation
- use of_match_ptr
- only pass the of_nodes internally

 .../devicetree/bindings/regulator/max8660.txt      | 47 +++++++++++++
 drivers/regulator/max8660.c                        | 82 +++++++++++++++++++++-
 include/linux/regulator/max8660.h                  |  2 +-
 3 files changed, 129 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/max8660.txt
Documentation/devicetree/bindings/regulator/max8660.txt new file +47 -0
new file mode 100644
index 0000000..8ba994d
@@ -0,0 +1,47 @@
+Maxim MAX8660 voltage regulator
+
+Required properties:
+- compatible: must be one of "maxim,max8660", "maxim,max8661"
+- reg: I2C slave address, usually 0x34
+- any required generic properties defined in regulator.txt
+
+Example:
+
+	i2c_master {
+		max8660@34 {
+			compatible = "maxim,max8660";
+			reg = <0x34>;
+
+			regulators {
+				regulator@0 {
+					regulator-compatible= "V3(DCDC)";
+					regulator-min-microvolt = <725000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
+				regulator@1 {
+					regulator-compatible= "V4(DCDC)";
+					regulator-min-microvolt = <725000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
+				regulator@2 {
+					regulator-compatible= "V5(LDO)";
+					regulator-min-microvolt = <1700000>;
+					regulator-max-microvolt = <2000000>;
+				};
+
+				regulator@3 {
+					regulator-compatible= "V6(LDO)";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <3300000>;
+				};
+
+				regulator@4 {
+					regulator-compatible= "V7(LDO)";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <3300000>;
+				};
+			};
+		};
+	};
drivers/regulator/max8660.c +81 -1

114 lines not on this page · raw message

include/linux/regulator/max8660.h +1 -1
index 9936763..f8a6a48 100644
@@ -39,7 +39,7 @@ enum {
  */
 struct max8660_subdev_data {
 	int				id;
-	char				*name;
+	const char			*name;
 	struct regulator_init_data	*platform_data;
 };
 
Signature · 1 line
1.8.3.1
maintainer Applied
#1 lore raw
Quoted 2 lines · Daniel Mack

This patch adds devicetree bindings for max8660, along with some documentation.

Applied, thanks. DT bindings ought to be CCed to the devictree list but this is very standard so no pressing need here.