aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/max8925-core.c
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@gmail.com>2012-09-17 00:19:04 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-09-19 06:39:13 -0400
commit63b501e22aa9b22cdfe206a5670aaae646d93021 (patch)
treefdaa73ff9f80d080be7beb389a968eae0c5abb0d /drivers/mfd/max8925-core.c
parent70ffd691ffd45e6753eee5b5636df2ff7d2c04c8 (diff)
mfd: max8925: Use register offset as REG in backlight
Remove the register offset definition. All these register offset are transfered as IORESOURCE_REG resources. Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/max8925-core.c')
-rw-r--r--drivers/mfd/max8925-core.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c
index e25a24269d51..934be40cd542 100644
--- a/drivers/mfd/max8925-core.c
+++ b/drivers/mfd/max8925-core.c
@@ -18,20 +18,16 @@
18#include <linux/mfd/core.h> 18#include <linux/mfd/core.h>
19#include <linux/mfd/max8925.h> 19#include <linux/mfd/max8925.h>
20 20
21static struct resource backlight_resources[] = { 21static struct resource bk_resources[] __devinitdata = {
22 { 22 { 0x84, 0x84, "mode control", IORESOURCE_REG, },
23 .name = "max8925-backlight", 23 { 0x85, 0x85, "control", IORESOURCE_REG, },
24 .start = MAX8925_WLED_MODE_CNTL,
25 .end = MAX8925_WLED_CNTL,
26 .flags = IORESOURCE_REG,
27 },
28}; 24};
29 25
30static struct mfd_cell backlight_devs[] = { 26static struct mfd_cell bk_devs[] __devinitdata = {
31 { 27 {
32 .name = "max8925-backlight", 28 .name = "max8925-backlight",
33 .num_resources = 1, 29 .num_resources = ARRAY_SIZE(bk_resources),
34 .resources = &backlight_resources[0], 30 .resources = &bk_resources[0],
35 .id = -1, 31 .id = -1,
36 }, 32 },
37}; 33};
@@ -623,13 +619,14 @@ int __devinit max8925_device_init(struct max8925_chip *chip,
623 } 619 }
624 620
625 if (pdata && pdata->backlight) { 621 if (pdata && pdata->backlight) {
626 ret = mfd_add_devices(chip->dev, 0, &backlight_devs[0], 622 bk_devs[0].platform_data = &pdata->backlight;
627 ARRAY_SIZE(backlight_devs), 623 bk_devs[0].pdata_size = sizeof(struct max8925_backlight_pdata);
628 &backlight_resources[0], 0, NULL); 624 }
629 if (ret < 0) { 625 ret = mfd_add_devices(chip->dev, 0, bk_devs, ARRAY_SIZE(bk_devs),
630 dev_err(chip->dev, "Failed to add backlight subdev\n"); 626 NULL, 0, NULL);
631 goto out_dev; 627 if (ret < 0) {
632 } 628 dev_err(chip->dev, "Failed to add backlight subdev\n");
629 goto out_dev;
633 } 630 }
634 631
635 if (pdata && pdata->power) { 632 if (pdata && pdata->power) {