Skip to contentSkip to conversation

regulators: max8660: add DT bindings

PATCH Superseded Daniel Mack 1 participant 1 message Aug 2, 2013

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

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

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

---

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

 .../devicetree/bindings/regulator/max8660.txt      | 47 +++++++++++++
 drivers/regulator/max8660.c                        | 81 +++++++++++++++++++++-
 include/linux/regulator/max8660.h                  |  2 +-
 3 files changed, 128 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 +80 -1

113 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