diff options
author | J Keerthy <j-keerthy@ti.com> | 2013-06-17 07:47:58 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-06-17 09:10:04 -0400 |
commit | 1ee5d8c85aecc0d7b4d0de7473dbc7340ddbb5d4 (patch) | |
tree | dcaf4e31672aca5d487ce4895ba6a2ba82ff2597 /drivers/mfd | |
parent | d8c5d658f425bd25bbfb137f2617f59ed4fdee7d (diff) |
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.
Signed-off-by: J Keerthy <j-keerthy@ti.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | 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 53e9fe638d32..62fa728d3e04 100644 --- a/drivers/mfd/palmas.c +++ b/drivers/mfd/palmas.c | |||
@@ -25,77 +25,6 @@ | |||
25 | #include <linux/mfd/palmas.h> | 25 | #include <linux/mfd/palmas.h> |
26 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
27 | 27 | ||
28 | enum palmas_ids { | ||
29 | PALMAS_PMIC_ID, | ||
30 | PALMAS_GPIO_ID, | ||
31 | PALMAS_LEDS_ID, | ||
32 | PALMAS_WDT_ID, | ||
33 | PALMAS_RTC_ID, | ||
34 | PALMAS_PWRBUTTON_ID, | ||
35 | PALMAS_GPADC_ID, | ||
36 | PALMAS_RESOURCE_ID, | ||
37 | PALMAS_CLK_ID, | ||
38 | PALMAS_PWM_ID, | ||
39 | PALMAS_USB_ID, | ||
40 | }; | ||
41 | |||
42 | static struct resource palmas_rtc_resources[] = { | ||
43 | { | ||
44 | .start = PALMAS_RTC_ALARM_IRQ, | ||
45 | .end = PALMAS_RTC_ALARM_IRQ, | ||
46 | .flags = IORESOURCE_IRQ, | ||
47 | }, | ||
48 | }; | ||
49 | |||
50 | static const struct mfd_cell palmas_children[] = { | ||
51 | { | ||
52 | .name = "palmas-pmic", | ||
53 | .id = PALMAS_PMIC_ID, | ||
54 | }, | ||
55 | { | ||
56 | .name = "palmas-gpio", | ||
57 | .id = PALMAS_GPIO_ID, | ||
58 | }, | ||
59 | { | ||
60 | .name = "palmas-leds", | ||
61 | .id = PALMAS_LEDS_ID, | ||
62 | }, | ||
63 | { | ||
64 | .name = "palmas-wdt", | ||
65 | .id = PALMAS_WDT_ID, | ||
66 | }, | ||
67 | { | ||
68 | .name = "palmas-rtc", | ||
69 | .id = PALMAS_RTC_ID, | ||
70 | .resources = &palmas_rtc_resources[0], | ||
71 | .num_resources = ARRAY_SIZE(palmas_rtc_resources), | ||
72 | }, | ||
73 | { | ||
74 | .name = "palmas-pwrbutton", | ||
75 | .id = PALMAS_PWRBUTTON_ID, | ||
76 | }, | ||
77 | { | ||
78 | .name = "palmas-gpadc", | ||
79 | .id = PALMAS_GPADC_ID, | ||
80 | }, | ||
81 | { | ||
82 | .name = "palmas-resource", | ||
83 | .id = PALMAS_RESOURCE_ID, | ||
84 | }, | ||
85 | { | ||
86 | .name = "palmas-clk", | ||
87 | .id = PALMAS_CLK_ID, | ||
88 | }, | ||
89 | { | ||
90 | .name = "palmas-pwm", | ||
91 | .id = PALMAS_PWM_ID, | ||
92 | }, | ||
93 | { | ||
94 | .name = "palmas-usb", | ||
95 | .id = PALMAS_USB_ID, | ||
96 | } | ||
97 | }; | ||
98 | |||
99 | static const struct regmap_config palmas_regmap_config[PALMAS_NUM_CLIENTS] = { | 28 | static const struct regmap_config palmas_regmap_config[PALMAS_NUM_CLIENTS] = { |
100 | { | 29 | { |
101 | .reg_bits = 8, | 30 | .reg_bits = 8, |
@@ -311,7 +240,6 @@ static int palmas_i2c_probe(struct i2c_client *i2c, | |||
311 | int ret = 0, i; | 240 | int ret = 0, i; |
312 | unsigned int reg, addr; | 241 | unsigned int reg, addr; |
313 | int slave; | 242 | int slave; |
314 | struct mfd_cell *children; | ||
315 | 243 | ||
316 | pdata = dev_get_platdata(&i2c->dev); | 244 | pdata = dev_get_platdata(&i2c->dev); |
317 | 245 | ||
@@ -472,42 +400,8 @@ static int palmas_i2c_probe(struct i2c_client *i2c, | |||
472 | return ret; | 400 | return ret; |
473 | } | 401 | } |
474 | 402 | ||
475 | children = kmemdup(palmas_children, sizeof(palmas_children), | ||
476 | GFP_KERNEL); | ||
477 | if (!children) { | ||
478 | ret = -ENOMEM; | ||
479 | goto err_irq; | ||
480 | } | ||
481 | |||
482 | children[PALMAS_PMIC_ID].platform_data = pdata->pmic_pdata; | ||
483 | children[PALMAS_PMIC_ID].pdata_size = sizeof(*pdata->pmic_pdata); | ||
484 | |||
485 | children[PALMAS_GPADC_ID].platform_data = pdata->gpadc_pdata; | ||
486 | children[PALMAS_GPADC_ID].pdata_size = sizeof(*pdata->gpadc_pdata); | ||
487 | |||
488 | children[PALMAS_RESOURCE_ID].platform_data = pdata->resource_pdata; | ||
489 | children[PALMAS_RESOURCE_ID].pdata_size = | ||
490 | sizeof(*pdata->resource_pdata); | ||
491 | |||
492 | children[PALMAS_USB_ID].platform_data = pdata->usb_pdata; | ||
493 | children[PALMAS_USB_ID].pdata_size = sizeof(*pdata->usb_pdata); | ||
494 | |||
495 | children[PALMAS_CLK_ID].platform_data = pdata->clk_pdata; | ||
496 | children[PALMAS_CLK_ID].pdata_size = sizeof(*pdata->clk_pdata); | ||
497 | |||
498 | ret = mfd_add_devices(palmas->dev, -1, | ||
499 | children, ARRAY_SIZE(palmas_children), | ||
500 | NULL, 0, | ||
501 | regmap_irq_get_domain(palmas->irq_data)); | ||
502 | kfree(children); | ||
503 | |||
504 | if (ret < 0) | ||
505 | goto err_devices; | ||
506 | |||
507 | return ret; | 403 | return ret; |
508 | 404 | ||
509 | err_devices: | ||
510 | mfd_remove_devices(palmas->dev); | ||
511 | err_irq: | 405 | err_irq: |
512 | regmap_del_irq_chip(palmas->irq, palmas->irq_data); | 406 | regmap_del_irq_chip(palmas->irq, palmas->irq_data); |
513 | err: | 407 | err: |