linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/18] i2c: Add Device Tree support to the Nomadik I2C driver
       [not found] <1337262323-27692-1-git-send-email-lee.jones@linaro.org>
@ 2012-05-17 13:45 ` Lee Jones
  2012-05-20 20:53   ` Linus Walleij
  2012-05-17 13:45 ` [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces Lee Jones
  2012-05-17 13:45 ` [PATCH 11/18] regulator: Enable the ab8500 for Device Tree Lee Jones
  2 siblings, 1 reply; 10+ 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] 10+ messages in thread

* [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces
       [not found] <1337262323-27692-1-git-send-email-lee.jones@linaro.org>
  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-18  7:36   ` Mark Brown
  2012-05-20 21:15   ` Linus Walleij
  2012-05-17 13:45 ` [PATCH 11/18] regulator: Enable the ab8500 for Device Tree Lee Jones
  2 siblings, 2 replies; 10+ 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] 10+ messages in thread

* [PATCH 11/18] regulator: Enable the ab8500 for Device Tree
       [not found] <1337262323-27692-1-git-send-email-lee.jones@linaro.org>
  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 ` [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-20 21:14   ` Linus Walleij
  2 siblings, 2 replies; 10+ 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] 10+ messages in thread

* Re: [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces
  2012-05-17 13:45 ` [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces Lee Jones
@ 2012-05-18  7:36   ` Mark Brown
  2012-05-18  7:53     ` Lee Jones
  2012-05-20 21:15   ` Linus Walleij
  1 sibling, 1 reply; 10+ 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] 10+ messages in thread

* Re: [PATCH 11/18] regulator: Enable the ab8500 for Device Tree
  2012-05-17 13:45 ` [PATCH 11/18] regulator: Enable the ab8500 for Device Tree Lee Jones
@ 2012-05-18  7:36   ` Mark Brown
  2012-05-18  7:52     ` Lee Jones
  2012-05-20 21:14   ` Linus Walleij
  1 sibling, 1 reply; 10+ 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] 10+ 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
  0 siblings, 0 replies; 10+ 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] 10+ 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
  0 siblings, 0 replies; 10+ 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] 10+ messages in thread

* Re: [PATCH 01/18] i2c: Add Device Tree support to the Nomadik I2C driver
  2012-05-17 13:45 ` [PATCH 01/18] i2c: Add Device Tree support to the Nomadik I2C driver Lee Jones
@ 2012-05-20 20:53   ` Linus Walleij
  0 siblings, 0 replies; 10+ 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] 10+ messages in thread

* Re: [PATCH 11/18] regulator: Enable the ab8500 for Device Tree
  2012-05-17 13:45 ` [PATCH 11/18] regulator: Enable the ab8500 for Device Tree Lee Jones
  2012-05-18  7:36   ` Mark Brown
@ 2012-05-20 21:14   ` Linus Walleij
  1 sibling, 0 replies; 10+ 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] 10+ messages in thread

* Re: [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces
  2012-05-17 13:45 ` [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces Lee Jones
  2012-05-18  7:36   ` Mark Brown
@ 2012-05-20 21:15   ` Linus Walleij
  1 sibling, 0 replies; 10+ 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] 10+ messages in thread

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1337262323-27692-1-git-send-email-lee.jones@linaro.org>
2012-05-17 13:45 ` [PATCH 01/18] i2c: Add Device Tree support to the Nomadik I2C driver Lee Jones
2012-05-20 20:53   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 09/18] regulator: ab8500: Split up probe() into manageable pieces Lee Jones
2012-05-18  7:36   ` Mark Brown
2012-05-18  7:53     ` Lee Jones
2012-05-20 21:15   ` Linus Walleij
2012-05-17 13:45 ` [PATCH 11/18] regulator: Enable the ab8500 for Device Tree Lee Jones
2012-05-18  7:36   ` Mark Brown
2012-05-18  7:52     ` Lee Jones
2012-05-20 21:14   ` Linus Walleij

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