All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/18] DT enablement for Snowball
@ 2012-05-17 13:45 Lee Jones
  2012-05-17 13:45   ` Lee Jones
                   ` (19 more replies)
  0 siblings, 20 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

Hopefully the penultimate large patch-stack for Snowball
enablement. After that only bits and bobs will remain.

 arch/arm/boot/dts/db8500.dtsi      |   92 +++++++++++++++-
 arch/arm/boot/dts/snowball.dts     |    3 +
 arch/arm/configs/u8500_defconfig   |    3 +
 arch/arm/mach-ux500/Kconfig        |    1 +
 arch/arm/mach-ux500/board-mop500.c |   55 +++-------
 drivers/i2c/busses/i2c-nomadik.c   |   43 +++++++-
 drivers/mfd/Makefile               |    5 +-
 drivers/mfd/ab8500-core.c          |  176 ++++++++++++++++++++++++++-----
 drivers/mfd/ab8500-debugfs.c       |    6 ++
 drivers/mfd/ab8500-gpadc.c         |    8 +-
 drivers/mfd/ab8500-i2c.c           |  160 ----------------------------
 drivers/regulator/ab8500.c         |  204 +++++++++++++++++++++++++-----------
 12 files changed, 457 insertions(+), 299 deletions(-)

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

* [PATCH 01/18] i2c: Add Device Tree support to the Nomadik I2C driver
@ 2012-05-17 13:45   ` Lee Jones
  0 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel, arnd, linus.walleij, grant.likely, cjb, broonie, sameo
  Cc: Lee Jones, linux-i2c, linux-kernel

Here we move the i2c-nomadik's default settings into the driver
rather than specifying them from platform code. At the time of
this writing we only have one user, the u8500. As new users are
added, it is expected that they will be Device Tree compliant.
If this is the case, we will look up their initialisation values
by compatible entry, then apply them forthwith.

Cc: linux-i2c@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/i2c/busses/i2c-nomadik.c |   40 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index 5267ab9..cd45563 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -23,6 +23,7 @@
 #include <linux/io.h>
 #include <linux/regulator/consumer.h>
 #include <linux/pm_runtime.h>
+#include <linux/of_device.h>
 
 #include <plat/i2c.h>
 
@@ -899,15 +900,51 @@ static const struct i2c_algorithm nmk_i2c_algo = {
 	.functionality	= nmk_i2c_functionality
 };
 
+static struct nmk_i2c_controller u8500_i2c = {
+       /*
+        * slave data setup time, which is
+        * 250 ns,100ns,10ns which is 14,6,2
+        * respectively for a 48 Mhz
+        * i2c clock
+        */
+       .slsu           = 0xe,
+       /* Tx FIFO threshold */
+       .tft            = 1,
+       /* Rx FIFO threshold */
+       .rft            = 8,
+       /* std. mode operation */
+       .clk_freq       = 100000,
+       /* Slave response timeout(ms) */
+       .timeout        = 200,
+       .sm             = I2C_FREQ_MODE_FAST,
+};
+
+
+static const struct of_device_id nmk_gpio_match[] = {
+	{ .compatible = "st,nomadik-i2c", .data = &u8500_i2c, },
+	{}
+};
+
 static int __devinit nmk_i2c_probe(struct platform_device *pdev)
 {
 	int ret = 0;
 	struct resource *res;
-	struct nmk_i2c_controller *pdata =
+	const struct nmk_i2c_controller *pdata =
 			pdev->dev.platform_data;
+        const struct of_device_id *of_id =
+                        of_match_device(nmk_gpio_match, &pdev->dev);
 	struct nmk_i2c_dev	*dev;
 	struct i2c_adapter *adap;
 
+	if (!pdata) {
+		if (of_id && of_id->data)
+			/* Looks like we're booting via Device Tree. */
+			pdata = of_id->data;
+		else
+			/* No i2c configuration found, using the default. */
+			pdata = &u8500_i2c;
+	}
+
 	dev = kzalloc(sizeof(struct nmk_i2c_dev), GFP_KERNEL);
 	if (!dev) {
 		dev_err(&pdev->dev, "cannot allocate memory\n");
@@ -1044,6 +1081,7 @@ static struct platform_driver nmk_i2c_driver = {
 		.owner = THIS_MODULE,
 		.name = DRIVER_NAME,
 		.pm = &nmk_i2c_pm,
+		.of_match_table = nmk_gpio_match,
 	},
 	.probe = nmk_i2c_probe,
 	.remove = __devexit_p(nmk_i2c_remove),
-- 
1.7.9.5


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

* [PATCH 01/18] i2c: Add Device Tree support to the Nomadik I2C driver
@ 2012-05-17 13:45   ` Lee Jones
  0 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	arnd-r2nGTMty4D4, linus.walleij-0IS4wlFg1OjSUeElwK9/Pw,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ, cjb-2X9k7bc8m7Mdnm+yROfE0A,
	broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	sameo-VuQAYsv1563Yd54FQh9/CA
  Cc: Lee Jones, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Here we move the i2c-nomadik's default settings into the driver
rather than specifying them from platform code. At the time of
this writing we only have one user, the u8500. As new users are
added, it is expected that they will be Device Tree compliant.
If this is the case, we will look up their initialisation values
by compatible entry, then apply them forthwith.

Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 drivers/i2c/busses/i2c-nomadik.c |   40 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index 5267ab9..cd45563 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -23,6 +23,7 @@
 #include <linux/io.h>
 #include <linux/regulator/consumer.h>
 #include <linux/pm_runtime.h>
+#include <linux/of_device.h>
 
 #include <plat/i2c.h>
 
@@ -899,15 +900,51 @@ static const struct i2c_algorithm nmk_i2c_algo = {
 	.functionality	= nmk_i2c_functionality
 };
 
+static struct nmk_i2c_controller u8500_i2c = {
+       /*
+        * slave data setup time, which is
+        * 250 ns,100ns,10ns which is 14,6,2
+        * respectively for a 48 Mhz
+        * i2c clock
+        */
+       .slsu           = 0xe,
+       /* Tx FIFO threshold */
+       .tft            = 1,
+       /* Rx FIFO threshold */
+       .rft            = 8,
+       /* std. mode operation */
+       .clk_freq       = 100000,
+       /* Slave response timeout(ms) */
+       .timeout        = 200,
+       .sm             = I2C_FREQ_MODE_FAST,
+};
+
+
+static const struct of_device_id nmk_gpio_match[] = {
+	{ .compatible = "st,nomadik-i2c", .data = &u8500_i2c, },
+	{}
+};
+
 static int __devinit nmk_i2c_probe(struct platform_device *pdev)
 {
 	int ret = 0;
 	struct resource *res;
-	struct nmk_i2c_controller *pdata =
+	const struct nmk_i2c_controller *pdata =
 			pdev->dev.platform_data;
+        const struct of_device_id *of_id =
+                        of_match_device(nmk_gpio_match, &pdev->dev);
 	struct nmk_i2c_dev	*dev;
 	struct i2c_adapter *adap;
 
+	if (!pdata) {
+		if (of_id && of_id->data)
+			/* Looks like we're booting via Device Tree. */
+			pdata = of_id->data;
+		else
+			/* No i2c configuration found, using the default. */
+			pdata = &u8500_i2c;
+	}
+
 	dev = kzalloc(sizeof(struct nmk_i2c_dev), GFP_KERNEL);
 	if (!dev) {
 		dev_err(&pdev->dev, "cannot allocate memory\n");
@@ -1044,6 +1081,7 @@ static struct platform_driver nmk_i2c_driver = {
 		.owner = THIS_MODULE,
 		.name = DRIVER_NAME,
 		.pm = &nmk_i2c_pm,
+		.of_match_table = nmk_gpio_match,
 	},
 	.probe = nmk_i2c_probe,
 	.remove = __devexit_p(nmk_i2c_remove),
-- 
1.7.9.5

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

* [PATCH 01/18] i2c: Add Device Tree support to the Nomadik I2C driver
@ 2012-05-17 13:45   ` Lee Jones
  0 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

Here we move the i2c-nomadik's default settings into the driver
rather than specifying them from platform code. At the time of
this writing we only have one user, the u8500. As new users are
added, it is expected that they will be Device Tree compliant.
If this is the case, we will look up their initialisation values
by compatible entry, then apply them forthwith.

Cc: linux-i2c at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/i2c/busses/i2c-nomadik.c |   40 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index 5267ab9..cd45563 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -23,6 +23,7 @@
 #include <linux/io.h>
 #include <linux/regulator/consumer.h>
 #include <linux/pm_runtime.h>
+#include <linux/of_device.h>
 
 #include <plat/i2c.h>
 
@@ -899,15 +900,51 @@ static const struct i2c_algorithm nmk_i2c_algo = {
 	.functionality	= nmk_i2c_functionality
 };
 
+static struct nmk_i2c_controller u8500_i2c = {
+       /*
+        * slave data setup time, which is
+        * 250 ns,100ns,10ns which is 14,6,2
+        * respectively for a 48 Mhz
+        * i2c clock
+        */
+       .slsu           = 0xe,
+       /* Tx FIFO threshold */
+       .tft            = 1,
+       /* Rx FIFO threshold */
+       .rft            = 8,
+       /* std. mode operation */
+       .clk_freq       = 100000,
+       /* Slave response timeout(ms) */
+       .timeout        = 200,
+       .sm             = I2C_FREQ_MODE_FAST,
+};
+
+
+static const struct of_device_id nmk_gpio_match[] = {
+	{ .compatible = "st,nomadik-i2c", .data = &u8500_i2c, },
+	{}
+};
+
 static int __devinit nmk_i2c_probe(struct platform_device *pdev)
 {
 	int ret = 0;
 	struct resource *res;
-	struct nmk_i2c_controller *pdata =
+	const struct nmk_i2c_controller *pdata =
 			pdev->dev.platform_data;
+        const struct of_device_id *of_id =
+                        of_match_device(nmk_gpio_match, &pdev->dev);
 	struct nmk_i2c_dev	*dev;
 	struct i2c_adapter *adap;
 
+	if (!pdata) {
+		if (of_id && of_id->data)
+			/* Looks like we're booting via Device Tree. */
+			pdata = of_id->data;
+		else
+			/* No i2c configuration found, using the default. */
+			pdata = &u8500_i2c;
+	}
+
 	dev = kzalloc(sizeof(struct nmk_i2c_dev), GFP_KERNEL);
 	if (!dev) {
 		dev_err(&pdev->dev, "cannot allocate memory\n");
@@ -1044,6 +1081,7 @@ static struct platform_driver nmk_i2c_driver = {
 		.owner = THIS_MODULE,
 		.name = DRIVER_NAME,
 		.pm = &nmk_i2c_pm,
+		.of_match_table = nmk_gpio_match,
 	},
 	.probe = nmk_i2c_probe,
 	.remove = __devexit_p(nmk_i2c_remove),
-- 
1.7.9.5

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

* [PATCH 02/18] ARM: ux500: Remove unused i2c platform_data initialisation code
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
  2012-05-17 13:45   ` Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-17 13:45 ` [PATCH 03/18] ARM: ux500: Provide auxdata to be used as name base clock search for nmk-i2c Lee Jones
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

Now that u5500 is obsolete, u8500 is the only user of the Nomadik
i2c driver. As such there is no requirement to differentiate between
initialisation values. By the time a new SoC is released, almost all
of the ux500 platform will be DT:ed, so we can make decisions based
on the compatible property instead.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/mach-ux500/board-mop500.c |   39 ++++--------------------------------
 drivers/i2c/busses/i2c-nomadik.c   |    3 +--
 2 files changed, 5 insertions(+), 37 deletions(-)

diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 26ff77c..4584c74 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -330,43 +330,12 @@ static struct i2c_board_info __initdata mop500_i2c2_devices[] = {
 	},
 };
 
-#define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, t_out, _sm)	\
-static struct nmk_i2c_controller u8500_i2c##id##_data = { \
-	/*				\
-	 * slave data setup time, which is	\
-	 * 250 ns,100ns,10ns which is 14,6,2	\
-	 * respectively for a 48 Mhz	\
-	 * i2c clock			\
-	 */				\
-	.slsu		= _slsu,	\
-	/* Tx FIFO threshold */		\
-	.tft		= _tft,		\
-	/* Rx FIFO threshold */		\
-	.rft		= _rft,		\
-	/* std. mode operation */	\
-	.clk_freq	= clk,		\
-	/* Slave response timeout(ms) */\
-	.timeout	= t_out,	\
-	.sm		= _sm,		\
-}
-
-/*
- * The board uses 4 i2c controllers, initialize all of
- * them with slave data setup time of 250 ns,
- * Tx & Rx FIFO threshold values as 8 and standard
- * mode of operation
- */
-U8500_I2C_CONTROLLER(0, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
-U8500_I2C_CONTROLLER(1, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
-U8500_I2C_CONTROLLER(2,	0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
-U8500_I2C_CONTROLLER(3,	0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
-
 static void __init mop500_i2c_init(struct device *parent)
 {
-	db8500_add_i2c0(parent, &u8500_i2c0_data);
-	db8500_add_i2c1(parent, &u8500_i2c1_data);
-	db8500_add_i2c2(parent, &u8500_i2c2_data);
-	db8500_add_i2c3(parent, &u8500_i2c3_data);
+	db8500_add_i2c0(parent, NULL);
+	db8500_add_i2c1(parent, NULL);
+	db8500_add_i2c2(parent, NULL);
+	db8500_add_i2c3(parent, NULL);
 }
 
 static struct gpio_keys_button mop500_gpio_keys[] = {
diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index cd45563..1ffdf67 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -1002,8 +1002,7 @@ static int __devinit nmk_i2c_probe(struct platform_device *pdev)
 	adap->owner	= THIS_MODULE;
 	adap->class	= I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	adap->algo	= &nmk_i2c_algo;
-	adap->timeout	= pdata->timeout ? msecs_to_jiffies(pdata->timeout) :
-		msecs_to_jiffies(20000);
+	adap->timeout	= msecs_to_jiffies(pdata->timeout);
 	snprintf(adap->name, sizeof(adap->name),
 		 "Nomadik I2C%d at %lx", pdev->id, (unsigned long)res->start);
 
-- 
1.7.9.5

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

* [PATCH 03/18] ARM: ux500: Provide auxdata to be used as name base clock search for nmk-i2c
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
  2012-05-17 13:45   ` Lee Jones
  2012-05-17 13:45 ` [PATCH 02/18] ARM: ux500: Remove unused i2c platform_data initialisation code Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-17 13:45 ` [PATCH 04/18] ARM: ux500: CONFIG: Compile in support for leds-gpio Lee Jones
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

This patch provides a way for find_clk() to complete its name-based
searches and still find the nmk-i2c clocks. As Device Tree has a
different naming structure to that of more traditional initialisation
methods, find_clk() not succeed without these bindings.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/mach-ux500/board-mop500.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 4584c74..b8331fe 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -757,6 +757,11 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e000, "gpio.6", NULL),
 	OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e080, "gpio.7", NULL),
 	OF_DEV_AUXDATA("st,nomadik-gpio", 0xa03fe000, "gpio.8", NULL),
+	OF_DEV_AUXDATA("st,nomadik-i2c", 0x80004000, "nmk-i2c.0", NULL),
+	OF_DEV_AUXDATA("st,nomadik-i2c", 0x80122000, "nmk-i2c.1", NULL),
+	OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL),
+	OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL),
+	OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
 	{},
 };
 
@@ -838,7 +843,6 @@ static void __init u8500_init_machine(void)
 		i2c_register_board_info(2, mop500_i2c2_devices,
 					ARRAY_SIZE(mop500_i2c2_devices));
 	}
-	mop500_i2c_init(parent);
 
 	/* This board has full regulator constraints */
 	regulator_has_full_constraints();
-- 
1.7.9.5

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

* [PATCH 04/18] ARM: ux500: CONFIG: Compile in support for leds-gpio
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (2 preceding siblings ...)
  2012-05-17 13:45 ` [PATCH 03/18] ARM: ux500: Provide auxdata to be used as name base clock search for nmk-i2c Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-17 13:45 ` [PATCH 05/18] ARM: ux500: Enable the user LED on Snowball via Device Tree Lee Jones
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

Code exists in the mop500 board file (used for HREF and
Snowball) to initialise Snowball's user LED via the
leds-gpio driver. However, the driver isn't currently
built when using the default configuration file. This
patch aims to change that behavior.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/configs/u8500_defconfig |    3 +++
 arch/arm/mach-ux500/Kconfig      |    1 +
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig
index 7e84f45..c6973c5 100644
--- a/arch/arm/configs/u8500_defconfig
+++ b/arch/arm/configs/u8500_defconfig
@@ -85,6 +85,9 @@ CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
 CONFIG_LEDS_LM3530=y
 CONFIG_LEDS_LP5521=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_AB8500=y
 CONFIG_RTC_DRV_PL031=y
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index e2923da..3840475 100644
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -41,6 +41,7 @@ config MACH_HREFV60
 config MACH_SNOWBALL
 	bool "U8500 Snowball platform"
 	select MACH_MOP500
+	select LEDS_GPIO
 	help
 	  Include support for the snowball development platform.
 
-- 
1.7.9.5

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

* [PATCH 05/18] ARM: ux500: Enable the user LED on Snowball via Device Tree
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (3 preceding siblings ...)
  2012-05-17 13:45 ` [PATCH 04/18] ARM: ux500: CONFIG: Compile in support for leds-gpio Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-17 13:45 ` [PATCH 06/18] mfd: ab8500: Remove confusing ab8500-i2c file and merge into ab8500-core Lee Jones
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

This patch enables and illuminates the user_led on the
Snowball low-cost development board using DT. It also
removes initialisation carried out from platform code.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/snowball.dts     |    1 +
 arch/arm/mach-ux500/board-mop500.c |    3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts
index 56f8a76..579c304 100644
--- a/arch/arm/boot/dts/snowball.dts
+++ b/arch/arm/boot/dts/snowball.dts
@@ -67,6 +67,7 @@
 		used-led {
 			label = "user_led";
 			gpios = <&gpio4 14 0x4>;
+			default-state = "on";
 		};
 	};
 
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index b8331fe..433045d 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -600,7 +600,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
 };
 
 static struct platform_device *snowball_of_platform_devs[] __initdata = {
-	&snowball_led_dev,
 	&snowball_key_dev,
 	&ab8500_device,
 };
@@ -814,7 +813,7 @@ static void __init u8500_init_machine(void)
 
 		/*
 		 * Devices to be DT:ed:
-		 *   snowball_led_dev   = todo
+		 *   snowball_led_dev   = done
 		 *   snowball_key_dev   = todo
 		 *   snowball_sbnet_dev = done
 		 *   ab8500_device      = todo
-- 
1.7.9.5

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

* [PATCH 06/18] mfd: ab8500: Remove confusing ab8500-i2c file and merge into ab8500-core
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (4 preceding siblings ...)
  2012-05-17 13:45 ` [PATCH 05/18] ARM: ux500: Enable the user LED on Snowball via Device Tree Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-20 20:58   ` Linus Walleij
  2012-05-17 13:45 ` [PATCH 07/18] ARM: ux500: PRCMU related configuration and layout corrections for Device Tree Lee Jones
                   ` (13 subsequent siblings)
  19 siblings, 1 reply; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

ab8500-i2c is used as core code to register the ab8500 device.
After allocating ab8500 memory, it immediately calls into
ab8500-core where the real initialisation takes place. This
patch moves all core registration and memory allocation into
the true ab8500-core file and removes ab8500-i2c completely.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/mach-ux500/board-mop500.c |    2 +-
 drivers/mfd/Makefile               |    5 +-
 drivers/mfd/ab8500-core.c          |  105 +++++++++++++++++++++--
 drivers/mfd/ab8500-i2c.c           |  160 ------------------------------------
 4 files changed, 103 insertions(+), 169 deletions(-)
 delete mode 100644 drivers/mfd/ab8500-i2c.c

diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 433045d..46df945 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -205,7 +205,7 @@ static struct resource ab8500_resources[] = {
 };
 
 struct platform_device ab8500_device = {
-	.name = "ab8500-i2c",
+	.name = "ab8500-core",
 	.id = 0,
 	.dev = {
 		.platform_data = &ab8500_platdata,
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index acc888d..15b0ba6 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -90,12 +90,11 @@ obj-$(CONFIG_PCF50633_GPIO)	+= pcf50633-gpio.o
 obj-$(CONFIG_ABX500_CORE)	+= abx500-core.o
 obj-$(CONFIG_AB3100_CORE)	+= ab3100-core.o
 obj-$(CONFIG_AB3100_OTP)	+= ab3100-otp.o
-obj-$(CONFIG_AB8500_CORE)	+= ab8500-core.o ab8500-sysctrl.o
 obj-$(CONFIG_AB8500_DEBUG)	+= ab8500-debugfs.o
 obj-$(CONFIG_AB8500_GPADC)	+= ab8500-gpadc.o
 obj-$(CONFIG_MFD_DB8500_PRCMU)	+= db8500-prcmu.o
-# ab8500-i2c need to come after db8500-prcmu (which provides the channel)
-obj-$(CONFIG_AB8500_I2C_CORE)	+= ab8500-i2c.o
+# ab8500-core needs to come after db8500-prcmu (which provides the channel)
+obj-$(CONFIG_AB8500_CORE)	+= ab8500-core.o ab8500-sysctrl.o
 obj-$(CONFIG_MFD_TIMBERDALE)    += timberdale.o
 obj-$(CONFIG_PMIC_ADP5520)	+= adp5520.o
 obj-$(CONFIG_LPC_SCH)		+= lpc_sch.o
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 08850f0..0e2df71 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -18,6 +18,7 @@
 #include <linux/mfd/core.h>
 #include <linux/mfd/abx500.h>
 #include <linux/mfd/abx500/ab8500.h>
+#include <linux/mfd/dbx500-prcmu.h>
 #include <linux/regulator/ab8500.h>
 
 /*
@@ -128,6 +129,41 @@ static const char ab8500_version_str[][7] = {
 	[AB8500_VERSION_AB8540] = "AB8540",
 };
 
+static int ab8500_i2c_write(struct ab8500 *ab8500, u16 addr, u8 data)
+{
+	int ret;
+
+	ret = prcmu_abb_write((u8)(addr >> 8), (u8)(addr & 0xFF), &data, 1);
+	if (ret < 0)
+		dev_err(ab8500->dev, "prcmu i2c error %d\n", ret);
+	return ret;
+}
+
+static int ab8500_i2c_write_masked(struct ab8500 *ab8500, u16 addr, u8 mask,
+	u8 data)
+{
+	int ret;
+
+	ret = prcmu_abb_write_masked((u8)(addr >> 8), (u8)(addr & 0xFF), &data,
+		&mask, 1);
+	if (ret < 0)
+		dev_err(ab8500->dev, "prcmu i2c error %d\n", ret);
+	return ret;
+}
+
+static int ab8500_i2c_read(struct ab8500 *ab8500, u16 addr)
+{
+	int ret;
+	u8 data;
+
+	ret = prcmu_abb_read((u8)(addr >> 8), (u8)(addr & 0xFF), &data, 1);
+	if (ret < 0) {
+		dev_err(ab8500->dev, "prcmu i2c error %d\n", ret);
+		return ret;
+	}
+	return (int)data;
+}
+
 static int ab8500_get_chip_id(struct device *dev)
 {
 	struct ab8500 *ab8500;
@@ -1076,27 +1112,51 @@ static struct attribute_group ab9540_attr_group = {
 	.attrs	= ab9540_sysfs_entries,
 };
 
-int __devinit ab8500_init(struct ab8500 *ab8500, enum ab8500_version version)
+static int __devinit ab8500_probe(struct platform_device *pdev)
 {
-	struct ab8500_platform_data *plat = dev_get_platdata(ab8500->dev);
+	struct ab8500_platform_data *plat = dev_get_platdata(&pdev->dev);
+	const struct platform_device_id *platid = platform_get_device_id(pdev);
+	enum ab8500_version version = platid->driver_data;
+	struct ab8500 *ab8500;
+	struct resource *resource;
 	int ret;
 	int i;
 	u8 value;
 
+	ab8500 = kzalloc(sizeof *ab8500, GFP_KERNEL);
+	if (!ab8500)
+		return -ENOMEM;
+
 	if (plat)
 		ab8500->irq_base = plat->irq_base;
 
+	ab8500->dev = &pdev->dev;
+
+	resource = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+	if (!resource) {
+		ret = -ENODEV;
+		goto out_free_ab8500;
+	}
+
+	ab8500->irq = resource->start;
+
+	ab8500->read = ab8500_i2c_read;
+	ab8500->write = ab8500_i2c_write;
+	ab8500->write_masked = ab8500_i2c_write_masked;
+
 	mutex_init(&ab8500->lock);
 	mutex_init(&ab8500->irq_lock);
 	atomic_set(&ab8500->transfer_ongoing, 0);
 
+	platform_set_drvdata(pdev, ab8500);
+
 	if (version != AB8500_VERSION_UNDEFINED)
 		ab8500->version = version;
 	else {
 		ret = get_register_interruptible(ab8500, AB8500_MISC,
 			AB8500_IC_NAME_REG, &value);
 		if (ret < 0)
-			return ret;
+			goto out_free_ab8500;
 
 		ab8500->version = value;
 	}
@@ -1104,7 +1164,7 @@ int __devinit ab8500_init(struct ab8500 *ab8500, enum ab8500_version version)
 	ret = get_register_interruptible(ab8500, AB8500_MISC,
 		AB8500_REV_REG, &value);
 	if (ret < 0)
-		return ret;
+		goto out_free_ab8500;
 
 	ab8500->chip_id = value;
 
@@ -1240,12 +1300,16 @@ out_freeoldmask:
 	kfree(ab8500->oldmask);
 out_freemask:
 	kfree(ab8500->mask);
+out_free_ab8500:
+	kfree(ab8500);
 
 	return ret;
 }
 
-int __devexit ab8500_exit(struct ab8500 *ab8500)
+static int __devexit ab8500_remove(struct platform_device *pdev)
 {
+	struct ab8500 *ab8500 = platform_get_drvdata(pdev);
+
 	if (is_ab9540(ab8500))
 		sysfs_remove_group(&ab8500->dev->kobj, &ab9540_attr_group);
 	else
@@ -1257,10 +1321,41 @@ int __devexit ab8500_exit(struct ab8500 *ab8500)
 	}
 	kfree(ab8500->oldmask);
 	kfree(ab8500->mask);
+	kfree(ab8500);
 
 	return 0;
 }
 
+static const struct platform_device_id ab8500_id[] = {
+	{ "ab8500-core", AB8500_VERSION_AB8500 },
+	{ "ab8505-i2c", AB8500_VERSION_AB8505 },
+	{ "ab9540-i2c", AB8500_VERSION_AB9540 },
+	{ "ab8540-i2c", AB8500_VERSION_AB8540 },
+	{ }
+};
+
+static struct platform_driver ab8500_core_driver = {
+	.driver = {
+		.name = "ab8500-core",
+		.owner = THIS_MODULE,
+	},
+	.probe	= ab8500_probe,
+	.remove	= __devexit_p(ab8500_remove),
+	.id_table = ab8500_id,
+};
+
+static int __init ab8500_core_init(void)
+{
+	return platform_driver_register(&ab8500_core_driver);
+}
+
+static void __exit ab8500_core_exit(void)
+{
+	platform_driver_unregister(&ab8500_core_driver);
+}
+arch_initcall(ab8500_core_init);
+module_exit(ab8500_core_exit);
+
 MODULE_AUTHOR("Mattias Wallin, Srinidhi Kasagar, Rabin Vincent");
 MODULE_DESCRIPTION("AB8500 MFD core");
 MODULE_LICENSE("GPL v2");
diff --git a/drivers/mfd/ab8500-i2c.c b/drivers/mfd/ab8500-i2c.c
deleted file mode 100644
index 89b31a3..0000000
--- a/drivers/mfd/ab8500-i2c.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- * Author: Mattias Wallin <mattias.wallin@stericsson.com> for ST-Ericsson.
- * License Terms: GNU General Public License v2
- * This file was based on drivers/mfd/ab8500-spi.c
- */
-
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
-#include <linux/mfd/abx500/ab8500.h>
-#include <linux/mfd/dbx500-prcmu.h>
-
-static int ab8500_i2c_write(struct ab8500 *ab8500, u16 addr, u8 data)
-{
-	int ret;
-
-	ret = prcmu_abb_write((u8)(addr >> 8), (u8)(addr & 0xFF), &data, 1);
-	if (ret < 0)
-		dev_err(ab8500->dev, "prcmu i2c error %d\n", ret);
-	return ret;
-}
-
-static int ab8500_i2c_write_masked(struct ab8500 *ab8500, u16 addr, u8 mask,
-	u8 data)
-{
-	int ret;
-
-	ret = prcmu_abb_write_masked((u8)(addr >> 8), (u8)(addr & 0xFF), &data,
-		&mask, 1);
-	if (ret < 0)
-		dev_err(ab8500->dev, "prcmu i2c error %d\n", ret);
-	return ret;
-}
-
-static int ab8500_i2c_read(struct ab8500 *ab8500, u16 addr)
-{
-	int ret;
-	u8 data;
-
-	ret = prcmu_abb_read((u8)(addr >> 8), (u8)(addr & 0xFF), &data, 1);
-	if (ret < 0) {
-		dev_err(ab8500->dev, "prcmu i2c error %d\n", ret);
-		return ret;
-	}
-	return (int)data;
-}
-
-static int __devinit ab8500_i2c_probe(struct platform_device *plf)
-{
-	const struct platform_device_id *platid = platform_get_device_id(plf);
-	struct ab8500 *ab8500;
-	struct resource *resource;
-	int ret;
-
-	ab8500 = kzalloc(sizeof *ab8500, GFP_KERNEL);
-	if (!ab8500)
-		return -ENOMEM;
-
-	ab8500->dev = &plf->dev;
-
-	resource = platform_get_resource(plf, IORESOURCE_IRQ, 0);
-	if (!resource) {
-		kfree(ab8500);
-		return -ENODEV;
-	}
-
-	ab8500->irq = resource->start;
-
-	ab8500->read = ab8500_i2c_read;
-	ab8500->write = ab8500_i2c_write;
-	ab8500->write_masked = ab8500_i2c_write_masked;
-
-	platform_set_drvdata(plf, ab8500);
-
-	ret = ab8500_init(ab8500, platid->driver_data);
-	if (ret)
-		kfree(ab8500);
-
-
-	return ret;
-}
-
-static int __devexit ab8500_i2c_remove(struct platform_device *plf)
-{
-	struct ab8500 *ab8500 = platform_get_drvdata(plf);
-
-	ab8500_exit(ab8500);
-	kfree(ab8500);
-
-	return 0;
-}
-
-static const struct platform_device_id ab8500_id[] = {
-	{ "ab8500-i2c", AB8500_VERSION_AB8500 },
-	{ "ab8505-i2c", AB8500_VERSION_AB8505 },
-	{ "ab9540-i2c", AB8500_VERSION_AB9540 },
-	{ "ab8540-i2c", AB8500_VERSION_AB8540 },
-	{ }
-};
-
-#ifdef CONFIG_PM
-static int ab8500_i2c_suspend(struct device *dev)
-{
-	struct ab8500 *ab = dev_get_drvdata(dev);
-
-	disable_irq(ab->irq);
-	enable_irq_wake(ab->irq);
-
-	return 0;
-}
-
-static int ab8500_i2c_resume(struct device *dev)
-{
-	struct ab8500 *ab = dev_get_drvdata(dev);
-
-	disable_irq_wake(ab->irq);
-	enable_irq(ab->irq);
-
-	return 0;
-}
-
-static const struct dev_pm_ops ab8500_i2c_pm_ops = {
-	.suspend	= ab8500_i2c_suspend,
-	.resume		= ab8500_i2c_resume,
-};
-
-#define AB8500_I2C_PM_OPS	(&ab8500_i2c_pm_ops)
-#else
-#define AB8500_I2C_PM_OPS	NULL
-#endif
-
-static struct platform_driver ab8500_i2c_driver = {
-	.driver = {
-		.name = "ab8500-i2c",
-		.owner = THIS_MODULE,
-		.pm	= AB8500_I2C_PM_OPS,
-	},
-	.probe	= ab8500_i2c_probe,
-	.remove	= __devexit_p(ab8500_i2c_remove),
-	.id_table = ab8500_id,
-};
-
-static int __init ab8500_i2c_init(void)
-{
-	return platform_driver_register(&ab8500_i2c_driver);
-}
-
-static void __exit ab8500_i2c_exit(void)
-{
-	platform_driver_unregister(&ab8500_i2c_driver);
-}
-arch_initcall(ab8500_i2c_init);
-module_exit(ab8500_i2c_exit);
-
-MODULE_AUTHOR("Mattias WALLIN <mattias.wallin@stericsson.com");
-MODULE_DESCRIPTION("AB8500 Core access via PRCMU I2C");
-MODULE_LICENSE("GPL v2");
-- 
1.7.9.5

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

* [PATCH 07/18] ARM: ux500: PRCMU related configuration and layout corrections for Device Tree
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (5 preceding siblings ...)
  2012-05-17 13:45 ` [PATCH 06/18] mfd: ab8500: Remove confusing ab8500-i2c file and merge into ab8500-core Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-17 13:45 ` [PATCH 08/18] mfd: Enable Device Tree for ab8500-core driver Lee Jones
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

Apply db8500 related PRCMU Device Tree settings and clean up some formatting
errors. We also remove one of the PRCMU assigned IRQs, as it is currently not
used.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/db8500.dtsi |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi
index 9a62f86..1188925 100644
--- a/arch/arm/boot/dts/db8500.dtsi
+++ b/arch/arm/boot/dts/db8500.dtsi
@@ -187,12 +187,12 @@
 		prcmu at 80157000 {
 			compatible = "stericsson,db8500-prcmu";
 			reg = <0x80157000 0x1000>;
-			interrupts = <46 47>;
+			interrupts = <0 47 0x4>;
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges;
 
-				prcmu-timer-4 at 80157450 {
+			prcmu-timer-4 at 80157450 {
 				compatible = "stericsson,db8500-prcmu-timer-4";
 				reg = <0x80157450 0xC>;
 			};
@@ -201,6 +201,7 @@
 				compatible = "stericsson,ab8500";
 				reg = <5>; /* mailbox 5 is i2c */
 				interrupts = <0 40 0x4>;
+				stericsson,irq-base = <520>;
 			};
 		};
 
-- 
1.7.9.5

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

* [PATCH 08/18] mfd: Enable Device Tree for ab8500-core driver
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (6 preceding siblings ...)
  2012-05-17 13:45 ` [PATCH 07/18] ARM: ux500: PRCMU related configuration and layout corrections for Device Tree Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-17 13:45   ` Lee Jones
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

This patch will allow the ab8500-core driver to be probed and set up
when booting when Device Tree is enabled. This includes platform ID
look-up which identifies the machine it is currently running on. If
we are undergoing a DT enabled boot, we will refuse to setup each of
the other ab8500-* devices, as they will be probed individually by DT.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/ab8500-core.c |   73 +++++++++++++++++++++++++++++++--------------
 1 file changed, 51 insertions(+), 22 deletions(-)

diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 0e2df71..bc6c2d5 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -20,6 +20,8 @@
 #include <linux/mfd/abx500/ab8500.h>
 #include <linux/mfd/dbx500-prcmu.h>
 #include <linux/regulator/ab8500.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
 
 /*
  * Interrupt register offsets
@@ -1112,11 +1114,20 @@ static struct attribute_group ab9540_attr_group = {
 	.attrs	= ab9540_sysfs_entries,
 };
 
+static const struct of_device_id ab8500_match[] = {
+	{
+		.compatible = "stericsson,ab8500",
+		.data = (void *)AB8500_VERSION_AB8500,
+	},
+	{},
+};
+
 static int __devinit ab8500_probe(struct platform_device *pdev)
 {
 	struct ab8500_platform_data *plat = dev_get_platdata(&pdev->dev);
 	const struct platform_device_id *platid = platform_get_device_id(pdev);
-	enum ab8500_version version = platid->driver_data;
+	enum ab8500_version version = AB8500_VERSION_UNDEFINED;
+	struct device_node *np = pdev->dev.of_node;
 	struct ab8500 *ab8500;
 	struct resource *resource;
 	int ret;
@@ -1129,6 +1140,14 @@ static int __devinit ab8500_probe(struct platform_device *pdev)
 
 	if (plat)
 		ab8500->irq_base = plat->irq_base;
+	else if (np)
+		ret = of_property_read_u32(np, "stericsson,irq-base", &ab8500->irq_base);
+
+	if (!ab8500->irq_base) {
+		dev_info(&pdev->dev, "couldn't find irq-base\n");
+		ret = -EINVAL;
+		goto out_free_ab8500;
+	}
 
 	ab8500->dev = &pdev->dev;
 
@@ -1150,6 +1169,12 @@ static int __devinit ab8500_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, ab8500);
 
+	if (platid)
+		version = platid->driver_data;
+	else if (np)
+		version = (unsigned int)
+			of_match_device(ab8500_match, &pdev->dev)->data;
+
 	if (version != AB8500_VERSION_UNDEFINED)
 		ab8500->version = version;
 	else {
@@ -1246,29 +1271,32 @@ static int __devinit ab8500_probe(struct platform_device *pdev)
 			goto out_removeirq;
 	}
 
-	ret = mfd_add_devices(ab8500->dev, 0, abx500_common_devs,
-			      ARRAY_SIZE(abx500_common_devs), NULL,
-			      ab8500->irq_base);
-
-	if (ret)
-		goto out_freeirq;
+	if (!np) {
+		ret = mfd_add_devices(ab8500->dev, 0, abx500_common_devs,
+				ARRAY_SIZE(abx500_common_devs), NULL,
+				ab8500->irq_base);
 
-	if (is_ab9540(ab8500))
-		ret = mfd_add_devices(ab8500->dev, 0, ab9540_devs,
-			      ARRAY_SIZE(ab9540_devs), NULL,
-			      ab8500->irq_base);
-	else
-		ret = mfd_add_devices(ab8500->dev, 0, ab8500_devs,
-			      ARRAY_SIZE(ab8500_devs), NULL,
-			      ab8500->irq_base);
-
-	if (is_ab9540(ab8500) || is_ab8505(ab8500))
-		ret = mfd_add_devices(ab8500->dev, 0, ab9540_ab8505_devs,
-			      ARRAY_SIZE(ab9540_ab8505_devs), NULL,
-			      ab8500->irq_base);
+		if (ret)
+			goto out_freeirq;
+
+		if (is_ab9540(ab8500))
+			ret = mfd_add_devices(ab8500->dev, 0, ab9540_devs,
+					ARRAY_SIZE(ab9540_devs), NULL,
+					ab8500->irq_base);
+		else
+			ret = mfd_add_devices(ab8500->dev, 0, ab8500_devs,
+					ARRAY_SIZE(ab8500_devs), NULL,
+					ab8500->irq_base);
+		if (ret)
+			goto out_freeirq;
 
-	if (ret)
-		goto out_freeirq;
+		if (is_ab9540(ab8500) || is_ab8505(ab8500))
+			ret = mfd_add_devices(ab8500->dev, 0, ab9540_ab8505_devs,
+					ARRAY_SIZE(ab9540_ab8505_devs), NULL,
+					ab8500->irq_base);
+		if (ret)
+			goto out_freeirq;
+	}
 
 	if (!no_bm) {
 		/* Add battery management devices */
@@ -1338,6 +1366,7 @@ static struct platform_driver ab8500_core_driver = {
 	.driver = {
 		.name = "ab8500-core",
 		.owner = THIS_MODULE,
+		.of_match_table = ab8500_match,
 	},
 	.probe	= ab8500_probe,
 	.remove	= __devexit_p(ab8500_remove),
-- 
1.7.9.5

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

* [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
@ 2012-05-17 13:45   ` Lee Jones
  2012-05-17 13:45 ` [PATCH 02/18] ARM: ux500: Remove unused i2c platform_data initialisation code Lee Jones
                     ` (18 subsequent siblings)
  19 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel, arnd, linus.walleij, grant.likely, cjb, broonie, sameo
  Cc: Lee Jones, linux-kernel

ab8500's probe() function is becoming quite large, so in the lead
up to Device Tree enablement which will fork the thread of execution
this patch splits it into 3 main areas; basic error checking will
remain in probe(), but regulator register initialisation and regulator
registration have been moved to their own functions which will
be called in sequence by probe() and the DT equivalent.

Cc: linux-kernel@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/ab8500.c |  150 +++++++++++++++++++++++++-------------------
 1 file changed, 87 insertions(+), 63 deletions(-)

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index d156390..3571b54 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -708,11 +708,92 @@ static struct ab8500_reg_init ab8500_reg_init[] = {
 	REG_INIT(AB8500_REGUCTRLDISCH2,		0x04, 0x44, 0x16),
 };
 
+static __devinit int
+ab8500_regulator_init_registers(struct platform_device *pdev, int id, int value)
+{
+	int err;
+
+	if (value & ~ab8500_reg_init[id].mask) {
+		dev_err(&pdev->dev,
+			"Configuration error: value outside mask.\n");
+		return -EINVAL;
+	}
+
+	err = abx500_mask_and_set_register_interruptible(
+		&pdev->dev,
+		ab8500_reg_init[id].bank,
+		ab8500_reg_init[id].addr,
+		ab8500_reg_init[id].mask,
+		value);
+	if (err < 0) {
+		dev_err(&pdev->dev,
+			"Failed to initialize 0x%02x, 0x%02x.\n",
+			ab8500_reg_init[id].bank,
+			ab8500_reg_init[id].addr);
+		return err;
+	}
+
+	dev_vdbg(&pdev->dev,
+		"init: 0x%02x, 0x%02x, 0x%02x, 0x%02x\n",
+		ab8500_reg_init[id].bank,
+		ab8500_reg_init[id].addr,
+		ab8500_reg_init[id].mask,
+		value);
+
+	return 0;
+}
+
+static __devinit int ab8500_regulator_register(struct platform_device *pdev,
+					struct regulator_init_data *init_data,
+					int id,
+					struct device_node *np)
+{
+	struct ab8500_regulator_info *info = NULL;
+	struct regulator_config config = { };
+	int err;
+
+	/* assign per-regulator data */
+	info = &ab8500_regulator_info[id];
+	info->dev = &pdev->dev;
+
+	config.dev = &pdev->dev;
+	config.init_data = init_data;
+	config.driver_data = info;
+	config.of_node = np;
+
+	/* fix for hardware before ab8500v2.0 */
+	if (abx500_get_chip_id(info->dev) < 0x20) {
+		if (info->desc.id == AB8500_LDO_AUX3) {
+			info->desc.n_voltages =
+				ARRAY_SIZE(ldo_vauxn_voltages);
+			info->voltages = ldo_vauxn_voltages;
+			info->voltages_len =
+				ARRAY_SIZE(ldo_vauxn_voltages);
+			info->voltage_mask = 0xf;
+		}
+	}
+
+	/* register regulator with framework */
+	info->regulator = regulator_register(&info->desc, &config);
+	if (IS_ERR(info->regulator)) {
+		err = PTR_ERR(info->regulator);
+		dev_err(&pdev->dev, "failed to register regulator %s\n",
+			info->desc.name);
+		/* when we fail, un-register all earlier regulators */
+		while (--id >= 0) {
+			info = &ab8500_regulator_info[id];
+			regulator_unregister(info->regulator);
+		}
+		return err;
+	}
+
+	return 0;
+}
+
 static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
 {
 	struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
 	struct ab8500_platform_data *pdata;
-	struct regulator_config config = { };
 	int i, err;
 
 	if (!ab8500) {
@@ -733,8 +814,7 @@ static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
 
 	/* initialize registers */
 	for (i = 0; i < pdata->num_regulator_reg_init; i++) {
-		int id;
-		u8 value;
+		int id, value;
 
 		id = pdata->regulator_reg_init[i].id;
 		value = pdata->regulator_reg_init[i].value;
@@ -745,73 +825,17 @@ static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
 				"Configuration error: id outside range.\n");
 			return -EINVAL;
 		}
-		if (value & ~ab8500_reg_init[id].mask) {
-			dev_err(&pdev->dev,
-				"Configuration error: value outside mask.\n");
-			return -EINVAL;
-		}
 
-		/* initialize register */
-		err = abx500_mask_and_set_register_interruptible(&pdev->dev,
-			ab8500_reg_init[id].bank,
-			ab8500_reg_init[id].addr,
-			ab8500_reg_init[id].mask,
-			value);
-		if (err < 0) {
-			dev_err(&pdev->dev,
-				"Failed to initialize 0x%02x, 0x%02x.\n",
-				ab8500_reg_init[id].bank,
-				ab8500_reg_init[id].addr);
+		err = ab8500_regulator_init_registers(pdev, id, value);
+		if (err < 0)
 			return err;
-		}
-		dev_vdbg(&pdev->dev,
-			"  init: 0x%02x, 0x%02x, 0x%02x, 0x%02x\n",
-			ab8500_reg_init[id].bank,
-			ab8500_reg_init[id].addr,
-			ab8500_reg_init[id].mask,
-			value);
 	}
 
 	/* register all regulators */
 	for (i = 0; i < ARRAY_SIZE(ab8500_regulator_info); i++) {
-		struct ab8500_regulator_info *info = NULL;
-
-		/* assign per-regulator data */
-		info = &ab8500_regulator_info[i];
-		info->dev = &pdev->dev;
-
-		config.dev = &pdev->dev;
-		config.init_data = &pdata->regulator[i];
-		config.driver_data = info;
-
-		/* fix for hardware before ab8500v2.0 */
-		if (abx500_get_chip_id(info->dev) < 0x20) {
-			if (info->desc.id == AB8500_LDO_AUX3) {
-				info->desc.n_voltages =
-					ARRAY_SIZE(ldo_vauxn_voltages);
-				info->voltages = ldo_vauxn_voltages;
-				info->voltages_len =
-					ARRAY_SIZE(ldo_vauxn_voltages);
-				info->voltage_mask = 0xf;
-			}
-		}
-
-		/* register regulator with framework */
-		info->regulator = regulator_register(&info->desc, &config);
-		if (IS_ERR(info->regulator)) {
-			err = PTR_ERR(info->regulator);
-			dev_err(&pdev->dev, "failed to register regulator %s\n",
-					info->desc.name);
-			/* when we fail, un-register all earlier regulators */
-			while (--i >= 0) {
-				info = &ab8500_regulator_info[i];
-				regulator_unregister(info->regulator);
-			}
+		err = ab8500_regulator_register(pdev, &pdata->regulator[i], i, NULL);
+		if (err < 0)
 			return err;
-		}
-
-		dev_vdbg(rdev_get_dev(info->regulator),
-			"%s-probed\n", info->desc.name);
 	}
 
 	return 0;
-- 
1.7.9.5


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

* [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces
@ 2012-05-17 13:45   ` Lee Jones
  0 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

ab8500's probe() function is becoming quite large, so in the lead
up to Device Tree enablement which will fork the thread of execution
this patch splits it into 3 main areas; basic error checking will
remain in probe(), but regulator register initialisation and regulator
registration have been moved to their own functions which will
be called in sequence by probe() and the DT equivalent.

Cc: linux-kernel at vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/ab8500.c |  150 +++++++++++++++++++++++++-------------------
 1 file changed, 87 insertions(+), 63 deletions(-)

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index d156390..3571b54 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -708,11 +708,92 @@ static struct ab8500_reg_init ab8500_reg_init[] = {
 	REG_INIT(AB8500_REGUCTRLDISCH2,		0x04, 0x44, 0x16),
 };
 
+static __devinit int
+ab8500_regulator_init_registers(struct platform_device *pdev, int id, int value)
+{
+	int err;
+
+	if (value & ~ab8500_reg_init[id].mask) {
+		dev_err(&pdev->dev,
+			"Configuration error: value outside mask.\n");
+		return -EINVAL;
+	}
+
+	err = abx500_mask_and_set_register_interruptible(
+		&pdev->dev,
+		ab8500_reg_init[id].bank,
+		ab8500_reg_init[id].addr,
+		ab8500_reg_init[id].mask,
+		value);
+	if (err < 0) {
+		dev_err(&pdev->dev,
+			"Failed to initialize 0x%02x, 0x%02x.\n",
+			ab8500_reg_init[id].bank,
+			ab8500_reg_init[id].addr);
+		return err;
+	}
+
+	dev_vdbg(&pdev->dev,
+		"init: 0x%02x, 0x%02x, 0x%02x, 0x%02x\n",
+		ab8500_reg_init[id].bank,
+		ab8500_reg_init[id].addr,
+		ab8500_reg_init[id].mask,
+		value);
+
+	return 0;
+}
+
+static __devinit int ab8500_regulator_register(struct platform_device *pdev,
+					struct regulator_init_data *init_data,
+					int id,
+					struct device_node *np)
+{
+	struct ab8500_regulator_info *info = NULL;
+	struct regulator_config config = { };
+	int err;
+
+	/* assign per-regulator data */
+	info = &ab8500_regulator_info[id];
+	info->dev = &pdev->dev;
+
+	config.dev = &pdev->dev;
+	config.init_data = init_data;
+	config.driver_data = info;
+	config.of_node = np;
+
+	/* fix for hardware before ab8500v2.0 */
+	if (abx500_get_chip_id(info->dev) < 0x20) {
+		if (info->desc.id == AB8500_LDO_AUX3) {
+			info->desc.n_voltages =
+				ARRAY_SIZE(ldo_vauxn_voltages);
+			info->voltages = ldo_vauxn_voltages;
+			info->voltages_len =
+				ARRAY_SIZE(ldo_vauxn_voltages);
+			info->voltage_mask = 0xf;
+		}
+	}
+
+	/* register regulator with framework */
+	info->regulator = regulator_register(&info->desc, &config);
+	if (IS_ERR(info->regulator)) {
+		err = PTR_ERR(info->regulator);
+		dev_err(&pdev->dev, "failed to register regulator %s\n",
+			info->desc.name);
+		/* when we fail, un-register all earlier regulators */
+		while (--id >= 0) {
+			info = &ab8500_regulator_info[id];
+			regulator_unregister(info->regulator);
+		}
+		return err;
+	}
+
+	return 0;
+}
+
 static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
 {
 	struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
 	struct ab8500_platform_data *pdata;
-	struct regulator_config config = { };
 	int i, err;
 
 	if (!ab8500) {
@@ -733,8 +814,7 @@ static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
 
 	/* initialize registers */
 	for (i = 0; i < pdata->num_regulator_reg_init; i++) {
-		int id;
-		u8 value;
+		int id, value;
 
 		id = pdata->regulator_reg_init[i].id;
 		value = pdata->regulator_reg_init[i].value;
@@ -745,73 +825,17 @@ static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
 				"Configuration error: id outside range.\n");
 			return -EINVAL;
 		}
-		if (value & ~ab8500_reg_init[id].mask) {
-			dev_err(&pdev->dev,
-				"Configuration error: value outside mask.\n");
-			return -EINVAL;
-		}
 
-		/* initialize register */
-		err = abx500_mask_and_set_register_interruptible(&pdev->dev,
-			ab8500_reg_init[id].bank,
-			ab8500_reg_init[id].addr,
-			ab8500_reg_init[id].mask,
-			value);
-		if (err < 0) {
-			dev_err(&pdev->dev,
-				"Failed to initialize 0x%02x, 0x%02x.\n",
-				ab8500_reg_init[id].bank,
-				ab8500_reg_init[id].addr);
+		err = ab8500_regulator_init_registers(pdev, id, value);
+		if (err < 0)
 			return err;
-		}
-		dev_vdbg(&pdev->dev,
-			"  init: 0x%02x, 0x%02x, 0x%02x, 0x%02x\n",
-			ab8500_reg_init[id].bank,
-			ab8500_reg_init[id].addr,
-			ab8500_reg_init[id].mask,
-			value);
 	}
 
 	/* register all regulators */
 	for (i = 0; i < ARRAY_SIZE(ab8500_regulator_info); i++) {
-		struct ab8500_regulator_info *info = NULL;
-
-		/* assign per-regulator data */
-		info = &ab8500_regulator_info[i];
-		info->dev = &pdev->dev;
-
-		config.dev = &pdev->dev;
-		config.init_data = &pdata->regulator[i];
-		config.driver_data = info;
-
-		/* fix for hardware before ab8500v2.0 */
-		if (abx500_get_chip_id(info->dev) < 0x20) {
-			if (info->desc.id == AB8500_LDO_AUX3) {
-				info->desc.n_voltages =
-					ARRAY_SIZE(ldo_vauxn_voltages);
-				info->voltages = ldo_vauxn_voltages;
-				info->voltages_len =
-					ARRAY_SIZE(ldo_vauxn_voltages);
-				info->voltage_mask = 0xf;
-			}
-		}
-
-		/* register regulator with framework */
-		info->regulator = regulator_register(&info->desc, &config);
-		if (IS_ERR(info->regulator)) {
-			err = PTR_ERR(info->regulator);
-			dev_err(&pdev->dev, "failed to register regulator %s\n",
-					info->desc.name);
-			/* when we fail, un-register all earlier regulators */
-			while (--i >= 0) {
-				info = &ab8500_regulator_info[i];
-				regulator_unregister(info->regulator);
-			}
+		err = ab8500_regulator_register(pdev, &pdata->regulator[i], i, NULL);
+		if (err < 0)
 			return err;
-		}
-
-		dev_vdbg(rdev_get_dev(info->regulator),
-			"%s-probed\n", info->desc.name);
 	}
 
 	return 0;
-- 
1.7.9.5

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

* [PATCH 10/18] ARM: ux500: Add support for ab8500 regulators into the Device Tree
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (8 preceding siblings ...)
  2012-05-17 13:45   ` Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-17 13:45   ` Lee Jones
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

Here we supply the information required to setup regulators
successfully on Snowball and other db8500 variants which use
the ab8500 regulators.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/db8500.dtsi  |   68 ++++++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/snowball.dts |    2 ++
 2 files changed, 70 insertions(+)

diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi
index 1188925..e69c3fa 100644
--- a/arch/arm/boot/dts/db8500.dtsi
+++ b/arch/arm/boot/dts/db8500.dtsi
@@ -202,6 +202,74 @@
 				reg = <5>; /* mailbox 5 is i2c */
 				interrupts = <0 40 0x4>;
 				stericsson,irq-base = <520>;
+
+				ab8500-regulators {
+					compatible = "stericsson,ab8500-regulator";
+
+					// supplies to the display/camera
+					ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
+						regulator-name = "V-DISPLAY";
+						regulator-min-microvolt = <2500000>;
+						regulator-max-microvolt = <2900000>;
+						regulator-boot-on;
+						/* BUG: If turned off MMC will be affected. */
+						regulator-always-on;
+					};
+
+					// supplies to the on-board eMMC
+					ab8500_ldo_aux2_reg: ab8500_ldo_aux2 {
+						regulator-name = "V-eMMC1";
+						regulator-min-microvolt = <1100000>;
+						regulator-max-microvolt = <3300000>;
+					};
+
+					// supply for VAUX3; SDcard slots
+					ab8500_ldo_aux3_reg: ab8500_ldo_aux3 {
+						regulator-name = "V-MMC-SD";
+						regulator-min-microvolt = <1100000>;
+						regulator-max-microvolt = <3300000>;
+					};
+
+					// supply for v-intcore12; VINTCORE12 LDO
+					ab8500_ldo_initcore_reg: ab8500_ldo_initcore {
+						regulator-name = "V-INTCORE";
+					};
+
+					// supply for tvout; gpadc; TVOUT LDO
+					ab8500_ldo_tvout_reg: ab8500_ldo_tvout {
+						regulator-name = "V-TVOUT";
+					};
+
+					// supply for ab8500-usb; USB LDO
+					ab8500_ldo_usb_reg: ab8500_ldo_usb {
+						regulator-name = "dummy";
+					};
+
+					// supply for ab8500-vaudio; VAUDIO LDO
+					ab8500_ldo_audio_reg: ab8500_ldo_audio {
+						regulator-name = "V-AUD";
+					};
+
+					// supply for v-anamic1 VAMic1-LDO
+					ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 {
+						regulator-name = "V-AMIC1";
+					};
+
+					// supply for v-amic2; VAMIC2 LDO; reuse constants for AMIC1
+					ab8500_ldo_amamic2_reg: ab8500_ldo_amamic2 {
+						regulator-name = "V-AMIC2";
+					};
+
+					// supply for v-dmic; VDMIC LDO
+					ab8500_ldo_dmic_reg: ab8500_ldo_dmic {
+						regulator-name = "V-DMIC";
+					};
+
+					// supply for U8500 CSI/DSI; VANA LDO
+					ab8500_ldo_ana_reg: ab8500_ldo_ana {
+						regulator-name = "V-CSI/DSI";
+					};
+				};
 			};
 		};
 
diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts
index 579c304..6b00350 100644
--- a/arch/arm/boot/dts/snowball.dts
+++ b/arch/arm/boot/dts/snowball.dts
@@ -94,6 +94,7 @@
 			arm,primecell-periphid = <0x10480180>;
 			max-frequency = <50000000>;
 			bus-width = <8>;
+			vmmc-supply = <&ab8500_ldo_aux3_reg>;
 			mmc-cap-mmc-highspeed;
 
 			cd-gpios  = <&gpio6 26 0x4>; // 218
@@ -107,6 +108,7 @@
 			arm,primecell-periphid = <0x10480180>;
 		        max-frequency = <50000000>;
 			bus-width = <8>;
+			vmmc-supply = <&ab8500_ldo_aux2_reg>;
 			mmc-cap-mmc-highspeed;
 
 			status = "okay";
-- 
1.7.9.5

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

* [PATCH 11/18] regulator: Enable the ab8500 for Device Tree
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
@ 2012-05-17 13:45   ` Lee Jones
  2012-05-17 13:45 ` [PATCH 02/18] ARM: ux500: Remove unused i2c platform_data initialisation code Lee Jones
                     ` (18 subsequent siblings)
  19 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel, arnd, linus.walleij, grant.likely, cjb, broonie, sameo
  Cc: Lee Jones, linux-kernel

Here we setup the ab8500 regulator driver for DT. We first do
this in the normal way, by providing a match structure during
initialisation, but then we provide information so that
whilst probing we can use existing data structures to do DT
look-ups.

Cc: linux-kernel@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/ab8500.c |   54 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 3571b54..e1b8c54 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -18,9 +18,12 @@
 #include <linux/platform_device.h>
 #include <linux/mfd/abx500.h>
 #include <linux/mfd/abx500/ab8500.h>
+#include <linux/of.h>
+#include <linux/regulator/of_regulator.h>
 #include <linux/regulator/driver.h>
 #include <linux/regulator/machine.h>
 #include <linux/regulator/ab8500.h>
+#include <linux/slab.h>
 
 /**
  * struct ab8500_regulator_info - ab8500 regulator information
@@ -790,12 +793,57 @@ static __devinit int ab8500_regulator_register(struct platform_device *pdev,
 	return 0;
 }
 
+static struct of_regulator_match ab8500_regulator_matches[] = {
+	{ .name	= "LDO-AUX1",    .driver_data = (void *) AB8500_LDO_AUX1, },
+	{ .name	= "LDO-AUX2",    .driver_data = (void *) AB8500_LDO_AUX2, },
+	{ .name	= "LDO-AUX3",    .driver_data = (void *) AB8500_LDO_AUX3, },
+	{ .name	= "LDO-INTCORE", .driver_data = (void *) AB8500_LDO_INTCORE, },
+	{ .name	= "LDO-TVOUT",   .driver_data = (void *) AB8500_LDO_TVOUT, },
+	{ .name = "LDO-USB",     .driver_data = (void *) AB8500_LDO_USB, },
+	{ .name = "LDO-AUDIO",   .driver_data = (void *) AB8500_LDO_AUDIO, },
+	{ .name	= "LDO-ANAMIC1", .driver_data = (void *) AB8500_LDO_ANAMIC1, },
+	{ .name	= "LDO-ANAMIC2", .driver_data = (void *) AB8500_LDO_ANAMIC2, },
+	{ .name	= "LDO-DMIC",    .driver_data = (void *) AB8500_LDO_DMIC, },
+	{ .name	= "LDO-ANA",     .driver_data = (void *) AB8500_LDO_ANA, },
+};
+
+static __devinit int
+ab8500_regulator_of_probe(struct platform_device *pdev, struct device_node *np)
+{
+	int err, i;
+
+	for (i = 0; i < ARRAY_SIZE(ab8500_regulator_info); i++) {
+		err = ab8500_regulator_register(
+			pdev, ab8500_regulator_matches[i].init_data,
+			i, ab8500_regulator_matches[i].of_node);
+		if (err)
+			return err;
+	}
+
+	return 0;
+}
+
 static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
 {
 	struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
 	struct ab8500_platform_data *pdata;
+	struct device_node *np = pdev->dev.of_node;
 	int i, err;
 
+	if (np) {
+		err = of_regulator_match(&pdev->dev, np,
+					ab8500_regulator_matches,
+					ARRAY_SIZE(ab8500_regulator_matches));
+		if (err < 0) {
+			dev_err(&pdev->dev,
+				"Error parsing regulator init data: %d\n", err);
+			return err;
+		}
+
+		err = ab8500_regulator_of_probe(pdev, np);
+		return err;
+	}
+
 	if (!ab8500) {
 		dev_err(&pdev->dev, "null mfd parent\n");
 		return -EINVAL;
@@ -858,12 +906,18 @@ static __devexit int ab8500_regulator_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id ab8500_regulator_match[] = {
+        { .compatible = "stericsson,ab8500-regulator", },
+        {}
+};
+
 static struct platform_driver ab8500_regulator_driver = {
 	.probe = ab8500_regulator_probe,
 	.remove = __devexit_p(ab8500_regulator_remove),
 	.driver         = {
 		.name   = "ab8500-regulator",
 		.owner  = THIS_MODULE,
+		.of_match_table = ab8500_regulator_match,
 	},
 };
 
-- 
1.7.9.5


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

* [PATCH 11/18] regulator: Enable the ab8500 for Device Tree
@ 2012-05-17 13:45   ` Lee Jones
  0 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

Here we setup the ab8500 regulator driver for DT. We first do
this in the normal way, by providing a match structure during
initialisation, but then we provide information so that
whilst probing we can use existing data structures to do DT
look-ups.

Cc: linux-kernel at vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/ab8500.c |   54 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 3571b54..e1b8c54 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -18,9 +18,12 @@
 #include <linux/platform_device.h>
 #include <linux/mfd/abx500.h>
 #include <linux/mfd/abx500/ab8500.h>
+#include <linux/of.h>
+#include <linux/regulator/of_regulator.h>
 #include <linux/regulator/driver.h>
 #include <linux/regulator/machine.h>
 #include <linux/regulator/ab8500.h>
+#include <linux/slab.h>
 
 /**
  * struct ab8500_regulator_info - ab8500 regulator information
@@ -790,12 +793,57 @@ static __devinit int ab8500_regulator_register(struct platform_device *pdev,
 	return 0;
 }
 
+static struct of_regulator_match ab8500_regulator_matches[] = {
+	{ .name	= "LDO-AUX1",    .driver_data = (void *) AB8500_LDO_AUX1, },
+	{ .name	= "LDO-AUX2",    .driver_data = (void *) AB8500_LDO_AUX2, },
+	{ .name	= "LDO-AUX3",    .driver_data = (void *) AB8500_LDO_AUX3, },
+	{ .name	= "LDO-INTCORE", .driver_data = (void *) AB8500_LDO_INTCORE, },
+	{ .name	= "LDO-TVOUT",   .driver_data = (void *) AB8500_LDO_TVOUT, },
+	{ .name = "LDO-USB",     .driver_data = (void *) AB8500_LDO_USB, },
+	{ .name = "LDO-AUDIO",   .driver_data = (void *) AB8500_LDO_AUDIO, },
+	{ .name	= "LDO-ANAMIC1", .driver_data = (void *) AB8500_LDO_ANAMIC1, },
+	{ .name	= "LDO-ANAMIC2", .driver_data = (void *) AB8500_LDO_ANAMIC2, },
+	{ .name	= "LDO-DMIC",    .driver_data = (void *) AB8500_LDO_DMIC, },
+	{ .name	= "LDO-ANA",     .driver_data = (void *) AB8500_LDO_ANA, },
+};
+
+static __devinit int
+ab8500_regulator_of_probe(struct platform_device *pdev, struct device_node *np)
+{
+	int err, i;
+
+	for (i = 0; i < ARRAY_SIZE(ab8500_regulator_info); i++) {
+		err = ab8500_regulator_register(
+			pdev, ab8500_regulator_matches[i].init_data,
+			i, ab8500_regulator_matches[i].of_node);
+		if (err)
+			return err;
+	}
+
+	return 0;
+}
+
 static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
 {
 	struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
 	struct ab8500_platform_data *pdata;
+	struct device_node *np = pdev->dev.of_node;
 	int i, err;
 
+	if (np) {
+		err = of_regulator_match(&pdev->dev, np,
+					ab8500_regulator_matches,
+					ARRAY_SIZE(ab8500_regulator_matches));
+		if (err < 0) {
+			dev_err(&pdev->dev,
+				"Error parsing regulator init data: %d\n", err);
+			return err;
+		}
+
+		err = ab8500_regulator_of_probe(pdev, np);
+		return err;
+	}
+
 	if (!ab8500) {
 		dev_err(&pdev->dev, "null mfd parent\n");
 		return -EINVAL;
@@ -858,12 +906,18 @@ static __devexit int ab8500_regulator_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id ab8500_regulator_match[] = {
+        { .compatible = "stericsson,ab8500-regulator", },
+        {}
+};
+
 static struct platform_driver ab8500_regulator_driver = {
 	.probe = ab8500_regulator_probe,
 	.remove = __devexit_p(ab8500_regulator_remove),
 	.driver         = {
 		.name   = "ab8500-regulator",
 		.owner  = THIS_MODULE,
+		.of_match_table = ab8500_regulator_match,
 	},
 };
 
-- 
1.7.9.5

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

* [PATCH 12/18] ARM: ux500: Disable platform setup of the ab8500 when DT is enabled
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (10 preceding siblings ...)
  2012-05-17 13:45   ` Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-17 21:22   ` Arnd Bergmann
  2012-05-17 13:45 ` [PATCH 13/18] ARM: ux500: Apply ab8500-debug node do the db8500 DT structure Lee Jones
                   ` (7 subsequent siblings)
  19 siblings, 1 reply; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

The final piece of the ab8500 puzzle. Here we prevent any of the ab8500-*
drivers from being registered from platform code when Device Tree is
enabled, as we expect DT do probe each of these individually. We also
provide the relevant compatible strings, so that DT knows which nodes
it needs to pay attention to during population.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/mach-ux500/board-mop500.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 46df945..de94b2d 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -601,7 +601,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
 
 static struct platform_device *snowball_of_platform_devs[] __initdata = {
 	&snowball_key_dev,
-	&ab8500_device,
 };
 
 static void __init mop500_init_machine(void)
@@ -767,6 +766,9 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
 static const struct of_device_id u8500_local_bus_nodes[] = {
 	/* only create devices below soc node */
 	{ .compatible = "stericsson,db8500", },
+	{ .compatible = "stericsson,db8500-prcmu", },
+	{ .compatible = "stericsson,ab8500", },
+	{ .compatible = "stericsson,ab8500-regulator", },
 	{ .compatible = "simple-bus"},
 	{ },
 };
@@ -802,7 +804,6 @@ static void __init u8500_init_machine(void)
 				ARRAY_SIZE(mop500_platform_devs));
 
 		mop500_sdi_init(parent);
-
 		i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
 		i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
 		i2c_register_board_info(2, mop500_i2c2_devices,
-- 
1.7.9.5

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

* [PATCH 13/18] ARM: ux500: Apply ab8500-debug node do the db8500 DT structure
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (11 preceding siblings ...)
  2012-05-17 13:45 ` [PATCH 12/18] ARM: ux500: Disable platform setup of the ab8500 when DT is enabled Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-20 21:00   ` Linus Walleij
  2012-05-17 13:45 ` [PATCH 14/18] mfd: Enable ab8500-debug when Device Tree is enabled Lee Jones
                   ` (6 subsequent siblings)
  19 siblings, 1 reply; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

This node has no properties. It merely allows probing of the
ab8500-debugfs driver during Device Tree initialisation.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/db8500.dtsi |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi
index e69c3fa..0dc24e6 100644
--- a/arch/arm/boot/dts/db8500.dtsi
+++ b/arch/arm/boot/dts/db8500.dtsi
@@ -203,6 +203,10 @@
 				interrupts = <0 40 0x4>;
 				stericsson,irq-base = <520>;
 
+				ab8500-debugfs {
+					compatible = "stericsson,ab8500-debug";
+				};
+
 				ab8500-regulators {
 					compatible = "stericsson,ab8500-regulator";
 
-- 
1.7.9.5

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

* [PATCH 14/18] mfd: Enable ab8500-debug when Device Tree is enabled
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (12 preceding siblings ...)
  2012-05-17 13:45 ` [PATCH 13/18] ARM: ux500: Apply ab8500-debug node do the db8500 DT structure Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-20 21:00   ` Linus Walleij
  2012-05-17 13:45 ` [PATCH 15/18] mfd: Prevent unassigned pointer from being used in ab8500-gpadc driver Lee Jones
                   ` (5 subsequent siblings)
  19 siblings, 1 reply; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

Allow the ab8500-debugfs driver to be probed during DT start-up.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/ab8500-debugfs.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
index 9a0211a..50c4c89 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -608,10 +608,16 @@ static int __devexit ab8500_debug_remove(struct platform_device *plf)
 	return 0;
 }
 
+static const struct of_device_id ab8500_debug_match[] = {
+        { .compatible = "stericsson,ab8500-debug", },
+        {}
+};
+
 static struct platform_driver ab8500_debug_driver = {
 	.driver = {
 		.name = "ab8500-debug",
 		.owner = THIS_MODULE,
+		.of_match_table = ab8500_debug_match,
 	},
 	.probe  = ab8500_debug_probe,
 	.remove = __devexit_p(ab8500_debug_remove)
-- 
1.7.9.5

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

* [PATCH 15/18] mfd: Prevent unassigned pointer from being used in ab8500-gpadc driver
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (13 preceding siblings ...)
  2012-05-17 13:45 ` [PATCH 14/18] mfd: Enable ab8500-debug when Device Tree is enabled Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-20 21:02   ` Linus Walleij
  2012-05-17 13:45 ` [PATCH 16/18] ARM: ux500: Add a ab8500-gpadc node to the db8500 Device Tree Lee Jones
                   ` (4 subsequent siblings)
  19 siblings, 1 reply; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

Before this patch if probe failed to find the platform IRQ it
would attempt to print a message out using dev_err, which in
turn was being passed an unassigned pointer. This patch
ensures the information passed to dev_err is correct.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/ab8500-gpadc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c
index c39fc71..c1656ab 100644
--- a/drivers/mfd/ab8500-gpadc.c
+++ b/drivers/mfd/ab8500-gpadc.c
@@ -584,7 +584,7 @@ static int __devinit ab8500_gpadc_probe(struct platform_device *pdev)
 
 	gpadc->irq = platform_get_irq_byname(pdev, "SW_CONV_END");
 	if (gpadc->irq < 0) {
-		dev_err(gpadc->dev, "failed to get platform irq-%d\n",
+		dev_err(&pdev->dev, "failed to get platform irq-%d\n",
 			gpadc->irq);
 		ret = gpadc->irq;
 		goto fail;
-- 
1.7.9.5

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

* [PATCH 16/18] ARM: ux500: Add a ab8500-gpadc node to the db8500 Device Tree
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (14 preceding siblings ...)
  2012-05-17 13:45 ` [PATCH 15/18] mfd: Prevent unassigned pointer from being used in ab8500-gpadc driver Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-20 21:01   ` Linus Walleij
  2012-05-17 13:45 ` [PATCH 17/18] mfd: Enable ab8500-gpadc driver for " Lee Jones
                   ` (3 subsequent siblings)
  19 siblings, 1 reply; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

This patch provides support for the ab8500-gpadc driver.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/db8500.dtsi |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi
index 0dc24e6..e14001b 100644
--- a/arch/arm/boot/dts/db8500.dtsi
+++ b/arch/arm/boot/dts/db8500.dtsi
@@ -207,6 +207,14 @@
 					compatible = "stericsson,ab8500-debug";
 				};
 
+				ab8500-gpadc {
+					compatible = "stericsson,ab8500-gpadc";
+					interrupts = <0 32 0x4
+						      0 39 0x4>;
+					interrupt-names = "HW_CONV_END", "SW_CONV_END";
+					vddadc-supply = <&ab8500_ldo_tvout_reg>;
+				};
+
 				ab8500-regulators {
 					compatible = "stericsson,ab8500-regulator";
 
-- 
1.7.9.5

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

* [PATCH 17/18] mfd: Enable ab8500-gpadc driver for Device Tree
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (15 preceding siblings ...)
  2012-05-17 13:45 ` [PATCH 16/18] ARM: ux500: Add a ab8500-gpadc node to the db8500 Device Tree Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-20 21:02   ` Linus Walleij
  2012-05-17 13:45 ` [PATCH 18/18] ARM: ux500: Add support for input/ponkey into the db8500's " Lee Jones
                   ` (2 subsequent siblings)
  19 siblings, 1 reply; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

This patch will allow the ab8500-gpadc driver to be probed during
Device Tree enabled boot.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/ab8500-gpadc.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c
index c1656ab..b86fd8e 100644
--- a/drivers/mfd/ab8500-gpadc.c
+++ b/drivers/mfd/ab8500-gpadc.c
@@ -648,12 +648,18 @@ static int __devexit ab8500_gpadc_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id ab8500_gpadc_match[] = {
+	{ .compatible = "stericsson,ab8500-gpadc", },
+	{}
+};
+
 static struct platform_driver ab8500_gpadc_driver = {
 	.probe = ab8500_gpadc_probe,
 	.remove = __devexit_p(ab8500_gpadc_remove),
 	.driver = {
 		.name = "ab8500-gpadc",
 		.owner = THIS_MODULE,
+		.of_match_table = ab8500_gpadc_match,
 	},
 };
 
-- 
1.7.9.5

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

* [PATCH 18/18] ARM: ux500: Add support for input/ponkey into the db8500's Device Tree
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (16 preceding siblings ...)
  2012-05-17 13:45 ` [PATCH 17/18] mfd: Enable ab8500-gpadc driver for " Lee Jones
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-20 21:03   ` Linus Walleij
  2012-05-17 21:25 ` [PATCH 00/18] DT enablement for Snowball Arnd Bergmann
  2012-05-19 15:25 ` Samuel Ortiz
  19 siblings, 1 reply; 57+ messages in thread
From: Lee Jones @ 2012-05-17 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/db8500.dtsi |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi
index e14001b..076831c 100644
--- a/arch/arm/boot/dts/db8500.dtsi
+++ b/arch/arm/boot/dts/db8500.dtsi
@@ -215,6 +215,13 @@
 					vddadc-supply = <&ab8500_ldo_tvout_reg>;
 				};
 
+				ab8500-ponkey {
+					compatible = "stericsson,ab8500-ponkey";
+					interrupts = <0 6 0x4
+						      0 7 0x4>;
+					interrupt-names = "ONKEY_DBF", "ONKEY_DBR";
+				};
+
 				ab8500-regulators {
 					compatible = "stericsson,ab8500-regulator";
 
-- 
1.7.9.5

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

* [PATCH 12/18] ARM: ux500: Disable platform setup of the ab8500 when DT is enabled
  2012-05-17 13:45 ` [PATCH 12/18] ARM: ux500: Disable platform setup of the ab8500 when DT is enabled Lee Jones
@ 2012-05-17 21:22   ` Arnd Bergmann
  2012-05-17 21:58     ` Lee Jones
  0 siblings, 1 reply; 57+ messages in thread
From: Arnd Bergmann @ 2012-05-17 21:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 17 May 2012, Lee Jones wrote:
> @@ -601,7 +601,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
>  
>  static struct platform_device *snowball_of_platform_devs[] __initdata = {
>         &snowball_key_dev,
> -       &ab8500_device,
>  };
>  
>  static void __init mop500_init_machine(void)
> @@ -767,6 +766,9 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
>  static const struct of_device_id u8500_local_bus_nodes[] = {
>         /* only create devices below soc node */
>         { .compatible = "stericsson,db8500", },
> +       { .compatible = "stericsson,db8500-prcmu", },
> +       { .compatible = "stericsson,ab8500", },
> +       { .compatible = "stericsson,ab8500-regulator", },
>         { .compatible = "simple-bus"},
>         { },
>  };

You remove the ab8500_device registration from snowball but add the prcmu and ab8500
in a place that is common to all three machines, so they will show up twice
on mop500 and hrefv60. If those two are not broken before this patch, I think
they are after it.

I think the two options you have here are to either remove the ab8500 device from
mop500_platform_devs[] too (essentially registering mop500_gpio_keys_device
and ab8500_device separately when you need them, instead of doing the loop),
or to split u8500_local_bus_nodes so you use a different table for snowball
from the one you use for the other boards.

	Arnd

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

* [PATCH 00/18] DT enablement for Snowball
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (17 preceding siblings ...)
  2012-05-17 13:45 ` [PATCH 18/18] ARM: ux500: Add support for input/ponkey into the db8500's " Lee Jones
@ 2012-05-17 21:25 ` Arnd Bergmann
  2012-05-17 21:41   ` Mark Brown
  2012-05-19 15:25 ` Samuel Ortiz
  19 siblings, 1 reply; 57+ messages in thread
From: Arnd Bergmann @ 2012-05-17 21:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 17 May 2012, Lee Jones wrote:
> Hopefully the penultimate large patch-stack for Snowball
> enablement. After that only bits and bobs will remain.

Hi Lee,

I'm quite happy with the series overall, but it's really late for v3.5 now,
and I can't really judge the quality of the regulator changes. If LinusW,
Mark, Grant and Olof are all ok with this series, I think we can add it
in as a late branch for the 3.5 merge window. If there are serious
objections I think we should do it for 3.6 instead.

I've commented on one patch that looks wrong to me, but it won't be hard
to fix that.

	Arnd

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

* [PATCH 00/18] DT enablement for Snowball
  2012-05-17 21:25 ` [PATCH 00/18] DT enablement for Snowball Arnd Bergmann
@ 2012-05-17 21:41   ` Mark Brown
  2012-05-17 21:49     ` Lee Jones
  0 siblings, 1 reply; 57+ messages in thread
From: Mark Brown @ 2012-05-17 21:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 17, 2012 at 09:25:14PM +0000, Arnd Bergmann wrote:

> I'm quite happy with the series overall, but it's really late for v3.5 now,
> and I can't really judge the quality of the regulator changes. If LinusW,
> Mark, Grant and Olof are all ok with this series, I think we can add it
> in as a late branch for the 3.5 merge window. If there are serious
> objections I think we should do it for 3.6 instead.

I was just going to apply the regulator changes tomorrow morning (not
the DT updates, just the drivers/regulator bits), I'd mostly been
holding off to give Linus a chance to ack.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120517/1dfce0ff/attachment.sig>

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

* [PATCH 00/18] DT enablement for Snowball
  2012-05-17 21:41   ` Mark Brown
@ 2012-05-17 21:49     ` Lee Jones
  0 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-17 21:49 UTC (permalink / raw)
  To: linux-arm-kernel

On 17/05/12 22:41, Mark Brown wrote:
> On Thu, May 17, 2012 at 09:25:14PM +0000, Arnd Bergmann wrote:
>
>> I'm quite happy with the series overall, but it's really late for v3.5 now,
>> and I can't really judge the quality of the regulator changes. If LinusW,
>> Mark, Grant and Olof are all ok with this series, I think we can add it
>> in as a late branch for the 3.5 merge window. If there are serious
>> objections I think we should do it for 3.6 instead.

I will work though your comments first thing.

> I was just going to apply the regulator changes tomorrow morning (not
> the DT updates, just the drivers/regulator bits), I'd mostly been
> holding off to give Linus a chance to ack.

Thanks Mark.

They should be orthogonal to each other, so shouldn't require the DT 
updates straight away. Hopefully Linus will be round to it tomorrow. 
He's usually fairly efficient.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 12/18] ARM: ux500: Disable platform setup of the ab8500 when DT is enabled
  2012-05-17 21:22   ` Arnd Bergmann
@ 2012-05-17 21:58     ` Lee Jones
  2012-05-18 10:38       ` Arnd Bergmann
  0 siblings, 1 reply; 57+ messages in thread
From: Lee Jones @ 2012-05-17 21:58 UTC (permalink / raw)
  To: linux-arm-kernel

On 17/05/12 22:22, Arnd Bergmann wrote:
> On Thursday 17 May 2012, Lee Jones wrote:
>> @@ -601,7 +601,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
>>
>>   static struct platform_device *snowball_of_platform_devs[] __initdata = {
>>          &snowball_key_dev,
>> -&ab8500_device,
>>   };
>>
>>   static void __init mop500_init_machine(void)
>> @@ -767,6 +766,9 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
>>   static const struct of_device_id u8500_local_bus_nodes[] = {
>>          /* only create devices below soc node */
>>          { .compatible = "stericsson,db8500", },
>> +       { .compatible = "stericsson,db8500-prcmu", },
>> +       { .compatible = "stericsson,ab8500", },
>> +       { .compatible = "stericsson,ab8500-regulator", },
>>          { .compatible = "simple-bus"},
>>          { },
>>   };
>
> You remove the ab8500_device registration from snowball but add the prcmu and ab8500
> in a place that is common to all three machines, so they will show up twice
> on mop500 and hrefv60. If those two are not broken before this patch, I think
> they are after it.
>
> I think the two options you have here are to either remove the ab8500 device from
> mop500_platform_devs[] too (essentially registering mop500_gpio_keys_device
> and ab8500_device separately when you need them, instead of doing the loop),
> or to split u8500_local_bus_nodes so you use a different table for snowball
> from the one you use for the other boards.

It's late here, so if I have the wrong end of the stick, just tell me ..

I figure that at the same time as enabling the other machines we'll be 
stripping out the platform registrations in the same way as be have done 
with Snowball. This will prevent two of anything from being registered 
at any time.

Or am I mistaken?

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces
  2012-05-17 13:45   ` Lee Jones
@ 2012-05-18  7:36     ` Mark Brown
  -1 siblings, 0 replies; 57+ messages in thread
From: Mark Brown @ 2012-05-18  7:36 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, arnd, linus.walleij, grant.likely, cjb, sameo,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]

On Thu, May 17, 2012 at 02:45:14PM +0100, Lee Jones wrote:
> ab8500's probe() function is becoming quite large, so in the lead
> up to Device Tree enablement which will fork the thread of execution
> this patch splits it into 3 main areas; basic error checking will
> remain in probe(), but regulator register initialisation and regulator
> registration have been moved to their own functions which will
> be called in sequence by probe() and the DT equivalent.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces
@ 2012-05-18  7:36     ` Mark Brown
  0 siblings, 0 replies; 57+ messages in thread
From: Mark Brown @ 2012-05-18  7:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 17, 2012 at 02:45:14PM +0100, Lee Jones wrote:
> ab8500's probe() function is becoming quite large, so in the lead
> up to Device Tree enablement which will fork the thread of execution
> this patch splits it into 3 main areas; basic error checking will
> remain in probe(), but regulator register initialisation and regulator
> registration have been moved to their own functions which will
> be called in sequence by probe() and the DT equivalent.

Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120518/f852959b/attachment.sig>

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

* Re: [PATCH 11/18] regulator: Enable the ab8500 for Device Tree
  2012-05-17 13:45   ` Lee Jones
@ 2012-05-18  7:36     ` Mark Brown
  -1 siblings, 0 replies; 57+ messages in thread
From: Mark Brown @ 2012-05-18  7:36 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, arnd, linus.walleij, grant.likely, cjb, sameo,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

On Thu, May 17, 2012 at 02:45:16PM +0100, Lee Jones wrote:
> Here we setup the ab8500 regulator driver for DT. We first do
> this in the normal way, by providing a match structure during
> initialisation, but then we provide information so that
> whilst probing we can use existing data structures to do DT
> look-ups.

Applied, thanks.  This and your previous patch look really good now!

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* [PATCH 11/18] regulator: Enable the ab8500 for Device Tree
@ 2012-05-18  7:36     ` Mark Brown
  0 siblings, 0 replies; 57+ messages in thread
From: Mark Brown @ 2012-05-18  7:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 17, 2012 at 02:45:16PM +0100, Lee Jones wrote:
> Here we setup the ab8500 regulator driver for DT. We first do
> this in the normal way, by providing a match structure during
> initialisation, but then we provide information so that
> whilst probing we can use existing data structures to do DT
> look-ups.

Applied, thanks.  This and your previous patch look really good now!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120518/8656c2cf/attachment.sig>

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

* Re: [PATCH 11/18] regulator: Enable the ab8500 for Device Tree
  2012-05-18  7:36     ` Mark Brown
@ 2012-05-18  7:52       ` Lee Jones
  -1 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-18  7:52 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-arm-kernel, arnd, linus.walleij, grant.likely, cjb, sameo,
	linux-kernel

On 18/05/12 08:36, Mark Brown wrote:
> On Thu, May 17, 2012 at 02:45:16PM +0100, Lee Jones wrote:
>> Here we setup the ab8500 regulator driver for DT. We first do
>> this in the normal way, by providing a match structure during
>> initialisation, but then we provide information so that
>> whilst probing we can use existing data structures to do DT
>> look-ups.
>
> Applied, thanks.  This and your previous patch look really good now!

Cheers Mark. Much obliged.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 11/18] regulator: Enable the ab8500 for Device Tree
@ 2012-05-18  7:52       ` Lee Jones
  0 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-18  7:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 18/05/12 08:36, Mark Brown wrote:
> On Thu, May 17, 2012 at 02:45:16PM +0100, Lee Jones wrote:
>> Here we setup the ab8500 regulator driver for DT. We first do
>> this in the normal way, by providing a match structure during
>> initialisation, but then we provide information so that
>> whilst probing we can use existing data structures to do DT
>> look-ups.
>
> Applied, thanks.  This and your previous patch look really good now!

Cheers Mark. Much obliged.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces
  2012-05-18  7:36     ` Mark Brown
@ 2012-05-18  7:53       ` Lee Jones
  -1 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-18  7:53 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-arm-kernel, arnd, linus.walleij, grant.likely, cjb, sameo,
	linux-kernel

On 18/05/12 08:36, Mark Brown wrote:
> On Thu, May 17, 2012 at 02:45:14PM +0100, Lee Jones wrote:
>> ab8500's probe() function is becoming quite large, so in the lead
>> up to Device Tree enablement which will fork the thread of execution
>> this patch splits it into 3 main areas; basic error checking will
>> remain in probe(), but regulator register initialisation and regulator
>> registration have been moved to their own functions which will
>> be called in sequence by probe() and the DT equivalent.
>
> Applied, thanks.

Thank you.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces
@ 2012-05-18  7:53       ` Lee Jones
  0 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-18  7:53 UTC (permalink / raw)
  To: linux-arm-kernel

On 18/05/12 08:36, Mark Brown wrote:
> On Thu, May 17, 2012 at 02:45:14PM +0100, Lee Jones wrote:
>> ab8500's probe() function is becoming quite large, so in the lead
>> up to Device Tree enablement which will fork the thread of execution
>> this patch splits it into 3 main areas; basic error checking will
>> remain in probe(), but regulator register initialisation and regulator
>> registration have been moved to their own functions which will
>> be called in sequence by probe() and the DT equivalent.
>
> Applied, thanks.

Thank you.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 12/18] ARM: ux500: Disable platform setup of the ab8500 when DT is enabled
  2012-05-17 21:58     ` Lee Jones
@ 2012-05-18 10:38       ` Arnd Bergmann
  2012-05-18 11:00         ` Lee Jones
  0 siblings, 1 reply; 57+ messages in thread
From: Arnd Bergmann @ 2012-05-18 10:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 17 May 2012, Lee Jones wrote:
> > I think the two options you have here are to either remove the ab8500 device from
> > mop500_platform_devs[] too (essentially registering mop500_gpio_keys_device
> > and ab8500_device separately when you need them, instead of doing the loop),
> > or to split u8500_local_bus_nodes so you use a different table for snowball
> > from the one you use for the other boards.
> 
> It's late here, so if I have the wrong end of the stick, just tell me ..
> 
> I figure that at the same time as enabling the other machines we'll be 
> stripping out the platform registrations in the same way as be have done 
> with Snowball. This will prevent two of anything from being registered 
> at any time.
> 
> Or am I mistaken?

Well, as far as I can tell, you duplicated a lot of functions or
data structures so you can remove the parts one by one, but when you
duplicated snowball_platform_devs[] you did not also duplicate
mop500_platform_devs[].

	Arnd

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

* [PATCH 12/18] ARM: ux500: Disable platform setup of the ab8500 when DT is enabled
  2012-05-18 10:38       ` Arnd Bergmann
@ 2012-05-18 11:00         ` Lee Jones
  2012-05-18 11:12           ` Arnd Bergmann
  0 siblings, 1 reply; 57+ messages in thread
From: Lee Jones @ 2012-05-18 11:00 UTC (permalink / raw)
  To: linux-arm-kernel

On 18/05/12 11:38, Arnd Bergmann wrote:
> On Thursday 17 May 2012, Lee Jones wrote:
>>> I think the two options you have here are to either remove the ab8500 device from
>>> mop500_platform_devs[] too (essentially registering mop500_gpio_keys_device
>>> and ab8500_device separately when you need them, instead of doing the loop),
>>> or to split u8500_local_bus_nodes so you use a different table for snowball
>>> from the one you use for the other boards.
>>
>> It's late here, so if I have the wrong end of the stick, just tell me ..
>>
>> I figure that at the same time as enabling the other machines we'll be
>> stripping out the platform registrations in the same way as be have done
>> with Snowball. This will prevent two of anything from being registered
>> at any time.
>>
>> Or am I mistaken?
>
> Well, as far as I can tell, you duplicated a lot of functions or
> data structures so you can remove the parts one by one, but when you
> duplicated snowball_platform_devs[] you did not also duplicate
> mop500_platform_devs[].

That's true, but why would I have done? I would think that whoever 
writes the DT for that platform would do that?

So I see four ways round this: 1) disable all the nodes in db8500.dtsi 
and force snowball.dts and mop500.dts et. al to re-enable them as 
appropriate. 2) duplicate mop500_platform_devs[] for DT booting and 
strip out the ab8500 entry, essentially only leaving in only
mop500_gpio_keys_device, 3) DT gpio-keys for the mop500 and do away with 
platform_add()ing mop500_platform_devs[] in u8500_init_machine() 
altogether. Or my personal favorite 4) as there is no DT or compatible 
entry for st-ericsson,mop500 or st-ericsson,hrefv60+ yet, don't worry 
about it and let whoever enables DT for those platforms (me?) to deal 
with at a later date.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 12/18] ARM: ux500: Disable platform setup of the ab8500 when DT is enabled
  2012-05-18 11:00         ` Lee Jones
@ 2012-05-18 11:12           ` Arnd Bergmann
  2012-05-18 12:36             ` Lee Jones
  0 siblings, 1 reply; 57+ messages in thread
From: Arnd Bergmann @ 2012-05-18 11:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 18 May 2012, Lee Jones wrote:
> > Well, as far as I can tell, you duplicated a lot of functions or
> > data structures so you can remove the parts one by one, but when you
> > duplicated snowball_platform_devs[] you did not also duplicate
> > mop500_platform_devs[].
> 
> That's true, but why would I have done? I would think that whoever 
> writes the DT for that platform would do that?
 
In order to not break them when you add the nodes to their device tree? ;-)

> So I see four ways round this: 1) disable all the nodes in db8500.dtsi 
> and force snowball.dts and mop500.dts et. al to re-enable them as 
> appropriate. 2) duplicate mop500_platform_devs[] for DT booting and 
> strip out the ab8500 entry, essentially only leaving in only
> mop500_gpio_keys_device, 3) DT gpio-keys for the mop500 and do away with 
> platform_add()ing mop500_platform_devs[] in u8500_init_machine() 
> altogether. Or my personal favorite 4) as there is no DT or compatible 
> entry for st-ericsson,mop500 or st-ericsson,hrefv60+ yet, don't worry 
> about it and let whoever enables DT for those platforms (me?) to deal 
> with at a later date.

Well, you've got a point there that no device tree has been written
yet for those boards. I think my preference would be 2), since you can
do that in a way that actually removes code (see below), but it's also
fine if you want to leave it as is for now.

	Arnd

diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 182dc4e..4ca56615 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -806,8 +806,7 @@ static void __init u8500_init_machine(void)
 
 	parent = u8500_init_devices();
 
-	for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
-		mop500_platform_devs[i]->dev.parent = parent;
+	mop500_gpio_keys_device.parent = parent;
 	for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
 		snowball_platform_devs[i]->dev.parent = parent;
 
@@ -816,9 +815,7 @@ static void __init u8500_init_machine(void)
 
 	if (of_machine_is_compatible("st-ericsson,mop500")) {
 		mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
-
-		platform_add_devices(mop500_platform_devs,
-				ARRAY_SIZE(mop500_platform_devs));
+		platform_device_register(&mop500_gpio_keys_device);
 
 		mop500_sdi_init(parent);
 
@@ -839,8 +836,7 @@ static void __init u8500_init_machine(void)
 		 * instead.
 		 */
 		mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
-		platform_add_devices(mop500_platform_devs,
-				ARRAY_SIZE(mop500_platform_devs));
+		platform_device_register(&mop500_gpio_keys_device);
 
 		hrefv60_sdi_init(parent);
 

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

* [PATCH 12/18] ARM: ux500: Disable platform setup of the ab8500 when DT is enabled
  2012-05-18 11:12           ` Arnd Bergmann
@ 2012-05-18 12:36             ` Lee Jones
  2012-05-18 20:38               ` Arnd Bergmann
  0 siblings, 1 reply; 57+ messages in thread
From: Lee Jones @ 2012-05-18 12:36 UTC (permalink / raw)
  To: linux-arm-kernel

On 18/05/12 12:12, Arnd Bergmann wrote:
> On Friday 18 May 2012, Lee Jones wrote:
>>> Well, as far as I can tell, you duplicated a lot of functions or
>>> data structures so you can remove the parts one by one, but when you
>>> duplicated snowball_platform_devs[] you did not also duplicate
>>> mop500_platform_devs[].
>>
>> That's true, but why would I have done? I would think that whoever
>> writes the DT for that platform would do that?
>
> In order to not break them when you add the nodes to their device tree? ;-)
>
>> So I see four ways round this: 1) disable all the nodes in db8500.dtsi
>> and force snowball.dts and mop500.dts et. al to re-enable them as
>> appropriate. 2) duplicate mop500_platform_devs[] for DT booting and
>> strip out the ab8500 entry, essentially only leaving in only
>> mop500_gpio_keys_device, 3) DT gpio-keys for the mop500 and do away with
>> platform_add()ing mop500_platform_devs[] in u8500_init_machine()
>> altogether. Or my personal favorite 4) as there is no DT or compatible
>> entry for st-ericsson,mop500 or st-ericsson,hrefv60+ yet, don't worry
>> about it and let whoever enables DT for those platforms (me?) to deal
>> with at a later date.
>
> Well, you've got a point there that no device tree has been written
> yet for those boards. I think my preference would be 2), since you can
> do that in a way that actually removes code (see below), but it's also
> fine if you want to leave it as is for now.
>
> 	Arnd
>
> diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
> index 182dc4e..4ca56615 100644
> --- a/arch/arm/mach-ux500/board-mop500.c
> +++ b/arch/arm/mach-ux500/board-mop500.c
> @@ -806,8 +806,7 @@ static void __init u8500_init_machine(void)
>
>   	parent = u8500_init_devices();
>
> -	for (i = 0; i<  ARRAY_SIZE(mop500_platform_devs); i++)
> -		mop500_platform_devs[i]->dev.parent = parent;
> +	mop500_gpio_keys_device.parent = parent;
>   	for (i = 0; i<  ARRAY_SIZE(snowball_platform_devs); i++)
>   		snowball_platform_devs[i]->dev.parent = parent;
>
> @@ -816,9 +815,7 @@ static void __init u8500_init_machine(void)
>
>   	if (of_machine_is_compatible("st-ericsson,mop500")) {
>   		mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
> -
> -		platform_add_devices(mop500_platform_devs,
> -				ARRAY_SIZE(mop500_platform_devs));
> +		platform_device_register(&mop500_gpio_keys_device);
>
>   		mop500_sdi_init(parent);
>
> @@ -839,8 +836,7 @@ static void __init u8500_init_machine(void)
>   		 * instead.
>   		 */
>   		mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
> -		platform_add_devices(mop500_platform_devs,
> -				ARRAY_SIZE(mop500_platform_devs));
> +		platform_device_register(&mop500_gpio_keys_device);
>
>   		hrefv60_sdi_init(parent);

This is nice. Can I leave it for a now and submit this with the rest of 
my clean-ups? I have a nice TODO list now that this would fit nicely 
into. The way I see it, as long as this is submitted before we add a 
mop500.dts then it's not going to cause anyone issues.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 12/18] ARM: ux500: Disable platform setup of the ab8500 when DT is enabled
  2012-05-18 12:36             ` Lee Jones
@ 2012-05-18 20:38               ` Arnd Bergmann
  0 siblings, 0 replies; 57+ messages in thread
From: Arnd Bergmann @ 2012-05-18 20:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 18 May 2012, Lee Jones wrote:
> This is nice. Can I leave it for a now and submit this with the rest of 
> my clean-ups? I have a nice TODO list now that this would fit nicely 
> into. The way I see it, as long as this is submitted before we add a 
> mop500.dts then it's not going to cause anyone issues.

Yes, fine with me. I was thinking you'd fold it into the patch we
are commenting on, but if that's problematic, just add it to the
end of your queue.

	Arnd

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

* [PATCH 00/18] DT enablement for Snowball
  2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
                   ` (18 preceding siblings ...)
  2012-05-17 21:25 ` [PATCH 00/18] DT enablement for Snowball Arnd Bergmann
@ 2012-05-19 15:25 ` Samuel Ortiz
  19 siblings, 0 replies; 57+ messages in thread
From: Samuel Ortiz @ 2012-05-19 15:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Lee,

On Thu, May 17, 2012 at 02:45:05PM +0100, Lee Jones wrote:
> Hopefully the penultimate large patch-stack for Snowball
> enablement. After that only bits and bobs will remain.
> 
>  arch/arm/boot/dts/db8500.dtsi      |   92 +++++++++++++++-
>  arch/arm/boot/dts/snowball.dts     |    3 +
>  arch/arm/configs/u8500_defconfig   |    3 +
>  arch/arm/mach-ux500/Kconfig        |    1 +
>  arch/arm/mach-ux500/board-mop500.c |   55 +++-------
>  drivers/i2c/busses/i2c-nomadik.c   |   43 +++++++-
>  drivers/mfd/Makefile               |    5 +-
>  drivers/mfd/ab8500-core.c          |  176 ++++++++++++++++++++++++++-----
>  drivers/mfd/ab8500-debugfs.c       |    6 ++
>  drivers/mfd/ab8500-gpadc.c         |    8 +-
>  drivers/mfd/ab8500-i2c.c           |  160 ----------------------------
>  drivers/regulator/ab8500.c         |  204 +++++++++++++++++++++++++-----------
>  12 files changed, 457 insertions(+), 299 deletions(-)
All mfd patches (6, 8, 14, 15 and 17) applied, thanks.

Cheers,
Samuel.

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

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

* Re: [PATCH 01/18] i2c: Add Device Tree support to the Nomadik I2C driver
@ 2012-05-20 20:53     ` Linus Walleij
  0 siblings, 0 replies; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 20:53 UTC (permalink / raw)
  To: Lee Jones, w.sang
  Cc: linux-arm-kernel, arnd, linus.walleij, grant.likely, cjb,
	broonie, sameo, linux-i2c, linux-kernel

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones@linaro.org> wrote:

> Here we move the i2c-nomadik's default settings into the driver
> rather than specifying them from platform code. At the time of
> this writing we only have one user, the u8500. As new users are
> added, it is expected that they will be Device Tree compliant.
> If this is the case, we will look up their initialisation values
> by compatible entry, then apply them forthwith.
>
> Cc: linux-i2c@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Nice!
Acked-by: Linus Walleij <linus.walleij@linaro.org>

BTW: you want to CC Wolfram on the I2C patches.

Yours,
Linus Walleij

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

* Re: [PATCH 01/18] i2c: Add Device Tree support to the Nomadik I2C driver
@ 2012-05-20 20:53     ` Linus Walleij
  0 siblings, 0 replies; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 20:53 UTC (permalink / raw)
  To: Lee Jones, w.sang-bIcnvbaLZ9MEGnE8C9+IrQ
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	arnd-r2nGTMty4D4, linus.walleij-0IS4wlFg1OjSUeElwK9/Pw,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ, cjb-2X9k7bc8m7Mdnm+yROfE0A,
	broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	sameo-VuQAYsv1563Yd54FQh9/CA, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:

> Here we move the i2c-nomadik's default settings into the driver
> rather than specifying them from platform code. At the time of
> this writing we only have one user, the u8500. As new users are
> added, it is expected that they will be Device Tree compliant.
> If this is the case, we will look up their initialisation values
> by compatible entry, then apply them forthwith.
>
> Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Signed-off-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Nice!
Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

BTW: you want to CC Wolfram on the I2C patches.

Yours,
Linus Walleij

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

* [PATCH 01/18] i2c: Add Device Tree support to the Nomadik I2C driver
@ 2012-05-20 20:53     ` Linus Walleij
  0 siblings, 0 replies; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 20:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones@linaro.org> wrote:

> Here we move the i2c-nomadik's default settings into the driver
> rather than specifying them from platform code. At the time of
> this writing we only have one user, the u8500. As new users are
> added, it is expected that they will be Device Tree compliant.
> If this is the case, we will look up their initialisation values
> by compatible entry, then apply them forthwith.
>
> Cc: linux-i2c at vger.kernel.org
> Cc: linux-kernel at vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Nice!
Acked-by: Linus Walleij <linus.walleij@linaro.org>

BTW: you want to CC Wolfram on the I2C patches.

Yours,
Linus Walleij

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

* [PATCH 06/18] mfd: ab8500: Remove confusing ab8500-i2c file and merge into ab8500-core
  2012-05-17 13:45 ` [PATCH 06/18] mfd: ab8500: Remove confusing ab8500-i2c file and merge into ab8500-core Lee Jones
@ 2012-05-20 20:58   ` Linus Walleij
  2012-05-21  7:52     ` Lee Jones
  0 siblings, 1 reply; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 20:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones@linaro.org> wrote:

> ab8500-i2c is used as core code to register the ab8500 device.
> After allocating ab8500 memory, it immediately calls into
> ab8500-core where the real initialisation takes place. This
> patch moves all core registration and memory allocation into
> the true ab8500-core file and removes ab8500-i2c completely.
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
(...)
> +static int ab8500_i2c_write(struct ab8500 *ab8500, u16 addr, u8 data)

So what happened to the promised (optional as add-on) patch also
renaming these functions to ab8500_prcmu_write() etc?

The reason I insist on not ACK:in on a "promise to fix later, really
sure"-basis is exactly that these things tends to be forgotten ;-)

Yours,
Linus Walleij

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

* [PATCH 13/18] ARM: ux500: Apply ab8500-debug node do the db8500 DT structure
  2012-05-17 13:45 ` [PATCH 13/18] ARM: ux500: Apply ab8500-debug node do the db8500 DT structure Lee Jones
@ 2012-05-20 21:00   ` Linus Walleij
  0 siblings, 0 replies; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 21:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones@linaro.org> wrote:

> This node has no properties. It merely allows probing of the
> ab8500-debugfs driver during Device Tree initialisation.
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks,
Linus Walleij

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

* [PATCH 14/18] mfd: Enable ab8500-debug when Device Tree is enabled
  2012-05-17 13:45 ` [PATCH 14/18] mfd: Enable ab8500-debug when Device Tree is enabled Lee Jones
@ 2012-05-20 21:00   ` Linus Walleij
  0 siblings, 0 replies; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 21:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones@linaro.org> wrote:

> Allow the ab8500-debugfs driver to be probed during DT start-up.
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks,
Linus Walleij

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

* [PATCH 16/18] ARM: ux500: Add a ab8500-gpadc node to the db8500 Device Tree
  2012-05-17 13:45 ` [PATCH 16/18] ARM: ux500: Add a ab8500-gpadc node to the db8500 Device Tree Lee Jones
@ 2012-05-20 21:01   ` Linus Walleij
  0 siblings, 0 replies; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 21:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones@linaro.org> wrote:

> This patch provides support for the ab8500-gpadc driver.
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* [PATCH 15/18] mfd: Prevent unassigned pointer from being used in ab8500-gpadc driver
  2012-05-17 13:45 ` [PATCH 15/18] mfd: Prevent unassigned pointer from being used in ab8500-gpadc driver Lee Jones
@ 2012-05-20 21:02   ` Linus Walleij
  0 siblings, 0 replies; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 21:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones@linaro.org> wrote:

> Before this patch if probe failed to find the platform IRQ it
> would attempt to print a message out using dev_err, which in
> turn was being passed an unassigned pointer. This patch
> ensures the information passed to dev_err is correct.
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks,
Linus Walleij

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

* [PATCH 17/18] mfd: Enable ab8500-gpadc driver for Device Tree
  2012-05-17 13:45 ` [PATCH 17/18] mfd: Enable ab8500-gpadc driver for " Lee Jones
@ 2012-05-20 21:02   ` Linus Walleij
  0 siblings, 0 replies; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 21:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones@linaro.org> wrote:

> This patch will allow the ab8500-gpadc driver to be probed during
> Device Tree enabled boot.
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks,
Linus Walleij

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

* [PATCH 18/18] ARM: ux500: Add support for input/ponkey into the db8500's Device Tree
  2012-05-17 13:45 ` [PATCH 18/18] ARM: ux500: Add support for input/ponkey into the db8500's " Lee Jones
@ 2012-05-20 21:03   ` Linus Walleij
  0 siblings, 0 replies; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 21:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones@linaro.org> wrote:

> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> ?arch/arm/boot/dts/db8500.dtsi | ? ?7 +++++++
> ?1 file changed, 7 insertions(+)

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks,
Linus Walleij

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

* Re: [PATCH 11/18] regulator: Enable the ab8500 for Device Tree
  2012-05-17 13:45   ` Lee Jones
@ 2012-05-20 21:14     ` Linus Walleij
  -1 siblings, 0 replies; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 21:14 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, arnd, linus.walleij, grant.likely, cjb,
	broonie, sameo, linux-kernel

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones@linaro.org> wrote:

> Here we setup the ab8500 regulator driver for DT. We first do
> this in the normal way, by providing a match structure during
> initialisation, but then we provide information so that
> whilst probing we can use existing data structures to do DT
> look-ups.
>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

& thanks to Mark for merging.

Thanks!
Linus Walleij

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

* [PATCH 11/18] regulator: Enable the ab8500 for Device Tree
@ 2012-05-20 21:14     ` Linus Walleij
  0 siblings, 0 replies; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 21:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones@linaro.org> wrote:

> Here we setup the ab8500 regulator driver for DT. We first do
> this in the normal way, by providing a match structure during
> initialisation, but then we provide information so that
> whilst probing we can use existing data structures to do DT
> look-ups.
>
> Cc: linux-kernel at vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

& thanks to Mark for merging.

Thanks!
Linus Walleij

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

* Re: [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces
  2012-05-17 13:45   ` Lee Jones
@ 2012-05-20 21:15     ` Linus Walleij
  -1 siblings, 0 replies; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 21:15 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, arnd, linus.walleij, grant.likely, cjb,
	broonie, sameo, linux-kernel

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones@linaro.org> wrote:

> ab8500's probe() function is becoming quite large, so in the lead
> up to Device Tree enablement which will fork the thread of execution
> this patch splits it into 3 main areas; basic error checking will
> remain in probe(), but regulator register initialisation and regulator
> registration have been moved to their own functions which will
> be called in sequence by probe() and the DT equivalent.
>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks to Mark for review and merge,

Linus Walleij

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

* [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces
@ 2012-05-20 21:15     ` Linus Walleij
  0 siblings, 0 replies; 57+ messages in thread
From: Linus Walleij @ 2012-05-20 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 17, 2012 at 3:45 PM, Lee Jones <lee.jones@linaro.org> wrote:

> ab8500's probe() function is becoming quite large, so in the lead
> up to Device Tree enablement which will fork the thread of execution
> this patch splits it into 3 main areas; basic error checking will
> remain in probe(), but regulator register initialisation and regulator
> registration have been moved to their own functions which will
> be called in sequence by probe() and the DT equivalent.
>
> Cc: linux-kernel at vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks to Mark for review and merge,

Linus Walleij

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

* [PATCH 06/18] mfd: ab8500: Remove confusing ab8500-i2c file and merge into ab8500-core
  2012-05-20 20:58   ` Linus Walleij
@ 2012-05-21  7:52     ` Lee Jones
  0 siblings, 0 replies; 57+ messages in thread
From: Lee Jones @ 2012-05-21  7:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 20/05/12 21:58, Linus Walleij wrote:
> On Thu, May 17, 2012 at 3:45 PM, Lee Jones<lee.jones@linaro.org>  wrote:
> 
>> ab8500-i2c is used as core code to register the ab8500 device.
>> After allocating ab8500 memory, it immediately calls into
>> ab8500-core where the real initialisation takes place. This
>> patch moves all core registration and memory allocation into
>> the true ab8500-core file and removes ab8500-i2c completely.
>>
>> Signed-off-by: Lee Jones<lee.jones@linaro.org>
>> ---
> (...)
>> +static int ab8500_i2c_write(struct ab8500 *ab8500, u16 addr, u8 data)
> 
> So what happened to the promised (optional as add-on) patch also
> renaming these functions to ab8500_prcmu_write() etc?
> 
> The reason I insist on not ACK:in on a "promise to fix later, really
> sure"-basis is exactly that these things tends to be forgotten ;-)

I have not forgotten. It's the 2nd and 3rd entry on my TODO list:

- TODO
<snip>
  - Clean-up (simplify) ab8500-core
  - Change i2c_[read|write] to prcmu_[read|write] - COMMENTS in [PATCH 06/15]
</snip>

Everything on my TODO gets done. :)

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515 
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2012-05-21  7:52 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-17 13:45 [PATCH 00/18] DT enablement for Snowball Lee Jones
2012-05-17 13:45 ` [PATCH 01/18] i2c: Add Device Tree support to the Nomadik I2C driver Lee Jones
2012-05-17 13:45   ` Lee Jones
2012-05-17 13:45   ` Lee Jones
2012-05-20 20:53   ` Linus Walleij
2012-05-20 20:53     ` Linus Walleij
2012-05-20 20:53     ` Linus Walleij
2012-05-17 13:45 ` [PATCH 02/18] ARM: ux500: Remove unused i2c platform_data initialisation code Lee Jones
2012-05-17 13:45 ` [PATCH 03/18] ARM: ux500: Provide auxdata to be used as name base clock search for nmk-i2c Lee Jones
2012-05-17 13:45 ` [PATCH 04/18] ARM: ux500: CONFIG: Compile in support for leds-gpio Lee Jones
2012-05-17 13:45 ` [PATCH 05/18] ARM: ux500: Enable the user LED on Snowball via Device Tree Lee Jones
2012-05-17 13:45 ` [PATCH 06/18] mfd: ab8500: Remove confusing ab8500-i2c file and merge into ab8500-core Lee Jones
2012-05-20 20:58   ` Linus Walleij
2012-05-21  7:52     ` Lee Jones
2012-05-17 13:45 ` [PATCH 07/18] ARM: ux500: PRCMU related configuration and layout corrections for Device Tree Lee Jones
2012-05-17 13:45 ` [PATCH 08/18] mfd: Enable Device Tree for ab8500-core driver Lee Jones
2012-05-17 13:45 ` [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces Lee Jones
2012-05-17 13:45   ` Lee Jones
2012-05-18  7:36   ` Mark Brown
2012-05-18  7:36     ` Mark Brown
2012-05-18  7:53     ` Lee Jones
2012-05-18  7:53       ` Lee Jones
2012-05-20 21:15   ` Linus Walleij
2012-05-20 21:15     ` Linus Walleij
2012-05-17 13:45 ` [PATCH 10/18] ARM: ux500: Add support for ab8500 regulators into the Device Tree Lee Jones
2012-05-17 13:45 ` [PATCH 11/18] regulator: Enable the ab8500 for " Lee Jones
2012-05-17 13:45   ` Lee Jones
2012-05-18  7:36   ` Mark Brown
2012-05-18  7:36     ` Mark Brown
2012-05-18  7:52     ` Lee Jones
2012-05-18  7:52       ` Lee Jones
2012-05-20 21:14   ` Linus Walleij
2012-05-20 21:14     ` Linus Walleij
2012-05-17 13:45 ` [PATCH 12/18] ARM: ux500: Disable platform setup of the ab8500 when DT is enabled Lee Jones
2012-05-17 21:22   ` Arnd Bergmann
2012-05-17 21:58     ` Lee Jones
2012-05-18 10:38       ` Arnd Bergmann
2012-05-18 11:00         ` Lee Jones
2012-05-18 11:12           ` Arnd Bergmann
2012-05-18 12:36             ` Lee Jones
2012-05-18 20:38               ` Arnd Bergmann
2012-05-17 13:45 ` [PATCH 13/18] ARM: ux500: Apply ab8500-debug node do the db8500 DT structure Lee Jones
2012-05-20 21:00   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 14/18] mfd: Enable ab8500-debug when Device Tree is enabled Lee Jones
2012-05-20 21:00   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 15/18] mfd: Prevent unassigned pointer from being used in ab8500-gpadc driver Lee Jones
2012-05-20 21:02   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 16/18] ARM: ux500: Add a ab8500-gpadc node to the db8500 Device Tree Lee Jones
2012-05-20 21:01   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 17/18] mfd: Enable ab8500-gpadc driver for " Lee Jones
2012-05-20 21:02   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 18/18] ARM: ux500: Add support for input/ponkey into the db8500's " Lee Jones
2012-05-20 21:03   ` Linus Walleij
2012-05-17 21:25 ` [PATCH 00/18] DT enablement for Snowball Arnd Bergmann
2012-05-17 21:41   ` Mark Brown
2012-05-17 21:49     ` Lee Jones
2012-05-19 15:25 ` Samuel Ortiz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.