linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] Add device tree support for mc13892 regulator driver
@ 2011-12-21 15:00 Shawn Guo
  2011-12-21 15:00 ` [PATCH 1/4] mfd: improve mc13xxx dt binding document Shawn Guo
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Shawn Guo @ 2011-12-21 15:00 UTC (permalink / raw)
  To: linux-arm-kernel

Changes since v3:
 * The mfd patch in v3 was applied, and it's replaced by a incremental
   patch to improve the binding document in the new series.
 * Add a patch to remove the unnecessary prefix 'MC13892__' from
   regulator name.
 * Adopt the binding and regulator name changes in dts.

Changes since v2:
 * Drop '[PATCH v2 2/4] regulator: pass device_node to
   of_get_regulator_init_data()' which has been picked up by Mark
 * Add a note on how driver matches regulator device and the node in
   binding document

Changes since v1:
 * Drop '[PATCH 2/5] regulator: fix label names used in device tree
   bindings' which has been picked up
 * Add binding document for mfd/mc13xxx-core device tree support
 * Fix regulator/fixed.c breakage caused by interface change on
   of_get_regulator_init_data()
 * Reword the commit message of patch #2 a little bit to make the
   reason for changing clear
 * Retrieve the irq from gpio irq domain

Shawn Guo (4):
      mfd: improve mc13xxx dt binding document
      regulator: mc13892: remove the unnecessary prefix from regulator name
      regulator: mc13892: add device tree probe support
      arm/imx: add mc13892 support into imx51-babbage.dts

 Documentation/devicetree/bindings/mfd/mc13xxx.txt |   31 ++++++-
 arch/arm/boot/dts/imx51-babbage.dts               |   93 ++++++++++++++++++++-
 drivers/regulator/mc13892-regulator.c             |   43 +++++++---
 drivers/regulator/mc13xxx-regulator-core.c        |   57 +++++++++++++
 drivers/regulator/mc13xxx.h                       |   26 +++++-
 include/linux/mfd/mc13xxx.h                       |    1 +
 6 files changed, 232 insertions(+), 19 deletions(-)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4] mfd: improve mc13xxx dt binding document
  2011-12-21 15:00 [PATCH v4 0/4] Add device tree support for mc13892 regulator driver Shawn Guo
@ 2011-12-21 15:00 ` Shawn Guo
  2011-12-22 11:05   ` Mark Brown
  2011-12-22 16:07   ` Samuel Ortiz
  2011-12-21 15:00 ` [PATCH 2/4] regulator: mc13892: remove the unnecessary prefix from regulator name Shawn Guo
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: Shawn Guo @ 2011-12-21 15:00 UTC (permalink / raw)
  To: linux-arm-kernel

It improves mc13xxx dt binding document on how the regulator name
is being used for binding a mc13892 regulator device.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
 Documentation/devicetree/bindings/mfd/mc13xxx.txt |   31 +++++++++++++++++++--
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/mc13xxx.txt b/Documentation/devicetree/bindings/mfd/mc13xxx.txt
index 4ed46a61..19f6af4 100644
--- a/Documentation/devicetree/bindings/mfd/mc13xxx.txt
+++ b/Documentation/devicetree/bindings/mfd/mc13xxx.txt
@@ -10,9 +10,34 @@ Optional properties:
 - fsl,mc13xxx-uses-touch : Indicate the touchscreen controller is being used
 
 Sub-nodes:
-- regulators : Contain the regulator nodes.  The name of regulator node
-  is being used by mc13xxx regulator driver to find the correct relator
-  device.
+- regulators : Contain the regulator nodes.  The MC13892 regulators are
+  bound using their names as listed below with their registers and bits
+  for enabling.
+
+    vcoincell : regulator VCOINCELL (register 13, bit 23)
+    sw1       : regulator SW1	    (register 24, bit 0)
+    sw2       : regulator SW2	    (register 25, bit 0)
+    sw3       : regulator SW3	    (register 26, bit 0)
+    sw4       : regulator SW4	    (register 27, bit 0)
+    swbst     : regulator SWBST	    (register 29, bit 20)
+    vgen1     : regulator VGEN1	    (register 32, bit 0)
+    viohi     : regulator VIOHI	    (register 32, bit 3)
+    vdig      : regulator VDIG	    (register 32, bit 9)
+    vgen2     : regulator VGEN2	    (register 32, bit 12)
+    vpll      : regulator VPLL	    (register 32, bit 15)
+    vusb2     : regulator VUSB2	    (register 32, bit 18)
+    vgen3     : regulator VGEN3	    (register 33, bit 0)
+    vcam      : regulator VCAM	    (register 33, bit 6)
+    vvideo    : regulator VVIDEO    (register 33, bit 12)
+    vaudio    : regulator VAUDIO    (register 33, bit 15)
+    vsd       : regulator VSD	    (register 33, bit 18)
+    gpo1      : regulator GPO1	    (register 34, bit 6)
+    gpo2      : regulator GPO2	    (register 34, bit 8)
+    gpo3      : regulator GPO3	    (register 34, bit 10)
+    gpo4      : regulator GPO4	    (register 34, bit 12)
+    pwgt1spi  : regulator PWGT1SPI  (register 34, bit 15)
+    pwgt2spi  : regulator PWGT2SPI  (register 34, bit 16)
+    vusb      : regulator VUSB	    (register 50, bit 3)
 
   The bindings details of individual regulator device can be found in:
   Documentation/devicetree/bindings/regulator/regulator.txt
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/4] regulator: mc13892: remove the unnecessary prefix from regulator name
  2011-12-21 15:00 [PATCH v4 0/4] Add device tree support for mc13892 regulator driver Shawn Guo
  2011-12-21 15:00 ` [PATCH 1/4] mfd: improve mc13xxx dt binding document Shawn Guo
@ 2011-12-21 15:00 ` Shawn Guo
  2011-12-22 11:08   ` Mark Brown
  2011-12-21 15:00 ` [PATCH 3/4] regulator: mc13892: add device tree probe support Shawn Guo
  2011-12-21 15:00 ` [PATCH 4/4] arm/imx: add mc13892 support into imx51-babbage.dts Shawn Guo
  3 siblings, 1 reply; 11+ messages in thread
From: Shawn Guo @ 2011-12-21 15:00 UTC (permalink / raw)
  To: linux-arm-kernel

It's not really necessary to add a prefix 'MC13892__' for each mc13892
regulator name, since the chip must have been identified as mc13892
when we look at the regulator name.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/regulator/mc13xxx.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/mc13xxx.h b/drivers/regulator/mc13xxx.h
index 2775826..75e3832 100644
--- a/drivers/regulator/mc13xxx.h
+++ b/drivers/regulator/mc13xxx.h
@@ -48,7 +48,7 @@ extern struct regulator_ops mc13xxx_fixed_regulator_ops;
 #define MC13xxx_DEFINE(prefix, _name, _reg, _vsel_reg, _voltages, _ops)	\
 	[prefix ## _name] = {				\
 		.desc = {						\
-			.name = #prefix "_" #_name,			\
+			.name = #_name,					\
 			.n_voltages = ARRAY_SIZE(_voltages),		\
 			.ops = &_ops,			\
 			.type = REGULATOR_VOLTAGE,			\
@@ -66,7 +66,7 @@ extern struct regulator_ops mc13xxx_fixed_regulator_ops;
 #define MC13xxx_FIXED_DEFINE(prefix, _name, _reg, _voltages, _ops)	\
 	[prefix ## _name] = {				\
 		.desc = {						\
-			.name = #prefix "_" #_name,			\
+			.name = #_name,					\
 			.n_voltages = ARRAY_SIZE(_voltages),		\
 			.ops = &_ops,		\
 			.type = REGULATOR_VOLTAGE,			\
@@ -81,7 +81,7 @@ extern struct regulator_ops mc13xxx_fixed_regulator_ops;
 #define MC13xxx_GPO_DEFINE(prefix, _name, _reg,  _voltages, _ops)	\
 	[prefix ## _name] = {				\
 		.desc = {						\
-			.name = #prefix "_" #_name,			\
+			.name = #_name,					\
 			.n_voltages = ARRAY_SIZE(_voltages),		\
 			.ops = &_ops,		\
 			.type = REGULATOR_VOLTAGE,			\
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/4] regulator: mc13892: add device tree probe support
  2011-12-21 15:00 [PATCH v4 0/4] Add device tree support for mc13892 regulator driver Shawn Guo
  2011-12-21 15:00 ` [PATCH 1/4] mfd: improve mc13xxx dt binding document Shawn Guo
  2011-12-21 15:00 ` [PATCH 2/4] regulator: mc13892: remove the unnecessary prefix from regulator name Shawn Guo
@ 2011-12-21 15:00 ` Shawn Guo
  2011-12-22 11:08   ` Mark Brown
  2011-12-21 15:00 ` [PATCH 4/4] arm/imx: add mc13892 support into imx51-babbage.dts Shawn Guo
  3 siblings, 1 reply; 11+ messages in thread
From: Shawn Guo @ 2011-12-21 15:00 UTC (permalink / raw)
  To: linux-arm-kernel

It adds device tree probe support for mc13892-regulator driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>
---
 drivers/regulator/mc13892-regulator.c      |   43 +++++++++++++++-----
 drivers/regulator/mc13xxx-regulator-core.c |   57 ++++++++++++++++++++++++++++
 drivers/regulator/mc13xxx.h                |   20 ++++++++++
 include/linux/mfd/mc13xxx.h                |    1 +
 4 files changed, 110 insertions(+), 11 deletions(-)

diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c
index 2824804..46bfa4a 100644
--- a/drivers/regulator/mc13892-regulator.c
+++ b/drivers/regulator/mc13892-regulator.c
@@ -527,18 +527,27 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev)
 	struct mc13xxx *mc13892 = dev_get_drvdata(pdev->dev.parent);
 	struct mc13xxx_regulator_platform_data *pdata =
 		dev_get_platdata(&pdev->dev);
-	struct mc13xxx_regulator_init_data *init_data;
+	struct mc13xxx_regulator_init_data *mc13xxx_data;
 	int i, ret;
+	int num_regulators = 0;
 	u32 val;
 
+	num_regulators = mc13xxx_get_num_regulators_dt(pdev);
+	if (num_regulators <= 0 && pdata)
+		num_regulators = pdata->num_regulators;
+	if (num_regulators <= 0)
+		return -EINVAL;
+
 	priv = kzalloc(sizeof(*priv) +
-		pdata->num_regulators * sizeof(priv->regulators[0]),
+		num_regulators * sizeof(priv->regulators[0]),
 		GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
 
+	priv->num_regulators = num_regulators;
 	priv->mc13xxx_regulators = mc13892_regulators;
 	priv->mc13xxx = mc13892;
+	platform_set_drvdata(pdev, priv);
 
 	mc13xxx_lock(mc13892);
 	ret = mc13xxx_reg_read(mc13892, MC13892_REVISION, &val);
@@ -569,11 +578,27 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev)
 		= mc13892_vcam_set_mode;
 	mc13892_regulators[MC13892_VCAM].desc.ops->get_mode
 		= mc13892_vcam_get_mode;
-	for (i = 0; i < pdata->num_regulators; i++) {
-		init_data = &pdata->regulators[i];
+
+	mc13xxx_data = mc13xxx_parse_regulators_dt(pdev, mc13892_regulators,
+					ARRAY_SIZE(mc13892_regulators));
+	for (i = 0; i < num_regulators; i++) {
+		struct regulator_init_data *init_data;
+		struct regulator_desc *desc;
+		struct device_node *node = NULL;
+		int id;
+
+		if (mc13xxx_data) {
+			id = mc13xxx_data[i].id;
+			init_data = mc13xxx_data[i].init_data;
+			node = mc13xxx_data[i].node;
+		} else {
+			id = pdata->regulators[i].id;
+			init_data = pdata->regulators[i].init_data;
+		}
+		desc = &mc13892_regulators[id].desc;
+
 		priv->regulators[i] = regulator_register(
-			&mc13892_regulators[init_data->id].desc,
-			&pdev->dev, init_data->init_data, priv, NULL);
+			desc, &pdev->dev, init_data, priv, node);
 
 		if (IS_ERR(priv->regulators[i])) {
 			dev_err(&pdev->dev, "failed to register regulator %s\n",
@@ -583,8 +608,6 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev)
 		}
 	}
 
-	platform_set_drvdata(pdev, priv);
-
 	return 0;
 err:
 	while (--i >= 0)
@@ -600,13 +623,11 @@ err_free:
 static int __devexit mc13892_regulator_remove(struct platform_device *pdev)
 {
 	struct mc13xxx_regulator_priv *priv = platform_get_drvdata(pdev);
-	struct mc13xxx_regulator_platform_data *pdata =
-		dev_get_platdata(&pdev->dev);
 	int i;
 
 	platform_set_drvdata(pdev, NULL);
 
-	for (i = 0; i < pdata->num_regulators; i++)
+	for (i = 0; i < priv->num_regulators; i++)
 		regulator_unregister(priv->regulators[i]);
 
 	kfree(priv);
diff --git a/drivers/regulator/mc13xxx-regulator-core.c b/drivers/regulator/mc13xxx-regulator-core.c
index 6532853..80ecafe 100644
--- a/drivers/regulator/mc13xxx-regulator-core.c
+++ b/drivers/regulator/mc13xxx-regulator-core.c
@@ -18,12 +18,14 @@
 #include <linux/mfd/mc13xxx.h>
 #include <linux/regulator/machine.h>
 #include <linux/regulator/driver.h>
+#include <linux/regulator/of_regulator.h>
 #include <linux/platform_device.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/err.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include "mc13xxx.h"
 
 static int mc13xxx_regulator_enable(struct regulator_dev *rdev)
@@ -236,6 +238,61 @@ int mc13xxx_sw_regulator_is_enabled(struct regulator_dev *rdev)
 }
 EXPORT_SYMBOL_GPL(mc13xxx_sw_regulator_is_enabled);
 
+#ifdef CONFIG_OF
+int __devinit mc13xxx_get_num_regulators_dt(struct platform_device *pdev)
+{
+	struct device_node *parent, *child;
+	int num = 0;
+
+	of_node_get(pdev->dev.parent->of_node);
+	parent = of_find_node_by_name(pdev->dev.parent->of_node, "regulators");
+	if (!parent)
+		return -ENODEV;
+
+	for_each_child_of_node(parent, child)
+		num++;
+
+	return num;
+}
+
+struct mc13xxx_regulator_init_data * __devinit mc13xxx_parse_regulators_dt(
+	struct platform_device *pdev, struct mc13xxx_regulator *regulators,
+	int num_regulators)
+{
+	struct mc13xxx_regulator_priv *priv = platform_get_drvdata(pdev);
+	struct mc13xxx_regulator_init_data *data, *p;
+	struct device_node *parent, *child;
+	int i;
+
+	of_node_get(pdev->dev.parent->of_node);
+	parent = of_find_node_by_name(pdev->dev.parent->of_node, "regulators");
+	if (!parent)
+		return NULL;
+
+	data = devm_kzalloc(&pdev->dev, sizeof(*data) * priv->num_regulators,
+			    GFP_KERNEL);
+	if (!data)
+		return NULL;
+	p = data;
+
+	for_each_child_of_node(parent, child) {
+		for (i = 0; i < num_regulators; i++) {
+			if (!of_node_cmp(child->name,
+					 regulators[i].desc.name)) {
+				p->id = i;
+				p->init_data = of_get_regulator_init_data(
+							&pdev->dev, child);
+				p->node = child;
+				p++;
+				break;
+			}
+		}
+	}
+
+	return data;
+}
+#endif
+
 MODULE_LICENSE("GPL v2");
 MODULE_AUTHOR("Yong Shen <yong.shen@linaro.org>");
 MODULE_DESCRIPTION("Regulator Driver for Freescale MC13xxx PMIC");
diff --git a/drivers/regulator/mc13xxx.h b/drivers/regulator/mc13xxx.h
index 75e3832..b3961c6 100644
--- a/drivers/regulator/mc13xxx.h
+++ b/drivers/regulator/mc13xxx.h
@@ -29,6 +29,7 @@ struct mc13xxx_regulator_priv {
 	struct mc13xxx *mc13xxx;
 	u32 powermisc_pwgt_state;
 	struct mc13xxx_regulator *mc13xxx_regulators;
+	int num_regulators;
 	struct regulator_dev *regulators[];
 };
 
@@ -42,6 +43,25 @@ extern int mc13xxx_fixed_regulator_set_voltage(struct regulator_dev *rdev,
 		int min_uV, int max_uV, unsigned *selector);
 extern int mc13xxx_fixed_regulator_get_voltage(struct regulator_dev *rdev);
 
+#ifdef CONFIG_OF
+extern int mc13xxx_get_num_regulators_dt(struct platform_device *pdev);
+extern struct mc13xxx_regulator_init_data *mc13xxx_parse_regulators_dt(
+	struct platform_device *pdev, struct mc13xxx_regulator *regulators,
+	int num_regulators);
+#else
+static inline int mc13xxx_get_num_regulators_dt(struct platform_device *pdev)
+{
+	return -ENODEV;
+}
+
+static inline struct mc13xxx_regulator_init_data *mc13xxx_parse_regulators_dt(
+	struct platform_device *pdev, struct mc13xxx_regulator *regulators,
+	int num_regulators)
+{
+	return NULL;
+}
+#endif
+
 extern struct regulator_ops mc13xxx_regulator_ops;
 extern struct regulator_ops mc13xxx_fixed_regulator_ops;
 
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h
index 261fc11..b86ee45 100644
--- a/include/linux/mfd/mc13xxx.h
+++ b/include/linux/mfd/mc13xxx.h
@@ -69,6 +69,7 @@ struct regulator_init_data;
 struct mc13xxx_regulator_init_data {
 	int id;
 	struct regulator_init_data *init_data;
+	struct device_node *node;
 };
 
 struct mc13xxx_regulator_platform_data {
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] arm/imx: add mc13892 support into imx51-babbage.dts
  2011-12-21 15:00 [PATCH v4 0/4] Add device tree support for mc13892 regulator driver Shawn Guo
                   ` (2 preceding siblings ...)
  2011-12-21 15:00 ` [PATCH 3/4] regulator: mc13892: add device tree probe support Shawn Guo
@ 2011-12-21 15:00 ` Shawn Guo
  2011-12-30  3:28   ` Richard Zhao
  3 siblings, 1 reply; 11+ messages in thread
From: Shawn Guo @ 2011-12-21 15:00 UTC (permalink / raw)
  To: linux-arm-kernel

It adds mc13892 support into imx51-babbage device tree source.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boot/dts/imx51-babbage.dts |   93 ++++++++++++++++++++++++++++++++++-
 1 files changed, 91 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
index 564cb8c..728c9e8 100644
--- a/arch/arm/boot/dts/imx51-babbage.dts
+++ b/arch/arm/boot/dts/imx51-babbage.dts
@@ -31,12 +31,14 @@
 				esdhc at 70004000 { /* ESDHC1 */
 					fsl,cd-internal;
 					fsl,wp-internal;
+					vmmc-supply = <&vsd_reg>;
 					status = "okay";
 				};
 
 				esdhc at 70008000 { /* ESDHC2 */
 					cd-gpios = <&gpio1 6 0>;
 					wp-gpios = <&gpio1 5 0>;
+					vmmc-supply = <&vsd_reg>;
 					status = "okay";
 				};
 
@@ -56,8 +58,95 @@
 						compatible = "fsl,mc13892";
 						spi-max-frequency = <6000000>;
 						reg = <0>;
-						mc13xxx-irq-gpios = <&gpio1 8 0>;
-						fsl,mc13xxx-uses-regulator;
+						interrupt-parent = <&gpio1>;
+						interrupts = <8>;
+
+						regulators {
+							sw1_reg: sw1 {
+								regulator-min-microvolt = <600000>;
+								regulator-max-microvolt = <1375000>;
+								regulator-boot-on;
+								regulator-always-on;
+							};
+
+							sw2_reg: sw2 {
+								regulator-min-microvolt = <900000>;
+								regulator-max-microvolt = <1850000>;
+								regulator-boot-on;
+								regulator-always-on;
+							};
+
+							sw3_reg: sw3 {
+								regulator-min-microvolt = <1100000>;
+								regulator-max-microvolt = <1850000>;
+								regulator-boot-on;
+								regulator-always-on;
+							};
+
+							sw4_reg: sw4 {
+								regulator-min-microvolt = <1100000>;
+								regulator-max-microvolt = <1850000>;
+								regulator-boot-on;
+								regulator-always-on;
+							};
+
+							vpll_reg: vpll {
+								regulator-min-microvolt = <1050000>;
+								regulator-max-microvolt = <1800000>;
+								regulator-boot-on;
+								regulator-always-on;
+							};
+
+							vdig_reg: vdig {
+								regulator-min-microvolt = <1650000>;
+								regulator-max-microvolt = <1650000>;
+								regulator-boot-on;
+							};
+
+							vsd_reg: vsd {
+								regulator-min-microvolt = <1800000>;
+								regulator-max-microvolt = <3150000>;
+							};
+
+							vusb2_reg: vusb2 {
+								regulator-min-microvolt = <2400000>;
+								regulator-max-microvolt = <2775000>;
+								regulator-boot-on;
+								regulator-always-on;
+							};
+
+							vvideo_reg: vvideo {
+								regulator-min-microvolt = <2775000>;
+								regulator-max-microvolt = <2775000>;
+							};
+
+							vaudio_reg: vaudio {
+								regulator-min-microvolt = <2300000>;
+								regulator-max-microvolt = <3000000>;
+							};
+
+							vcam_reg: vcam {
+								regulator-min-microvolt = <2500000>;
+								regulator-max-microvolt = <3000000>;
+							};
+
+							vgen1_reg: vgen1 {
+								regulator-min-microvolt = <1200000>;
+								regulator-max-microvolt = <1200000>;
+							};
+
+							vgen2_reg: vgen2 {
+								regulator-min-microvolt = <1200000>;
+								regulator-max-microvolt = <3150000>;
+								regulator-always-on;
+							};
+
+							vgen3_reg: vgen3 {
+								regulator-min-microvolt = <1800000>;
+								regulator-max-microvolt = <2900000>;
+								regulator-always-on;
+							};
+						};
 					};
 
 					flash: at45db321d at 1 {
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 1/4] mfd: improve mc13xxx dt binding document
  2011-12-21 15:00 ` [PATCH 1/4] mfd: improve mc13xxx dt binding document Shawn Guo
@ 2011-12-22 11:05   ` Mark Brown
  2011-12-22 16:07   ` Samuel Ortiz
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Brown @ 2011-12-22 11:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 21, 2011 at 11:00:44PM +0800, Shawn Guo wrote:
> It improves mc13xxx dt binding document on how the regulator name
> is being used for binding a mc13892 regulator device.

> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 2/4] regulator: mc13892: remove the unnecessary prefix from regulator name
  2011-12-21 15:00 ` [PATCH 2/4] regulator: mc13892: remove the unnecessary prefix from regulator name Shawn Guo
@ 2011-12-22 11:08   ` Mark Brown
  2011-12-22 11:43     ` Shawn Guo
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2011-12-22 11:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 21, 2011 at 11:00:45PM +0800, Shawn Guo wrote:
> It's not really necessary to add a prefix 'MC13892__' for each mc13892
> regulator name, since the chip must have been identified as mc13892
> when we look at the regulator name.

Applied, thanks.

> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Cc: Liam Girdwood <lrg@ti.com>
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Think something went wrong with your scripts here...  might be worth
checking.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 3/4] regulator: mc13892: add device tree probe support
  2011-12-21 15:00 ` [PATCH 3/4] regulator: mc13892: add device tree probe support Shawn Guo
@ 2011-12-22 11:08   ` Mark Brown
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2011-12-22 11:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 21, 2011 at 11:00:46PM +0800, Shawn Guo wrote:
> It adds device tree probe support for mc13892-regulator driver.

Applied, thanks.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 2/4] regulator: mc13892: remove the unnecessary prefix from regulator name
  2011-12-22 11:08   ` Mark Brown
@ 2011-12-22 11:43     ` Shawn Guo
  0 siblings, 0 replies; 11+ messages in thread
From: Shawn Guo @ 2011-12-22 11:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Dec 22, 2011 at 11:08:30AM +0000, Mark Brown wrote:
> On Wed, Dec 21, 2011 at 11:00:45PM +0800, Shawn Guo wrote:
> > It's not really necessary to add a prefix 'MC13892__' for each mc13892
> > regulator name, since the chip must have been identified as mc13892
> > when we look at the regulator name.
> 
> Applied, thanks.
> 
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> > Cc: Liam Girdwood <lrg@ti.com>
> > 
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> 
> Think something went wrong with your scripts here...  might be worth
> checking.

Yes, something did go wrong there.  Thanks for noticing.

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4] mfd: improve mc13xxx dt binding document
  2011-12-21 15:00 ` [PATCH 1/4] mfd: improve mc13xxx dt binding document Shawn Guo
  2011-12-22 11:05   ` Mark Brown
@ 2011-12-22 16:07   ` Samuel Ortiz
  1 sibling, 0 replies; 11+ messages in thread
From: Samuel Ortiz @ 2011-12-22 16:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Shawn,

On Wed, Dec 21, 2011 at 11:00:44PM +0800, Shawn Guo wrote:
> It improves mc13xxx dt binding document on how the regulator name
> is being used for binding a mc13892 regulator device.
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
Thanks, patch applied.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 4/4] arm/imx: add mc13892 support into imx51-babbage.dts
  2011-12-21 15:00 ` [PATCH 4/4] arm/imx: add mc13892 support into imx51-babbage.dts Shawn Guo
@ 2011-12-30  3:28   ` Richard Zhao
  0 siblings, 0 replies; 11+ messages in thread
From: Richard Zhao @ 2011-12-30  3:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 21, 2011 at 11:00:47PM +0800, Shawn Guo wrote:
> It adds mc13892 support into imx51-babbage device tree source.
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/boot/dts/imx51-babbage.dts |   93 ++++++++++++++++++++++++++++++++++-
>  1 files changed, 91 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
> index 564cb8c..728c9e8 100644
> --- a/arch/arm/boot/dts/imx51-babbage.dts
> +++ b/arch/arm/boot/dts/imx51-babbage.dts
> @@ -31,12 +31,14 @@
>  				esdhc at 70004000 { /* ESDHC1 */
>  					fsl,cd-internal;
>  					fsl,wp-internal;
> +					vmmc-supply = <&vsd_reg>;
>  					status = "okay";
>  				};
>  
>  				esdhc at 70008000 { /* ESDHC2 */
>  					cd-gpios = <&gpio1 6 0>;
>  					wp-gpios = <&gpio1 5 0>;
> +					vmmc-supply = <&vsd_reg>;
>  					status = "okay";
>  				};
>  
> @@ -56,8 +58,95 @@
>  						compatible = "fsl,mc13892";
>  						spi-max-frequency = <6000000>;
>  						reg = <0>;
> -						mc13xxx-irq-gpios = <&gpio1 8 0>;
> -						fsl,mc13xxx-uses-regulator;
> +						interrupt-parent = <&gpio1>;
> +						interrupts = <8>;
Why do we put everything in /soc node? Isn't it suppose to put
everything outside SoC outside /soc node?

In my understanding, i2c/spi node in /soc should only describe the bus
host controller. Especially i2c is a multi-master bus.

Thanks
Richard

> +
> +						regulators {
 
Thanks
Richard

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-12-30  3:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21 15:00 [PATCH v4 0/4] Add device tree support for mc13892 regulator driver Shawn Guo
2011-12-21 15:00 ` [PATCH 1/4] mfd: improve mc13xxx dt binding document Shawn Guo
2011-12-22 11:05   ` Mark Brown
2011-12-22 16:07   ` Samuel Ortiz
2011-12-21 15:00 ` [PATCH 2/4] regulator: mc13892: remove the unnecessary prefix from regulator name Shawn Guo
2011-12-22 11:08   ` Mark Brown
2011-12-22 11:43     ` Shawn Guo
2011-12-21 15:00 ` [PATCH 3/4] regulator: mc13892: add device tree probe support Shawn Guo
2011-12-22 11:08   ` Mark Brown
2011-12-21 15:00 ` [PATCH 4/4] arm/imx: add mc13892 support into imx51-babbage.dts Shawn Guo
2011-12-30  3:28   ` Richard Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).