Skip to contentSkip to conversation

Update TPS65910 to boot using devicetree

PATCH Applied Rhyland Klein 5 participants 20 messages May 8, 2012 – May 12, 2012

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

v3 cover Update TPS65910 to boot using devicetree

This patch set updates the tps65910 driver to boot using devicetree.

This patch set now uses the new addition to the of_regulator code, of_regulator_match to find all the regulator init data for the device.

Rhyland Klein (6):
mfd: tps65910: Commonize regmap access through header
regulator: tps65910: Add device tree bindings
mfd: tps65910: Add device-tree support
regulator: tps65910 regulator: add device tree support
mfd: tps65910-irq: Add devicetree init support
ARM: Tegra: Add support for TPS65910 PMIC

 Documentation/devicetree/bindings/mfd/tps65910.txt |  133 ++++++++++++++
 arch/arm/boot/dts/tegra-cardhu.dts                 |   91 ++++++++++
 drivers/gpio/gpio-tps65910.c                       |   14 +-
 drivers/mfd/tps65910-irq.c                         |   55 ++++---
 drivers/mfd/tps65910.c                             |  120 +++++++++----
 drivers/regulator/tps65910-regulator.c             |  190 +++++++++++++++-----
 include/linux/mfd/tps65910.h                       |   29 +++-
 7 files changed, 523 insertions(+), 109 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/tps65910.txt
#1 lore raw

PATCH v3 1/6 mfd: tps65910: Commonize regmap access through header

This change removes the read/write callback functions in favor of common regmap accessors inside the header file. This change also makes use of regmap_read/write for single register access which maps better onto what this driver actually needs.

---
v3: No change from v2 (other than rebased)
v2: implemented switching tps65910 drivers over to more directly accessing
the regmap rather than going through utility functions.

 drivers/gpio/gpio-tps65910.c           |   14 +++---
 drivers/mfd/tps65910-irq.c             |   34 +++++++-------
 drivers/mfd/tps65910.c                 |   40 ++++------------
 drivers/regulator/tps65910-regulator.c |   82 +++++++++++++++-----------------
 include/linux/mfd/tps65910.h           |   29 ++++++++++--
 5 files changed, 97 insertions(+), 102 deletions(-)
drivers/gpio/gpio-tps65910.c +7 -7
index 7eef648..bc155f2 100644
@@ -23,9 +23,9 @@
 static int tps65910_gpio_get(struct gpio_chip *gc, unsigned offset)
 {
 	struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio);
-	uint8_t val;
+	unsigned int val;
 
-	tps65910->read(tps65910, TPS65910_GPIO0 + offset, 1, &val);
+	tps65910_reg_read(tps65910, TPS65910_GPIO0 + offset, &val);
 
 	if (val & GPIO_STS_MASK)
 		return 1;
@@ -39,10 +39,10 @@ static void tps65910_gpio_set(struct gpio_chip *gc, unsigned offset,
 	struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio);
 
 	if (value)
-		tps65910_set_bits(tps65910, TPS65910_GPIO0 + offset,
+		tps65910_reg_set_bits(tps65910, TPS65910_GPIO0 + offset,
 						GPIO_SET_MASK);
 	else
-		tps65910_clear_bits(tps65910, TPS65910_GPIO0 + offset,
+		tps65910_reg_clear_bits(tps65910, TPS65910_GPIO0 + offset,
 						GPIO_SET_MASK);
 }
 
@@ -54,7 +54,7 @@ static int tps65910_gpio_output(struct gpio_chip *gc, unsigned offset,
 	/* Set the initial value */
 	tps65910_gpio_set(gc, offset, value);
 
-	return tps65910_set_bits(tps65910, TPS65910_GPIO0 + offset,
+	return tps65910_reg_set_bits(tps65910, TPS65910_GPIO0 + offset,
 						GPIO_CFG_MASK);
 }
 
@@ -62,7 +62,7 @@ static int tps65910_gpio_input(struct gpio_chip *gc, unsigned offset)
 {
 	struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio);
 
-	return tps65910_clear_bits(tps65910, TPS65910_GPIO0 + offset,
+	return tps65910_reg_clear_bits(tps65910, TPS65910_GPIO0 + offset,
 						GPIO_CFG_MASK);
 }
 
@@ -102,7 +102,7 @@ void tps65910_gpio_init(struct tps65910 *tps65910, int gpio_base)
 		int i;
 		for (i = 0; i < tps65910->gpio.ngpio; ++i) {
 			if (board_data->en_gpio_sleep[i]) {
-				ret = tps65910_set_bits(tps65910,
+				ret = tps65910_reg_set_bits(tps65910,
 					TPS65910_GPIO0 + i, GPIO_SLEEP_MASK);
 				if (ret < 0)
 					dev_warn(tps65910->dev,
drivers/mfd/tps65910-irq.c +17 -17
index c9ed5c0..0f1ff7f 100644
@@ -41,28 +41,28 @@ static inline int irq_to_tps65910_irq(struct tps65910 *tps65910,
 static irqreturn_t tps65910_irq(int irq, void *irq_data)
 {
 	struct tps65910 *tps65910 = irq_data;
+	unsigned int reg;
 	u32 irq_sts;
 	u32 irq_mask;
-	u8 reg;
 	int i;
 
-	tps65910->read(tps65910, TPS65910_INT_STS, 1, &reg);
+	tps65910_reg_read(tps65910, TPS65910_INT_STS, &reg);
 	irq_sts = reg;
-	tps65910->read(tps65910, TPS65910_INT_STS2, 1, &reg);
+	tps65910_reg_read(tps65910, TPS65910_INT_STS2, &reg);
 	irq_sts |= reg << 8;
 	switch (tps65910_chip_id(tps65910)) {
 	case TPS65911:
-		tps65910->read(tps65910, TPS65910_INT_STS3, 1, &reg);
+		tps65910_reg_read(tps65910, TPS65910_INT_STS3, &reg);
 		irq_sts |= reg << 16;
 	}
 
-	tps65910->read(tps65910, TPS65910_INT_MSK, 1, &reg);
+	tps65910_reg_read(tps65910, TPS65910_INT_MSK, &reg);
 	irq_mask = reg;
-	tps65910->read(tps65910, TPS65910_INT_MSK2, 1, &reg);
+	tps65910_reg_read(tps65910, TPS65910_INT_MSK2, &reg);
 	irq_mask |= reg << 8;
 	switch (tps65910_chip_id(tps65910)) {
 	case TPS65911:
-		tps65910->read(tps65910, TPS65910_INT_MSK3, 1, &reg);
+		tps65910_reg_read(tps65910, TPS65910_INT_MSK3, &reg);
 		irq_mask |= reg << 16;
 	}
 
@@ -82,13 +82,13 @@ static irqreturn_t tps65910_irq(int irq, void *irq_data)
 	/* Write the STS register back to clear IRQs we handled */
 	reg = irq_sts & 0xFF;
 	irq_sts >>= 8;
-	tps65910->write(tps65910, TPS65910_INT_STS, 1, &reg);
+	tps65910_reg_write(tps65910, TPS65910_INT_STS, reg);
 	reg = irq_sts & 0xFF;
-	tps65910->write(tps65910, TPS65910_INT_STS2, 1, &reg);
+	tps65910_reg_write(tps65910, TPS65910_INT_STS2, reg);
 	switch (tps65910_chip_id(tps65910)) {
 	case TPS65911:
 		reg = irq_sts >> 8;
-		tps65910->write(tps65910, TPS65910_INT_STS3, 1, &reg);
+		tps65910_reg_write(tps65910, TPS65910_INT_STS3, reg);
 	}
 
 	return IRQ_HANDLED;
@@ -105,27 +105,27 @@ static void tps65910_irq_sync_unlock(struct irq_data *data)
 {
 	struct tps65910 *tps65910 = irq_data_get_irq_chip_data(data);
 	u32 reg_mask;
-	u8 reg;
+	unsigned int reg;
 
-	tps65910->read(tps65910, TPS65910_INT_MSK, 1, &reg);
+	tps65910_reg_read(tps65910, TPS65910_INT_MSK, &reg);
 	reg_mask = reg;
-	tps65910->read(tps65910, TPS65910_INT_MSK2, 1, &reg);
+	tps65910_reg_read(tps65910, TPS65910_INT_MSK2, &reg);
 	reg_mask |= reg << 8;
 	switch (tps65910_chip_id(tps65910)) {
 	case TPS65911:
-		tps65910->read(tps65910, TPS65910_INT_MSK3, 1, &reg);
+		tps65910_reg_read(tps65910, TPS65910_INT_MSK3, &reg);
 		reg_mask |= reg << 16;
 	}
 
 	if (tps65910->irq_mask != reg_mask) {
 		reg = tps65910->irq_mask & 0xFF;
-		tps65910->write(tps65910, TPS65910_INT_MSK, 1, &reg);
+		tps65910_reg_write(tps65910, TPS65910_INT_MSK, reg);
 		reg = tps65910->irq_mask >> 8 & 0xFF;
-		tps65910->write(tps65910, TPS65910_INT_MSK2, 1, &reg);
+		tps65910_reg_write(tps65910, TPS65910_INT_MSK2, reg);
 		switch (tps65910_chip_id(tps65910)) {
 		case TPS65911:
 			reg = tps65910->irq_mask >> 16;
-			tps65910->write(tps65910, TPS65910_INT_MSK3, 1, &reg);
+			tps65910_reg_write(tps65910, TPS65910_INT_MSK3, reg);
 		}
 	}
 	mutex_unlock(&tps65910->irq_lock);
drivers/mfd/tps65910.c +9 -31
index ae7f47b..f221153 100644
@@ -37,30 +37,6 @@ static struct mfd_cell tps65910s[] = {
 };
 
 
-static int tps65910_i2c_read(struct tps65910 *tps65910, u8 reg,
-				  int bytes, void *dest)
-{
-	return regmap_bulk_read(tps65910->regmap, reg, dest, bytes);
-}
-
-static int tps65910_i2c_write(struct tps65910 *tps65910, u8 reg,
-				  int bytes, void *src)
-{
-	return regmap_bulk_write(tps65910->regmap, reg, src, bytes);
-}
-
-int tps65910_set_bits(struct tps65910 *tps65910, u8 reg, u8 mask)
-{
-	return regmap_update_bits(tps65910->regmap, reg, mask, mask);
-}
-EXPORT_SYMBOL_GPL(tps65910_set_bits);
-
-int tps65910_clear_bits(struct tps65910 *tps65910, u8 reg, u8 mask)
-{
-	return regmap_update_bits(tps65910->regmap, reg, mask, 0);
-}
-EXPORT_SYMBOL_GPL(tps65910_clear_bits);
-
 static bool is_volatile_reg(struct device *dev, unsigned int reg)
 {
 	struct tps65910 *tps65910 = dev_get_drvdata(dev);
@@ -102,7 +78,7 @@ static int __init tps65910_sleepinit(struct tps65910 *tps65910,
 		return 0;
 
 	/* enabling SLEEP device state */
-	ret = tps65910_set_bits(tps65910, TPS65910_DEVCTRL,
+	ret = tps65910_reg_set_bits(tps65910, TPS65910_DEVCTRL,
 				DEVCTRL_DEV_SLP_MASK);
 	if (ret < 0) {
 		dev_err(dev, "set dev_slp failed: %d\n", ret);
@@ -114,7 +90,8 @@ static int __init tps65910_sleepinit(struct tps65910 *tps65910,
 		return 0;
 
 	if (pmic_pdata->slp_keepon->therm_keepon) {
-		ret = tps65910_set_bits(tps65910, TPS65910_SLEEP_KEEP_RES_ON,
+		ret = tps65910_reg_set_bits(tps65910,
+				TPS65910_SLEEP_KEEP_RES_ON,
 				SLEEP_KEEP_RES_ON_THERM_KEEPON_MASK);
 		if (ret < 0) {
 			dev_err(dev, "set therm_keepon failed: %d\n", ret);
@@ -123,7 +100,8 @@ static int __init tps65910_sleepinit(struct tps65910 *tps65910,
 	}
 
 	if (pmic_pdata->slp_keepon->clkout32k_keepon) {
-		ret = tps65910_set_bits(tps65910, TPS65910_SLEEP_KEEP_RES_ON,
+		ret = tps65910_reg_set_bits(tps65910,
+				TPS65910_SLEEP_KEEP_RES_ON,
 				SLEEP_KEEP_RES_ON_CLKOUT32K_KEEPON_MASK);
 		if (ret < 0) {
 			dev_err(dev, "set clkout32k_keepon failed: %d\n", ret);
@@ -132,7 +110,8 @@ static int __init tps65910_sleepinit(struct tps65910 *tps65910,
 	}
 
 	if (pmic_pdata->slp_keepon->i2chs_keepon) {
-		ret = tps65910_set_bits(tps65910, TPS65910_SLEEP_KEEP_RES_ON,
+		ret = tps65910_reg_set_bits(tps65910,
+				TPS65910_SLEEP_KEEP_RES_ON,
 				SLEEP_KEEP_RES_ON_I2CHS_KEEPON_MASK);
 		if (ret < 0) {
 			dev_err(dev, "set i2chs_keepon failed: %d\n", ret);
@@ -143,7 +122,8 @@ static int __init tps65910_sleepinit(struct tps65910 *tps65910,
 	return 0;
 
 disable_dev_slp:
-	tps65910_clear_bits(tps65910, TPS65910_DEVCTRL, DEVCTRL_DEV_SLP_MASK);
+	tps65910_reg_clear_bits(tps65910, TPS65910_DEVCTRL,
+				DEVCTRL_DEV_SLP_MASK);
 
 err_sleep_init:
 	return ret;
@@ -176,8 +156,6 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
 	tps65910->dev = &i2c->dev;
 	tps65910->i2c_client = i2c;
 	tps65910->id = id->driver_data;
-	tps65910->read = tps65910_i2c_read;
-	tps65910->write = tps65910_i2c_write;
 	mutex_init(&tps65910->io_mutex);
 
 	tps65910->regmap = regmap_init_i2c(i2c, &tps65910_regmap_config);
drivers/regulator/tps65910-regulator.c +39 -43

242 lines not on this page · raw message

include/linux/mfd/tps65910.h +25 -4
index 56903ad..949f1da 100644
@@ -18,6 +18,7 @@
 #define __LINUX_MFD_TPS65910_H
 
 #include <linux/gpio.h>
+#include <linux/regmap.h>
 
 /* TPS chip id list */
 #define TPS65910			0
@@ -823,8 +824,6 @@ struct tps65910 {
 	struct regmap *regmap;
 	struct mutex io_mutex;
 	unsigned int id;
-	int (*read)(struct tps65910 *tps65910, u8 reg, int size, void *dest);
-	int (*write)(struct tps65910 *tps65910, u8 reg, int size, void *src);
 
 	/* Client devices */
 	struct tps65910_pmic *pmic;
@@ -847,8 +846,6 @@ struct tps65910_platform_data {
 	int irq_base;
 };
 
-int tps65910_set_bits(struct tps65910 *tps65910, u8 reg, u8 mask);
-int tps65910_clear_bits(struct tps65910 *tps65910, u8 reg, u8 mask);
 void tps65910_gpio_init(struct tps65910 *tps65910, int gpio_base);
 int tps65910_irq_init(struct tps65910 *tps65910, int irq,
 		struct tps65910_platform_data *pdata);
@@ -859,4 +856,28 @@ static inline int tps65910_chip_id(struct tps65910 *tps65910)
 	return tps65910->id;
 }
 
+static inline int tps65910_reg_read(struct tps65910 *tps65910, u8 reg,
+		unsigned int *val)
+{
+	return regmap_read(tps65910->regmap, reg, val);
+}
+
+static inline int tps65910_reg_write(struct tps65910 *tps65910, u8 reg,
+		unsigned int val)
+{
+	return regmap_write(tps65910->regmap, reg, val);
+}
+
+static inline int tps65910_reg_set_bits(struct tps65910 *tps65910, u8 reg,
+		u8 mask)
+{
+	return regmap_update_bits(tps65910->regmap, reg, mask, mask);
+}
+
+static inline int tps65910_reg_clear_bits(struct tps65910 *tps65910, u8 reg,
+		u8 mask)
+{
+	return regmap_update_bits(tps65910->regmap, reg, mask, 0);
+}
+
 #endif /*  __LINUX_MFD_TPS65910_H */
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH v3 2/6 regulator: tps65910: Add device tree bindings

In reply to Rhyland Klein

Add device tree bindings for TI's tps65910 pmic.

---
v3: No change since v2.
v2: Moved ext-sleep-control into regulator nodes

 Documentation/devicetree/bindings/mfd/tps65910.txt |  133 ++++++++++++++++++++
 1 files changed, 133 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/tps65910.txt
Documentation/devicetree/bindings/mfd/tps65910.txt new file +133 -0
new file mode 100644
index 0000000..645f5ea
@@ -0,0 +1,133 @@
+TPS65910 Power Management Integrated Circuit
+
+Required properties:
+- compatible: "ti,tps65910" or "ti,tps65911"
+- reg: I2C slave address
+- interrupts: the interrupt outputs of the controller
+- #gpio-cells: number of cells to describe a GPIO, this should be 2.
+  The first cell is the GPIO number.
+  The second cell is used to specify additional options <unused>.
+- gpio-controller: mark the device as a GPIO controller
+- #interrupt-cells: the number of cells to describe an IRQ, this should be 2.
+  The first cell is the IRQ number.
+  The second cell is the flags, encoded as the trigger masks from
+  Documentation/devicetree/bindings/interrupts.txt
+- 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:
+  tps65910: vrtc, vio, vdd1, vdd2, vdd3, vdig1, vdig2, vpll, vdac, vaux1,
+            vaux2, vaux33, vmmc
+  tps65911: vrtc, vio, vdd1, vdd3, vddctrl, ldo1, ldo2, ldo3, ldo4, ldo5,
+            ldo6, ldo7, ldo8
+
+Optional properties:
+- ti,vmbch-threshold: (tps65911) main battery charged threshold
+  comparator. (see VMBCH_VSEL in TPS65910 datasheet)
+- ti,vmbch2-threshold: (tps65911) main battery discharged threshold
+  comparator. (see VMBCH_VSEL in TPS65910 datasheet)
+- ti,en-gpio-sleep: enable sleep control for gpios
+  There should be 9 entries here, one for each gpio.
+
+Regulator Optional properties:
+- ti,regulator-ext-sleep-control: enable external sleep
+  control through external inputs [0 (not enabled), 1 (EN1), 2 (EN2) or 4(EN3)]
+  If this property is not defined, it defaults to 0 (not enabled).
+
+Example:
+
+	pmu: tps65910@d2 {
+		compatible = "ti,tps65910";
+		reg = <0xd2>;
+		interrupt-parent = <&intc>;
+		interrupts = < 0 118 0x04 >;
+
+		#gpio-cells = <2>;
+		gpio-controller;
+
+		#interrupt-cells = <2>;
+		interrupt-controller;
+
+		ti,vmbch-threshold = 0;
+		ti,vmbch2-threshold = 0;
+
+		ti,en-gpio-sleep = <0 0 1 0 0 0 0 0 0>;
+
+		regulators {
+			vdd1_reg: vdd1 {
+				regulator-min-microvolt = < 600000>;
+				regulator-max-microvolt = <1500000>;
+				regulator-always-on;
+				regulator-boot-on;
+				ti,regulator-ext-sleep-control = <0>;
+			};
+			vdd2_reg: vdd2 {
+				regulator-min-microvolt = < 600000>;
+				regulator-max-microvolt = <1500000>;
+				regulator-always-on;
+				regulator-boot-on;
+				ti,regulator-ext-sleep-control = <4>;
+			};
+			vddctrl_reg: vddctrl {
+				regulator-min-microvolt = < 600000>;
+				regulator-max-microvolt = <1400000>;
+				regulator-always-on;
+				regulator-boot-on;
+				ti,regulator-ext-sleep-control = <0>;
+			};
+			vio_reg: vio {
+				regulator-min-microvolt = <1500000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+				regulator-boot-on;
+				ti,regulator-ext-sleep-control = <1>;
+			};
+			ldo1_reg: ldo1 {
+				regulator-min-microvolt = <1000000>;
+				regulator-max-microvolt = <3300000>;
+				ti,regulator-ext-sleep-control = <0>;
+			};
+			ldo2_reg: ldo2 {
+				regulator-min-microvolt = <1050000>;
+				regulator-max-microvolt = <1050000>;
+				ti,regulator-ext-sleep-control = <0>;
+			};
+			ldo3_reg: ldo3 {
+				regulator-min-microvolt = <1000000>;
+				regulator-max-microvolt = <3300000>;
+				ti,regulator-ext-sleep-control = <0>;
+			};
+			ldo4_reg: ldo4 {
+				regulator-min-microvolt = <1000000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+				ti,regulator-ext-sleep-control = <0>;
+			};
+			ldo5_reg: ldo5 {
+				regulator-min-microvolt = <1000000>;
+				regulator-max-microvolt = <3300000>;
+				ti,regulator-ext-sleep-control = <0>;
+			};
+			ldo6_reg: ldo6 {
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+				ti,regulator-ext-sleep-control = <0>;
+			};
+			ldo7_reg: ldo7 {
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+				regulator-always-on;
+				regulator-boot-on;
+				ti,regulator-ext-sleep-control = <1>;
+			};
+			ldo8_reg: ldo8 {
+				regulator-min-microvolt = <1000000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+				ti,regulator-ext-sleep-control = <1>;
+			};
+		};
+	};
Signature · 1 line
1.7.0.4
#3 lore raw

PATCH v3 3/6 mfd: tps65910: Add device-tree support

In reply to Rhyland Klein

Add device tree based initialization support for TI's tps65910 pmic.

---
v3: no change since v2.
v2: split mfd portion into single change to add dt support
added of_node to config before calling regulator_register removed passing pdata to mfd_cell child devices removed use_dt_for_init_data flag

 drivers/mfd/tps65910.c |   80 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 79 insertions(+), 1 deletions(-)
drivers/mfd/tps65910.c +79 -1
index f221153..4b52e95 100644
@@ -23,6 +23,7 @@
 #include <linux/mfd/core.h>
 #include <linux/regmap.h>
 #include <linux/mfd/tps65910.h>
+#include <linux/of_device.h>
 
 static struct mfd_cell tps65910s[] = {
 	{
@@ -129,6 +130,77 @@ err_sleep_init:
 	return ret;
 }
 
+#ifdef CONFIG_OF
+static struct of_device_id tps65910_of_match[] = {
+	{ .compatible = "ti,tps65910", .data = (void *)TPS65910},
+	{ .compatible = "ti,tps65911", .data = (void *)TPS65911},
+	{ },
+};
+MODULE_DEVICE_TABLE(of, tps65910_of_match);
+
+static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
+						int *chip_id)
+{
+	struct device_node *np = client->dev.of_node;
+	struct tps65910_board *board_info;
+	unsigned int prop;
+	const struct of_device_id *match;
+	unsigned int prop_array[TPS6591X_MAX_NUM_GPIO];
+	int ret = 0;
+	int idx;
+
+	match = of_match_device(tps65910_of_match, &client->dev);
+	if (!match) {
+		dev_err(&client->dev, "Failed to find matching dt id\n");
+		return NULL;
+	}
+
+	*chip_id  = (int)match->data;
+
+	board_info = devm_kzalloc(&client->dev, sizeof(*board_info),
+			GFP_KERNEL);
+	if (!board_info) {
+		dev_err(&client->dev, "Failed to allocate pdata\n");
+		return NULL;
+	}
+
+	ret = of_property_read_u32(np, "ti,vmbch-threshold", &prop);
+	if (!ret)
+		board_info->vmbch_threshold = prop;
+	else if (*chip_id == TPS65911)
+		dev_warn(&client->dev, "VMBCH-Threshold not specified");
+
+	ret = of_property_read_u32(np, "ti,vmbch2-threshold", &prop);
+	if (!ret)
+		board_info->vmbch2_threshold = prop;
+	else if (*chip_id == TPS65911)
+		dev_warn(&client->dev, "VMBCH2-Threshold not specified");
+
+	ret = of_property_read_u32_array(np, "ti,en-gpio-sleep",
+				   prop_array, TPS6591X_MAX_NUM_GPIO);
+	if (!ret)
+		for (idx = 0; idx < ARRAY_SIZE(prop_array); idx++)
+			board_info->en_gpio_sleep[idx] = (prop_array[idx] != 0);
+	else if (ret != -EINVAL) {
+		dev_err(&client->dev,
+			"error reading property ti,en-gpio-sleep: %d\n.", ret);
+		return NULL;
+	}
+
+
+	board_info->irq = client->irq;
+	board_info->irq_base = -1;
+	board_info->gpio_base = -1;
+
+	return board_info;
+}
+#else
+static inline struct tps65910_board *tps65910_parse_dt(
+					struct i2c_client *client)
+{
+	return NULL;
+}
+#endif
 
 static int tps65910_i2c_probe(struct i2c_client *i2c,
 			    const struct i2c_device_id *id)
@@ -137,8 +209,13 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
 	struct tps65910_board *pmic_plat_data;
 	struct tps65910_platform_data *init_data;
 	int ret = 0;
+	int chip_id = id->driver_data;
 
 	pmic_plat_data = dev_get_platdata(&i2c->dev);
+
+	if (!pmic_plat_data && i2c->dev.of_node)
+		pmic_plat_data = tps65910_parse_dt(i2c, &chip_id);
+
 	if (!pmic_plat_data)
 		return -EINVAL;
 
@@ -155,7 +232,7 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
 	i2c_set_clientdata(i2c, tps65910);
 	tps65910->dev = &i2c->dev;
 	tps65910->i2c_client = i2c;
-	tps65910->id = id->driver_data;
+	tps65910->id = chip_id;
 	mutex_init(&tps65910->io_mutex);
 
 	tps65910->regmap = regmap_init_i2c(i2c, &tps65910_regmap_config);
@@ -215,6 +292,7 @@ static struct i2c_driver tps65910_i2c_driver = {
 	.driver = {
 		   .name = "tps65910",
 		   .owner = THIS_MODULE,
+		   .of_match_table = of_match_ptr(tps65910_of_match),
 	},
 	.probe = tps65910_i2c_probe,
 	.remove = tps65910_i2c_remove,
Signature · 1 line
1.7.0.4
#4 lore raw

PATCH v3 4/6 regulator: tps65910 regulator: add device tree support

In reply to Rhyland Klein

Add devicetree based initialization support for TI tps65910 regulators.

---
v3: Modified to use new api of_regulator_match to fetch all regulator
init data from device node.

v2: split off regulator specific dt initialization

 drivers/regulator/tps65910-regulator.c |  108 ++++++++++++++++++++++++++++++++
 1 files changed, 108 insertions(+), 0 deletions(-)
drivers/regulator/tps65910-regulator.c +108 -0
index 09fb5cd..67791e1 100644
@@ -23,6 +23,7 @@
 #include <linux/slab.h>
 #include <linux/gpio.h>
 #include <linux/mfd/tps65910.h>
+#include <linux/regulator/of_regulator.h>
 
 #define TPS65910_SUPPLY_STATE_ENABLED	0x1
 #define EXT_SLEEP_CONTROL (TPS65910_SLEEP_CONTROL_EXT_INPUT_EN1 |	\
@@ -1047,6 +1048,105 @@ static int tps65910_set_ext_sleep_config(struct tps65910_reg *pmic,
 	return ret;
 }
 
+#ifdef CONFIG_OF
+
+static struct of_regulator_match tps65910_matches[] = {
+	{ .name = "VRTC",	.driver_data = (void *) &tps65910_regs[0] },
+	{ .name = "VIO",	.driver_data = (void *) &tps65910_regs[1] },
+	{ .name = "VDD1",	.driver_data = (void *) &tps65910_regs[2] },
+	{ .name = "VDD2",	.driver_data = (void *) &tps65910_regs[3] },
+	{ .name = "VDD3",	.driver_data = (void *) &tps65910_regs[4] },
+	{ .name = "VDIG1",	.driver_data = (void *) &tps65910_regs[5] },
+	{ .name = "VDIG2",	.driver_data = (void *) &tps65910_regs[6] },
+	{ .name = "VPLL",	.driver_data = (void *) &tps65910_regs[7] },
+	{ .name = "VDAC",	.driver_data = (void *) &tps65910_regs[8] },
+	{ .name = "VAUX1",	.driver_data = (void *) &tps65910_regs[9] },
+	{ .name = "VAUX2",	.driver_data = (void *) &tps65910_regs[10] },
+	{ .name = "VAUX33",	.driver_data = (void *) &tps65910_regs[11] },
+	{ .name = "VMMC",	.driver_data = (void *) &tps65910_regs[12] },
+};
+
+static struct of_regulator_match tps65911_matches[] = {
+	{ .name = "VRTC",	.driver_data = (void *) &tps65911_regs[0] },
+	{ .name = "VIO",	.driver_data = (void *) &tps65911_regs[1] },
+	{ .name = "VDD1",	.driver_data = (void *) &tps65911_regs[2] },
+	{ .name = "VDD2",	.driver_data = (void *) &tps65911_regs[3] },
+	{ .name = "VDDCTRL",	.driver_data = (void *) &tps65911_regs[4] },
+	{ .name = "LDO1",	.driver_data = (void *) &tps65911_regs[5] },
+	{ .name = "LDO2",	.driver_data = (void *) &tps65911_regs[6] },
+	{ .name = "LDO3",	.driver_data = (void *) &tps65911_regs[7] },
+	{ .name = "LDO4",	.driver_data = (void *) &tps65911_regs[8] },
+	{ .name = "LDO5",	.driver_data = (void *) &tps65911_regs[9] },
+	{ .name = "LDO6",	.driver_data = (void *) &tps65911_regs[10] },
+	{ .name = "LDO7",	.driver_data = (void *) &tps65911_regs[11] },
+	{ .name = "LDO8",	.driver_data = (void *) &tps65911_regs[12] },
+};
+
+static struct tps65910_board *tps65910_parse_dt_reg_data(
+				struct platform_device *pdev)
+{
+	struct tps65910_board *pmic_plat_data;
+	struct tps65910 *tps65910 = dev_get_drvdata(pdev->dev.parent);
+	struct device_node *np = pdev->dev.parent->of_node;
+	struct device_node *regulators;
+	struct of_regulator_match *matches;
+	unsigned int prop;
+	int idx = 0, ret, count;
+
+	pmic_plat_data = devm_kzalloc(&pdev->dev, sizeof(*pmic_plat_data),
+					GFP_KERNEL);
+
+	if (!pmic_plat_data) {
+		dev_err(&pdev->dev, "Failure to alloc pdata for regulators.\n");
+		return NULL;
+	}
+
+	regulators = of_find_node_by_name(np, "regulators");
+
+	switch (tps65910_chip_id(tps65910)) {
+	case TPS65910:
+		count = ARRAY_SIZE(tps65910_matches);
+		matches = tps65910_matches;
+		break;
+	case TPS65911:
+		count = ARRAY_SIZE(tps65911_matches);
+		matches = tps65911_matches;
+		break;
+	default:
+		pr_err("Invalid tps chip version\n");
+		return NULL;
+	}
+
+	ret = of_regulator_match(pdev->dev.parent, regulators, matches, count);
+	if (ret < 0) {
+		dev_err(&pdev->dev, "Error parsing regulator init data: %d\n",
+			ret);
+		return NULL;
+	}
+
+	for (idx = 0; idx < count; idx++) {
+		if (!matches[idx].init_data || !matches[idx].of_node)
+			continue;
+
+		pmic_plat_data->tps65910_pmic_init_data[idx] =
+							matches[idx].init_data;
+
+		ret = of_property_read_u32(matches[idx].of_node,
+				"ti,regulator-ext-sleep-control", &prop);
+		if (!ret)
+			pmic_plat_data->regulator_ext_sleep_control[idx] = prop;
+	}
+
+	return pmic_plat_data;
+}
+#else
+static inline struct tps65910_board *tps65910_parse_dt_reg_data(
+				struct platform_device *pdev)
+{
+	return 0;
+}
+#endif
+
 static __devinit int tps65910_probe(struct platform_device *pdev)
 {
 	struct tps65910 *tps65910 = dev_get_drvdata(pdev->dev.parent);
@@ -1059,6 +1159,9 @@ static __devinit int tps65910_probe(struct platform_device *pdev)
 	int i, err;
 
 	pmic_plat_data = dev_get_platdata(tps65910->dev);
+	if (!pmic_plat_data && tps65910->dev->of_node)
+		pmic_plat_data = tps65910_parse_dt_reg_data(pdev);
+
 	if (!pmic_plat_data)
 		return -EINVAL;
 
@@ -1166,6 +1269,11 @@ static __devinit int tps65910_probe(struct platform_device *pdev)
 		config.driver_data = pmic;
 		config.regmap = tps65910->regmap;
 
+#ifdef CONFIG_OF
+		config.of_node = of_find_node_by_name(tps65910->dev->of_node,
+							info->name);
+#endif
+
 		rdev = regulator_register(&pmic->desc[i], &config);
 		if (IS_ERR(rdev)) {
 			dev_err(tps65910->dev,
Signature · 1 line
1.7.0.4
Applied
#5 lore raw

Re: [PATCH 4/6 v3] regulator: tps65910 regulator: add device tree support

Quoted 1 line · Rhyland Klein

Add devicetree based initialization support for TI tps65910 regulators.

Applied, thanks.

#6 lore raw

PATCH v3 5/6 mfd: tps65910-irq: Add devicetree init support

In reply to Rhyland Klein

Add support for initializing when boot using devicetree. The main difference is that the irq_base will not be setup, so it needs to be manually handled.

---
v3: no change from v2.
v2: split off irq specific changes based on previous review comments.

 drivers/mfd/tps65910-irq.c |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)
drivers/mfd/tps65910-irq.c +15 -6
index 0f1ff7f..066a30f 100644
@@ -180,12 +180,6 @@ int tps65910_irq_init(struct tps65910 *tps65910, int irq,
 		return -EINVAL;
 	}
 
-	tps65910->irq_mask = 0xFFFFFF;
-
-	mutex_init(&tps65910->irq_lock);
-	tps65910->chip_irq = irq;
-	tps65910->irq_base = pdata->irq_base;
-
 	switch (tps65910_chip_id(tps65910)) {
 	case TPS65910:
 		tps65910->irq_num = TPS65910_NUM_IRQ;
@@ -195,6 +189,21 @@ int tps65910_irq_init(struct tps65910 *tps65910, int irq,
 		break;
 	}
 
+	if (pdata->irq_base <= 0)
+		pdata->irq_base = irq_alloc_descs(-1, 0, tps65910->irq_num, -1);
+
+	if (pdata->irq_base <= 0) {
+		dev_err(tps65910->dev, "Failed to allocate irq descs: %d\n",
+			pdata->irq_base);
+		return pdata->irq_base;
+	}
+
+	tps65910->irq_mask = 0xFFFFFF;
+
+	mutex_init(&tps65910->irq_lock);
+	tps65910->chip_irq = irq;
+	tps65910->irq_base = pdata->irq_base;
+
 	/* Register with genirq */
 	for (cur_irq = tps65910->irq_base;
 	     cur_irq < tps65910->irq_num + tps65910->irq_base;
Signature · 1 line
1.7.0.4
#7 lore raw

Re: [PATCH 5/6 v3] mfd: tps65910-irq: Add devicetree init support

drivers/mfd/tps65910-irq.c int tps65910_irq_init(struct tps65910 *tps65910, int irq, · line 199

Quoted 8 lines · Rhyland Klein
drivers/mfd/tps65910-irq.c +8 -0
+	if (pdata->irq_base <= 0)
+		pdata->irq_base = irq_alloc_descs(-1, 0, tps65910->irq_num, -1);
+
+	if (pdata->irq_base <= 0) {
+		dev_err(tps65910->dev, "Failed to allocate irq descs: %d\n",
+			pdata->irq_base);
+		return pdata->irq_base;
+	}

I'd expect the driver to always call irq_alloc_descs() but to use the value specified in platform data if there is any. This is the normal way of doing things, anyway.

#8 lore raw

Re: [PATCH 5/6 v3] mfd: tps65910-irq: Add devicetree init support

Quoted 4 lines · Mark Brown

* PGP Signed by an unknown key

On Tue, May 08, 2012 at 11:42:42AM -0700, Rhyland Klein wrote:

Quoted 13 lines

drivers/mfd/tps65910-irq.c int tps65910_irq_init(struct tps65910 *tps65910, int irq, · line 199

Quoted 8 lines
drivers/mfd/tps65910-irq.c +8 -0
+	if (pdata->irq_base <= 0)
+		pdata->irq_base = irq_alloc_descs(-1, 0, tps65910->irq_num, -1);
+
+	if (pdata->irq_base <= 0) {
+		dev_err(tps65910->dev, "Failed to allocate irq descs: %d\n",
+			pdata->irq_base);
+		return pdata->irq_base;
+	}

I'd expect the driver to always call irq_alloc_descs() but to use the value specified in platform data if there is any. This is the normal way of doing things, anyway.

Is this more what you would expect? If the dt code initialized the irq_base to 0 instead of -1 then this should also work.

pdata->irq_base = irq_alloc_descs(-1, pdata->irq_base,

			tps65910->irq_num, -1);
if (pdata->irq_base <= 0) {
	dev_err(tps65910->dev, "Failed to allocate irq descs: %d\n",
		pdata->irq_base);
	return pdata->irq_base;
}
Quoted 2 lines

* Unknown Key
* 0x6E30FDDD

Signature · 1 line
nvpublic
#9 lore raw

Re: [PATCH 5/6 v3] mfd: tps65910-irq: Add devicetree init support

Quoted 10 lines · Rhyland Klein

Is this more what you would expect? If the dt code initialized the irq_base to 0 instead of -1 then this should also work.

pdata->irq_base = irq_alloc_descs(-1, pdata->irq_base,

			tps65910->irq_num, -1);
if (pdata->irq_base <= 0) {
	dev_err(tps65910->dev, "Failed to allocate irq descs: %d\n",
		pdata->irq_base);
	return pdata->irq_base;
}

More like:

	if (pdata->irq_base)
		base = pdata->irq_base;
	else
		base = 0;
	pdata->irq_base = irq_alloc_descs(base, 0,
#10 lore raw

Re: [PATCH 5/6 v3] mfd: tps65910-irq: Add devicetree init support

Quoted 15 lines · Mark Brown

* PGP Signed by an unknown key

Quoted 10 lines · Rhyland Klein

Is this more what you would expect? If the dt code initialized the irq_base to 0 instead of -1 then this should also work.

pdata->irq_base = irq_alloc_descs(-1, pdata->irq_base,

			tps65910->irq_num, -1);
if (pdata->irq_base <= 0) {
	dev_err(tps65910->dev, "Failed to allocate irq descs: %d\n",
		pdata->irq_base);
	return pdata->irq_base;
}
Quoted 7 lines

More like:

	if (pdata->irq_base)
		base = pdata->irq_base;
	else
		base = 0;
	pdata->irq_base = irq_alloc_descs(base, 0,

Alright, will do in next round of changes.

Quoted 3 lines

* Unknown Key
* 0x6E30FDDD

Signature · 1 line
nvpublic
#11 lore raw

Re: [PATCH 5/6 v3] mfd: tps65910-irq: Add devicetree init support

In reply to Mark Brown
Quoted 14 lines · Mark Brown

drivers/mfd/tps65910-irq.c int tps65910_irq_init(struct tps65910 *tps65910, int irq, · line 199

Quoted 8 lines · Rhyland Klein
drivers/mfd/tps65910-irq.c +8 -0
+	if (pdata->irq_base <= 0)
+		pdata->irq_base = irq_alloc_descs(-1, 0, tps65910->irq_num, -1);
+
+	if (pdata->irq_base <= 0) {
+		dev_err(tps65910->dev, "Failed to allocate irq descs: %d\n",
+			pdata->irq_base);
+		return pdata->irq_base;
+	}

I'd expect the driver to always call irq_alloc_descs() but to use the value specified in platform data if there is any. This is the normal way of doing things, anyway.

More importantly, the driver should be converted to use an irq_domain and remove the custom irq_to_tps65910_irq function. irq_find_mapping() handles the hwirq --> irq lookup and irq_data->hwirq will always give you the controller's irq number.

When irq_base is -1, then use irq_domain_add_linear() which will also manage irq_desc allocations for you. If the driver requires a specific irq_base then the descs still need to be manually allocated and use an irq_domain_add_legacy() to set it up. (this is sub-optimal though; I hope to have a better solution for legacy that also manages desc allocations just like the other mappings; maybe in the 3.6 timeframe).

g.

Signature · 2 lines
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.
#12 lore raw

PATCH v3 6/6 ARM: Tegra: Add support for TPS65910 PMIC

In reply to Rhyland Klein

Add support for the tps65910 pmic on cardhu.

---
v3: no change from v2.
v2: updated to move ext-sleep-control into the regulator nodes

 arch/arm/boot/dts/tegra-cardhu.dts |   91 ++++++++++++++++++++++++++++++++++++
 1 files changed, 91 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra-cardhu.dts +91 -0
index facb950..ae1afe9 100644
@@ -123,6 +123,97 @@
 			micdet-delay = <100>;
 			gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>;
 		};
+
+		pmic: tps65911@2d {
+			compatible = "ti,tps65911";
+			reg = <0x2d>;
+			interrupts = < 0 118 0x04 >;
+
+			#gpio-cells = <2>;
+			gpio-controller;
+
+			#interrupt-cells = <2>;
+			interrupt-controller;
+
+			ti,vmbch-threshold = <0>;
+			ti,vmbch2-threshold = <0>;
+			ti,en-gpio-sleep = <0 0 1 0 0 0 0 0 0>;
+
+			regulators {
+				vdd1_reg: vdd1 {
+					regulator-min-microvolt = < 600000>;
+					regulator-max-microvolt = <1500000>;
+					regulator-always-on;
+					regulator-boot-on;
+					ti,regulator-ext-sleep-control = <4>;
+				};
+				vdd2_reg: vdd2 {
+					regulator-min-microvolt = < 600000>;
+					regulator-max-microvolt = <1500000>;
+					regulator-always-on;
+					regulator-boot-on;
+					ti,regulator-ext-sleep-control = <0>;
+				};
+				vddctrl_reg: vddctrl {
+					regulator-min-microvolt = < 600000>;
+					regulator-max-microvolt = <1400000>;
+					regulator-always-on;
+					regulator-boot-on;
+					ti,regulator-ext-sleep-control = <1>;
+				};
+				vio_reg: vio {
+					regulator-min-microvolt = <1500000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+					regulator-boot-on;
+					ti,regulator-ext-sleep-control = <0>;
+				};
+				ldo1_reg: ldo1 {
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <3300000>;
+					ti,regulator-ext-sleep-control = <0>;
+				};
+				ldo2_reg: ldo2 {
+					regulator-min-microvolt = <1050000>;
+					regulator-max-microvolt = <1050000>;
+					ti,regulator-ext-sleep-control = <0>;
+				};
+				ldo3_reg: ldo3 {
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <3300000>;
+					ti,regulator-ext-sleep-control = <0>;
+				};
+				ldo4_reg: ldo4 {
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <3300000>;
+					regulator-always-on;
+					ti,regulator-ext-sleep-control = <0>;
+				};
+				ldo5_reg: ldo5 {
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <3300000>;
+					ti,regulator-ext-sleep-control = <0>;
+				};
+				ldo6_reg: ldo6 {
+					regulator-min-microvolt = <1200000>;
+					regulator-max-microvolt = <1200000>;
+					ti,regulator-ext-sleep-control = <0>;
+				};
+				ldo7_reg: ldo7 {
+					regulator-min-microvolt = <1200000>;
+					regulator-max-microvolt = <1200000>;
+					regulator-always-on;
+					regulator-boot-on;
+					ti,regulator-ext-sleep-control = <1>;
+				};
+				ldo8_reg: ldo8 {
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <3300000>;
+					regulator-always-on;
+					ti,regulator-ext-sleep-control = <1>;
+				};
+			};
+		};
 	};
 
 	sdhci@78000000 {
Signature · 1 line
1.7.0.4
#13 lore raw

Re: [PATCH 6/6 v3] ARM: Tegra: Add support for TPS65910 PMIC

Quoted 1 line · Rhyland Klein

Add support for the tps65910 pmic on cardhu.

Lets ignore this one patch for now; it's not clear whether Cardhu should instantiate the TPS65910 or TPS62360 PMU; apparently different Cardhu variants have one, the other, or even both. I'm trying to find out which variant(s) is/are useful to support.

But this has no effect on the other patches in this series.

#14 lore raw

Re: [PATCH 6/6 v3] ARM: Tegra: Add support for TPS65910 PMIC

Quoted 7 lines · Stephen Warren
Quoted 1 line · Rhyland Klein

Add support for the tps65910 pmic on cardhu.

Lets ignore this one patch for now; it's not clear whether Cardhu should instantiate the TPS65910 or TPS62360 PMU; apparently different Cardhu variants have one, the other, or even both. I'm trying to find out which variant(s) is/are useful to support.

IIRC it's the same as Whistler was and even more fun that that - you might have random PMIC boards appearing from random places and can't rely on what's on the system at all! See the thread I started about plugin modules the other day :)

#15 lore raw

Re: [PATCH 6/6 v3] ARM: Tegra: Add support for TPS65910 PMIC

Quoted 9 lines · Mark Brown
Quoted 7 lines · Stephen Warren
Quoted 1 line · Rhyland Klein

Add support for the tps65910 pmic on cardhu.

Lets ignore this one patch for now; it's not clear whether Cardhu should instantiate the TPS65910 or TPS62360 PMU; apparently different Cardhu variants have one, the other, or even both. I'm trying to find out which variant(s) is/are useful to support.

Quoted 4 lines

IIRC it's the same as Whistler was and even more fun that that - you might have random PMIC boards appearing from random places and can't rely on what's on the system at all! See the thread I started about plugin modules the other day :)

I think you're thinking of some other board. Cardhu is a tablet reference platform without pluggable modules, and I believe the PMIC mess is just due to some rework in later board revisions to solve some under-power issues in the earlier variants. But I believe there is some Tegra30 reference board equivalent to Whistler with all kinds of pluggable modules, although I haven't touched one yet, and don't recall its name.

#16 lore raw

Re: [PATCH 6/6 v3] ARM: Tegra: Add support for TPS65910 PMIC

Quoted 4 lines · Stephen Warren

under-power issues in the earlier variants. But I believe there is some Tegra30 reference board equivalent to Whistler with all kinds of pluggable modules, although I haven't touched one yet, and don't recall its name.

It's called Verbier I believe.

#17 lore raw
In reply to Rhyland Klein
Quoted 1 line · Rhyland Klein

mfd: tps65910-irq: Add devicetree init support

Actually, it's not really relevant to this patch series but looking at the code for the interrupt controller here it looks like it could be done in terms of regmap-irq.

#18 lore raw
In reply to Rhyland Klein

Hi Rhyland,

Quoted 5 lines · Rhyland Klein

This patch set updates the tps65910 driver to boot using devicetree.

This patch set now uses the new addition to the of_regulator code, of_regulator_match to find all the regulator init data for the device.

Quoted 7 lines

Rhyland Klein (6):
mfd: tps65910: Commonize regmap access through header
regulator: tps65910: Add device tree bindings
mfd: tps65910: Add device-tree support
regulator: tps65910 regulator: add device tree support
mfd: tps65910-irq: Add devicetree init support
ARM: Tegra: Add support for TPS65910 PMIC

I applied patches 1,2 and 3 to my for-next branch.
Patch 4 is a regulator one, I assume Mark is going to take it. And patch 5 needs some additional work.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/
#19 lore raw
Quoted 15 lines · Samuel Ortiz

Hi Rhyland,

Quoted 5 lines · Rhyland Klein

This patch set updates the tps65910 driver to boot using devicetree.

This patch set now uses the new addition to the of_regulator code, of_regulator_match to find all the regulator init data for the device.

Quoted 7 lines

Rhyland Klein (6):
mfd: tps65910: Commonize regmap access through header
regulator: tps65910: Add device tree bindings
mfd: tps65910: Add device-tree support
regulator: tps65910 regulator: add device tree support
mfd: tps65910-irq: Add devicetree init support
ARM: Tegra: Add support for TPS65910 PMIC

Quoted 7 lines

I applied patches 1,2 and 3 to my for-next branch.
Patch 4 is a regulator one, I assume Mark is going to take it. And patch 5 needs some additional work.

Cheers,
Samuel.

Thank! I will resend the change for patch 5.

-rhyland

Signature · 1 line
nvpublic