diff options
author | Chao Xie <chao.xie@marvell.com> | 2013-06-14 01:21:49 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-06-17 19:06:28 -0400 |
commit | c750d8e053c08ccb82d814d695e64d1eb602a91a (patch) | |
tree | bdf645b99ffe6fe9ae2b207730e7d26d14d3a96f | |
parent | 1ef5677e0e45c77ca05e697fb83d4f9b3fe96caf (diff) |
mfd: 88pm800: Remove the power and gpadc page addr from platform data
88pm800 has two addtional pages - power and gpadc.
The address of the pages depends on the address of 88pm800.
So do not need pass the address of the power and gpadc in
platform data.
Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | drivers/mfd/88pm800.c | 5 | ||||
-rw-r--r-- | include/linux/mfd/88pm80x.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mfd/88pm800.c b/drivers/mfd/88pm800.c index d2951d749bf3..6b607adebce1 100644 --- a/drivers/mfd/88pm800.c +++ b/drivers/mfd/88pm800.c | |||
@@ -525,8 +525,9 @@ static int pm800_probe(struct i2c_client *client, | |||
525 | goto err_subchip_alloc; | 525 | goto err_subchip_alloc; |
526 | } | 526 | } |
527 | 527 | ||
528 | subchip->power_page_addr = pdata->power_page_addr; | 528 | /* pm800 has 2 addtional pages to support power and gpadc. */ |
529 | subchip->gpadc_page_addr = pdata->gpadc_page_addr; | 529 | subchip->power_page_addr = client->addr + 1; |
530 | subchip->gpadc_page_addr = client->addr + 2; | ||
530 | chip->subchip = subchip; | 531 | chip->subchip = subchip; |
531 | 532 | ||
532 | ret = pm800_pages_init(chip); | 533 | ret = pm800_pages_init(chip); |
diff --git a/include/linux/mfd/88pm80x.h b/include/linux/mfd/88pm80x.h index e94537befabd..023e6395da87 100644 --- a/include/linux/mfd/88pm80x.h +++ b/include/linux/mfd/88pm80x.h | |||
@@ -309,8 +309,6 @@ struct pm80x_chip { | |||
309 | 309 | ||
310 | struct pm80x_platform_data { | 310 | struct pm80x_platform_data { |
311 | struct pm80x_rtc_pdata *rtc; | 311 | struct pm80x_rtc_pdata *rtc; |
312 | unsigned short power_page_addr; /* power page I2C address */ | ||
313 | unsigned short gpadc_page_addr; /* gpadc page I2C address */ | ||
314 | int irq_mode; /* Clear interrupt by read/write(0/1) */ | 312 | int irq_mode; /* Clear interrupt by read/write(0/1) */ |
315 | int batt_det; /* enable/disable */ | 313 | int batt_det; /* enable/disable */ |
316 | int (*plat_config)(struct pm80x_chip *chip, | 314 | int (*plat_config)(struct pm80x_chip *chip, |