Skip to contentSkip to conversation

mfd: Palmas: Remove code which is not necessary for a device tree boot

PATCH Applied J Keerthy 2 participants 3 messages Jun 17, 2013

Subsystems (2)
lore
Share & tools
lore

J Keerthy

author
#0 lore raw

PATCH v2 1/1 mfd: Palmas: Remove code which is not necessary for a device tree boot

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

Boot tested on OMAP5-UEVM board.

---
 drivers/mfd/palmas.c |  106 --------------------------------------------------
 1 files changed, 0 insertions(+), 106 deletions(-)
drivers/mfd/palmas.c +0 -106
index 53e9fe6..62fa728 100644
@@ -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:
Signature · 1 line
1.7.5.4
Applied
#1 lore raw

Hi,

Quoted 10 lines · J Keerthy

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

Boot tested on OMAP5-UEVM board.

---
 drivers/mfd/palmas.c |  106 --------------------------------------------------
 1 files changed, 0 insertions(+), 106 deletions(-)

Applied to mfd-next, thanks.

Cheers,
Samuel.

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

-----Original Message-----
From: [email protected] [mailto:linux-omap- [email protected]] On Behalf Of Samuel Ortiz
Sent: Monday, June 17, 2013 6:41 PM
To: J, KEERTHY
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v2] mfd: Palmas: Remove code which is not necessary for a device tree boot

Hi,

Quoted 4 lines · J Keerthy

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

Boot tested on OMAP5-UEVM board.

Quoted 8 lines
Quoted 7 lines
---
 drivers/mfd/palmas.c |  106
--------------------------------------------------
 1 files changed, 0 insertions(+), 106 deletions(-)

Applied to mfd-next, thanks.

Thanks Samuel!

Quoted 11 lines

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html