mfd: 88pm800: Remove the power and gpadc page addr from platform data
authorChao Xie <chao.xie@marvell.com>
Fri, 14 Jun 2013 05:21:49 +0000 (01:21 -0400)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 17 Jun 2013 23:06:28 +0000 (01:06 +0200)
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>
drivers/mfd/88pm800.c
include/linux/mfd/88pm80x.h

index d2951d749bf3025e99e39937646572a79a595194..6b607adebce12b2d41dfa79c21cfe7e6a4d6240c 100644 (file)
@@ -525,8 +525,9 @@ static int pm800_probe(struct i2c_client *client,
                goto err_subchip_alloc;
        }
 
-       subchip->power_page_addr = pdata->power_page_addr;
-       subchip->gpadc_page_addr = pdata->gpadc_page_addr;
+       /* pm800 has 2 addtional pages to support power and gpadc. */
+       subchip->power_page_addr = client->addr + 1;
+       subchip->gpadc_page_addr = client->addr + 2;
        chip->subchip = subchip;
 
        ret = pm800_pages_init(chip);
index e94537befabd018a4d8128bd7134594e59b120f1..023e6395da8705de3765633f95b9c57b1063f31a 100644 (file)
@@ -309,8 +309,6 @@ struct pm80x_chip {
 
 struct pm80x_platform_data {
        struct pm80x_rtc_pdata *rtc;
-       unsigned short power_page_addr; /* power page I2C address */
-       unsigned short gpadc_page_addr; /* gpadc page I2C address */
        int irq_mode;           /* Clear interrupt by read/write(0/1) */
        int batt_det;           /* enable/disable */
        int (*plat_config)(struct pm80x_chip *chip,
This page took 0.026312 seconds and 5 git commands to generate.