All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: Palmas: Remove code which is not necessary for a device tree boot
@ 2013-06-17  5:46 J Keerthy
  2013-06-17  6:18 ` Graeme Gregory
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: J Keerthy @ 2013-06-17  5:46 UTC (permalink / raw)
  To: linux-omap; +Cc: j-keerthy, ldewangan, sameo, gg

Remove code which is not necessary for a device tree boot.

Boot tested on OMAP5-UEVM board.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
---
 drivers/mfd/palmas.c |  106 --------------------------------------------------
 1 files changed, 0 insertions(+), 106 deletions(-)

diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index 53e9fe6..62fa728 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -25,77 +25,6 @@
 #include <linux/mfd/palmas.h>
 #include <linux/of_platform.h>
 
-enum palmas_ids {
-	PALMAS_PMIC_ID,
-	PALMAS_GPIO_ID,
-	PALMAS_LEDS_ID,
-	PALMAS_WDT_ID,
-	PALMAS_RTC_ID,
-	PALMAS_PWRBUTTON_ID,
-	PALMAS_GPADC_ID,
-	PALMAS_RESOURCE_ID,
-	PALMAS_CLK_ID,
-	PALMAS_PWM_ID,
-	PALMAS_USB_ID,
-};
-
-static struct resource palmas_rtc_resources[] = {
-	{
-		.start  = PALMAS_RTC_ALARM_IRQ,
-		.end    = PALMAS_RTC_ALARM_IRQ,
-		.flags  = IORESOURCE_IRQ,
-	},
-};
-
-static const struct mfd_cell palmas_children[] = {
-	{
-		.name = "palmas-pmic",
-		.id = PALMAS_PMIC_ID,
-	},
-	{
-		.name = "palmas-gpio",
-		.id = PALMAS_GPIO_ID,
-	},
-	{
-		.name = "palmas-leds",
-		.id = PALMAS_LEDS_ID,
-	},
-	{
-		.name = "palmas-wdt",
-		.id = PALMAS_WDT_ID,
-	},
-	{
-		.name = "palmas-rtc",
-		.id = PALMAS_RTC_ID,
-		.resources = &palmas_rtc_resources[0],
-		.num_resources = ARRAY_SIZE(palmas_rtc_resources),
-	},
-	{
-		.name = "palmas-pwrbutton",
-		.id = PALMAS_PWRBUTTON_ID,
-	},
-	{
-		.name = "palmas-gpadc",
-		.id = PALMAS_GPADC_ID,
-	},
-	{
-		.name = "palmas-resource",
-		.id = PALMAS_RESOURCE_ID,
-	},
-	{
-		.name = "palmas-clk",
-		.id = PALMAS_CLK_ID,
-	},
-	{
-		.name = "palmas-pwm",
-		.id = PALMAS_PWM_ID,
-	},
-	{
-		.name = "palmas-usb",
-		.id = PALMAS_USB_ID,
-	}
-};
-
 static const struct regmap_config palmas_regmap_config[PALMAS_NUM_CLIENTS] = {
 	{
 		.reg_bits = 8,
@@ -311,7 +240,6 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
 	int ret = 0, i;
 	unsigned int reg, addr;
 	int slave;
-	struct mfd_cell *children;
 
 	pdata = dev_get_platdata(&i2c->dev);
 
@@ -472,42 +400,8 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
 			return ret;
 	}
 
-	children = kmemdup(palmas_children, sizeof(palmas_children),
-			   GFP_KERNEL);
-	if (!children) {
-		ret = -ENOMEM;
-		goto err_irq;
-	}
-
-	children[PALMAS_PMIC_ID].platform_data = pdata->pmic_pdata;
-	children[PALMAS_PMIC_ID].pdata_size = sizeof(*pdata->pmic_pdata);
-
-	children[PALMAS_GPADC_ID].platform_data = pdata->gpadc_pdata;
-	children[PALMAS_GPADC_ID].pdata_size = sizeof(*pdata->gpadc_pdata);
-
-	children[PALMAS_RESOURCE_ID].platform_data = pdata->resource_pdata;
-	children[PALMAS_RESOURCE_ID].pdata_size =
-			sizeof(*pdata->resource_pdata);
-
-	children[PALMAS_USB_ID].platform_data = pdata->usb_pdata;
-	children[PALMAS_USB_ID].pdata_size = sizeof(*pdata->usb_pdata);
-
-	children[PALMAS_CLK_ID].platform_data = pdata->clk_pdata;
-	children[PALMAS_CLK_ID].pdata_size = sizeof(*pdata->clk_pdata);
-
-	ret = mfd_add_devices(palmas->dev, -1,
-			      children, ARRAY_SIZE(palmas_children),
-			      NULL, 0,
-			      regmap_irq_get_domain(palmas->irq_data));
-	kfree(children);
-
-	if (ret < 0)
-		goto err_devices;
-
 	return ret;
 
-err_devices:
-	mfd_remove_devices(palmas->dev);
 err_irq:
 	regmap_del_irq_chip(palmas->irq, palmas->irq_data);
 err:
-- 
1.7.5.4


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

* Re: [PATCH] mfd: Palmas: Remove code which is not necessary for a device tree boot
  2013-06-17  5:46 [PATCH] mfd: Palmas: Remove code which is not necessary for a device tree boot J Keerthy
@ 2013-06-17  6:18 ` Graeme Gregory
  2013-06-17  6:54 ` Laxman Dewangan
  2013-06-19  8:26 ` Lee Jones
  2 siblings, 0 replies; 7+ messages in thread
From: Graeme Gregory @ 2013-06-17  6:18 UTC (permalink / raw)
  To: J Keerthy; +Cc: linux-omap, ldewangan, sameo

On Mon, Jun 17, 2013 at 11:16:02AM +0530, J Keerthy wrote:
> Remove code which is not necessary for a device tree boot.
> 
> Boot tested on OMAP5-UEVM board.
> 
> Signed-off-by: J Keerthy <j-keerthy@ti.com>

This looks good to me!

Acked-by: Graeme Gregory <gg@slimlogic.co.uk>

> ---
>  drivers/mfd/palmas.c |  106 --------------------------------------------------
>  1 files changed, 0 insertions(+), 106 deletions(-)
> 
> diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
> index 53e9fe6..62fa728 100644
> --- a/drivers/mfd/palmas.c
> +++ b/drivers/mfd/palmas.c
> @@ -25,77 +25,6 @@
>  #include <linux/mfd/palmas.h>
>  #include <linux/of_platform.h>
>  
> -enum palmas_ids {
> -	PALMAS_PMIC_ID,
> -	PALMAS_GPIO_ID,
> -	PALMAS_LEDS_ID,
> -	PALMAS_WDT_ID,
> -	PALMAS_RTC_ID,
> -	PALMAS_PWRBUTTON_ID,
> -	PALMAS_GPADC_ID,
> -	PALMAS_RESOURCE_ID,
> -	PALMAS_CLK_ID,
> -	PALMAS_PWM_ID,
> -	PALMAS_USB_ID,
> -};
> -
> -static struct resource palmas_rtc_resources[] = {
> -	{
> -		.start  = PALMAS_RTC_ALARM_IRQ,
> -		.end    = PALMAS_RTC_ALARM_IRQ,
> -		.flags  = IORESOURCE_IRQ,
> -	},
> -};
> -
> -static const struct mfd_cell palmas_children[] = {
> -	{
> -		.name = "palmas-pmic",
> -		.id = PALMAS_PMIC_ID,
> -	},
> -	{
> -		.name = "palmas-gpio",
> -		.id = PALMAS_GPIO_ID,
> -	},
> -	{
> -		.name = "palmas-leds",
> -		.id = PALMAS_LEDS_ID,
> -	},
> -	{
> -		.name = "palmas-wdt",
> -		.id = PALMAS_WDT_ID,
> -	},
> -	{
> -		.name = "palmas-rtc",
> -		.id = PALMAS_RTC_ID,
> -		.resources = &palmas_rtc_resources[0],
> -		.num_resources = ARRAY_SIZE(palmas_rtc_resources),
> -	},
> -	{
> -		.name = "palmas-pwrbutton",
> -		.id = PALMAS_PWRBUTTON_ID,
> -	},
> -	{
> -		.name = "palmas-gpadc",
> -		.id = PALMAS_GPADC_ID,
> -	},
> -	{
> -		.name = "palmas-resource",
> -		.id = PALMAS_RESOURCE_ID,
> -	},
> -	{
> -		.name = "palmas-clk",
> -		.id = PALMAS_CLK_ID,
> -	},
> -	{
> -		.name = "palmas-pwm",
> -		.id = PALMAS_PWM_ID,
> -	},
> -	{
> -		.name = "palmas-usb",
> -		.id = PALMAS_USB_ID,
> -	}
> -};
> -
>  static const struct regmap_config palmas_regmap_config[PALMAS_NUM_CLIENTS] = {
>  	{
>  		.reg_bits = 8,
> @@ -311,7 +240,6 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
>  	int ret = 0, i;
>  	unsigned int reg, addr;
>  	int slave;
> -	struct mfd_cell *children;
>  
>  	pdata = dev_get_platdata(&i2c->dev);
>  
> @@ -472,42 +400,8 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
>  			return ret;
>  	}
>  
> -	children = kmemdup(palmas_children, sizeof(palmas_children),
> -			   GFP_KERNEL);
> -	if (!children) {
> -		ret = -ENOMEM;
> -		goto err_irq;
> -	}
> -
> -	children[PALMAS_PMIC_ID].platform_data = pdata->pmic_pdata;
> -	children[PALMAS_PMIC_ID].pdata_size = sizeof(*pdata->pmic_pdata);
> -
> -	children[PALMAS_GPADC_ID].platform_data = pdata->gpadc_pdata;
> -	children[PALMAS_GPADC_ID].pdata_size = sizeof(*pdata->gpadc_pdata);
> -
> -	children[PALMAS_RESOURCE_ID].platform_data = pdata->resource_pdata;
> -	children[PALMAS_RESOURCE_ID].pdata_size =
> -			sizeof(*pdata->resource_pdata);
> -
> -	children[PALMAS_USB_ID].platform_data = pdata->usb_pdata;
> -	children[PALMAS_USB_ID].pdata_size = sizeof(*pdata->usb_pdata);
> -
> -	children[PALMAS_CLK_ID].platform_data = pdata->clk_pdata;
> -	children[PALMAS_CLK_ID].pdata_size = sizeof(*pdata->clk_pdata);
> -
> -	ret = mfd_add_devices(palmas->dev, -1,
> -			      children, ARRAY_SIZE(palmas_children),
> -			      NULL, 0,
> -			      regmap_irq_get_domain(palmas->irq_data));
> -	kfree(children);
> -
> -	if (ret < 0)
> -		goto err_devices;
> -
>  	return ret;
>  
> -err_devices:
> -	mfd_remove_devices(palmas->dev);
>  err_irq:
>  	regmap_del_irq_chip(palmas->irq, palmas->irq_data);
>  err:
> -- 
> 1.7.5.4
> 

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

* Re: [PATCH] mfd: Palmas: Remove code which is not necessary for a device tree boot
  2013-06-17  5:46 [PATCH] mfd: Palmas: Remove code which is not necessary for a device tree boot J Keerthy
  2013-06-17  6:18 ` Graeme Gregory
@ 2013-06-17  6:54 ` Laxman Dewangan
  2013-06-19  8:26 ` Lee Jones
  2 siblings, 0 replies; 7+ messages in thread
From: Laxman Dewangan @ 2013-06-17  6:54 UTC (permalink / raw)
  To: J Keerthy; +Cc: linux-omap, sameo, gg

On Monday 17 June 2013 11:16 AM, J Keerthy wrote:
> Remove code which is not necessary for a device tree boot.
>
> Boot tested on OMAP5-UEVM board.
>
> Signed-off-by: J Keerthy <j-keerthy@ti.com>

Looks good to me.
Acked-by: Laxman Dewangan  <ldewangan@nvidia.com>



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

* Re: [PATCH] mfd: Palmas: Remove code which is not necessary for a device tree boot
  2013-06-17  5:46 [PATCH] mfd: Palmas: Remove code which is not necessary for a device tree boot J Keerthy
  2013-06-17  6:18 ` Graeme Gregory
  2013-06-17  6:54 ` Laxman Dewangan
@ 2013-06-19  8:26 ` Lee Jones
  2013-06-19  8:30   ` Samuel Ortiz
  2013-06-19  8:51   ` Lee Jones
  2 siblings, 2 replies; 7+ messages in thread
From: Lee Jones @ 2013-06-19  8:26 UTC (permalink / raw)
  To: J Keerthy; +Cc: linux-omap, ldewangan, sameo, gg

On Mon, 17 Jun 2013, J Keerthy wrote:

> Remove code which is not necessary for a device tree boot.

So we're exclusively DT now right?

> Boot tested on OMAP5-UEVM board.
> 
> Signed-off-by: J Keerthy <j-keerthy@ti.com>
> ---
>  drivers/mfd/palmas.c |  106 --------------------------------------------------
>  1 files changed, 0 insertions(+), 106 deletions(-)

If that's the case, applied with all Acks, thanks.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] mfd: Palmas: Remove code which is not necessary for a device tree boot
  2013-06-19  8:26 ` Lee Jones
@ 2013-06-19  8:30   ` Samuel Ortiz
  2013-06-19  9:48     ` Lee Jones
  2013-06-19  8:51   ` Lee Jones
  1 sibling, 1 reply; 7+ messages in thread
From: Samuel Ortiz @ 2013-06-19  8:30 UTC (permalink / raw)
  To: Lee Jones; +Cc: J Keerthy, linux-omap, ldewangan, gg

Hi Lee,

On Wed, Jun 19, 2013 at 09:26:33AM +0100, Lee Jones wrote:
> On Mon, 17 Jun 2013, J Keerthy wrote:
> 
> > Remove code which is not necessary for a device tree boot.
> 
> So we're exclusively DT now right?
> 
> > Boot tested on OMAP5-UEVM board.
> > 
> > Signed-off-by: J Keerthy <j-keerthy@ti.com>
> > ---
> >  drivers/mfd/palmas.c |  106 --------------------------------------------------
> >  1 files changed, 0 insertions(+), 106 deletions(-)
> 
> If that's the case, applied with all Acks, thanks.
It's already in mfd-next.

Cheers,
Samuel.

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

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

* Re: [PATCH] mfd: Palmas: Remove code which is not necessary for a device tree boot
  2013-06-19  8:26 ` Lee Jones
  2013-06-19  8:30   ` Samuel Ortiz
@ 2013-06-19  8:51   ` Lee Jones
  1 sibling, 0 replies; 7+ messages in thread
From: Lee Jones @ 2013-06-19  8:51 UTC (permalink / raw)
  To: J Keerthy; +Cc: linux-omap, ldewangan, sameo, gg

On Wed, 19 Jun 2013, Lee Jones wrote:

> On Mon, 17 Jun 2013, J Keerthy wrote:
> 
> > Remove code which is not necessary for a device tree boot.
> 
> So we're exclusively DT now right?
> 
> > Boot tested on OMAP5-UEVM board.
> > 
> > Signed-off-by: J Keerthy <j-keerthy@ti.com>
> > ---
> >  drivers/mfd/palmas.c |  106 --------------------------------------------------
> >  1 files changed, 0 insertions(+), 106 deletions(-)
> 
> If that's the case, applied with all Acks, thanks.

Ah, it looks like Sam must have already applied this.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] mfd: Palmas: Remove code which is not necessary for a device tree boot
  2013-06-19  8:30   ` Samuel Ortiz
@ 2013-06-19  9:48     ` Lee Jones
  0 siblings, 0 replies; 7+ messages in thread
From: Lee Jones @ 2013-06-19  9:48 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: J Keerthy, linux-omap, ldewangan, gg

On Wed, 19 Jun 2013, Samuel Ortiz wrote:

> Hi Lee,
> 
> On Wed, Jun 19, 2013 at 09:26:33AM +0100, Lee Jones wrote:
> > On Mon, 17 Jun 2013, J Keerthy wrote:
> > 
> > > Remove code which is not necessary for a device tree boot.
> > 
> > So we're exclusively DT now right?
> > 
> > > Boot tested on OMAP5-UEVM board.
> > > 
> > > Signed-off-by: J Keerthy <j-keerthy@ti.com>
> > > ---
> > >  drivers/mfd/palmas.c |  106 --------------------------------------------------
> > >  1 files changed, 0 insertions(+), 106 deletions(-)
> > 
> > If that's the case, applied with all Acks, thanks.
> It's already in mfd-next.

I noticed. Odd that I didn't receive you applied message.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2013-06-19  9:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-17  5:46 [PATCH] mfd: Palmas: Remove code which is not necessary for a device tree boot J Keerthy
2013-06-17  6:18 ` Graeme Gregory
2013-06-17  6:54 ` Laxman Dewangan
2013-06-19  8:26 ` Lee Jones
2013-06-19  8:30   ` Samuel Ortiz
2013-06-19  9:48     ` Lee Jones
2013-06-19  8:51   ` Lee Jones

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.