From: Stephen Rothwell Date: Wed, 3 Oct 2012 04:29:55 +0000 (+1000) Subject: Merge remote-tracking branch 'battery/master' X-Git-Tag: next-20121003~35 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=79890dc2ebe0783387b5bf2781a4c39cd2a76dd2;p=karo-tx-linux.git Merge remote-tracking branch 'battery/master' Conflicts: include/linux/mfd/88pm860x.h --- 79890dc2ebe0783387b5bf2781a4c39cd2a76dd2 diff --cc drivers/mfd/88pm860x-core.c index 59d117e9fa31,2abd607eb05b..8fa86edf70d4 --- a/drivers/mfd/88pm860x-core.c +++ b/drivers/mfd/88pm860x-core.c @@@ -925,10 -792,25 +932,23 @@@ static void __devinit device_power_init power_devs[2].platform_data = &preg_init_data; power_devs[2].pdata_size = sizeof(struct regulator_init_data); - power_devs[2].num_resources = ARRAY_SIZE(preg_resources); - power_devs[2].resources = &preg_resources[0], ret = mfd_add_devices(chip->dev, 0, &power_devs[2], 1, - &preg_resources[0], chip->irq_base, NULL); + NULL, chip->irq_base, NULL); if (ret < 0) dev_err(chip->dev, "Failed to add preg subdev\n"); + + if (pdata->chg_desc) { + pdata->chg_desc->charger_regulators = + &chg_desc_regulator_data[0]; + pdata->chg_desc->num_charger_regulators = + ARRAY_SIZE(chg_desc_regulator_data), + power_devs[3].platform_data = pdata->chg_desc; + power_devs[3].pdata_size = sizeof(*pdata->chg_desc); + ret = mfd_add_devices(chip->dev, 0, &power_devs[3], 1, + NULL, chip->irq_base, NULL); + if (ret < 0) + dev_err(chip->dev, "Failed to add chg-manager subdev\n"); + } } static void __devinit device_onkey_init(struct pm860x_chip *chip, diff --cc include/linux/mfd/88pm860x.h index ef3e6b701179,b7c5a3c27c98..17c9a87e5be2 --- a/include/linux/mfd/88pm860x.h +++ b/include/linux/mfd/88pm860x.h @@@ -359,24 -460,10 +440,25 @@@ struct pm860x_platform_data struct pm860x_rtc_pdata *rtc; struct pm860x_touch_pdata *touch; struct pm860x_power_pdata *power; + struct charger_desc *chg_desc; - struct regulator_init_data *regulator; - - unsigned short companion_addr; /* I2C address of companion chip */ + struct regulator_init_data *buck1; + struct regulator_init_data *buck2; + struct regulator_init_data *buck3; + struct regulator_init_data *ldo1; + struct regulator_init_data *ldo2; + struct regulator_init_data *ldo3; + struct regulator_init_data *ldo4; + struct regulator_init_data *ldo5; + struct regulator_init_data *ldo6; + struct regulator_init_data *ldo7; + struct regulator_init_data *ldo8; + struct regulator_init_data *ldo9; + struct regulator_init_data *ldo10; + struct regulator_init_data *ldo12; + struct regulator_init_data *ldo_vibrator; + struct regulator_init_data *ldo14; + + int companion_addr; /* I2C address of companion chip */ int i2c_port; /* Controlled by GI2C or PI2C */ int irq_mode; /* Clear interrupt by read/write(0/1) */ int irq_base; /* IRQ base number of 88pm860x */