Merge with upstream to accommodate with MFD changes
commit0848c94fb4
("mfd: core: Push irqdomain mapping out into devices") that appeared in v3.6-rc6 adds another argument to the mfd_add_devices() call, and that makes commita830d28b48
("power_supply: Enable battery-charger for 88pm860x", which is battery tree) no longer compatible with the latest kernels. This commit is used to merge upstream back into battery tree and accommodate 88pm860x driver for the latest changes in MFD core. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Reported-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
struct irq_domain;
|
||||
|
||||
/*
|
||||
* This struct describes the MFD part ("cell").
|
||||
* After registration the copy of this structure will become the platform data
|
||||
@@ -98,7 +100,7 @@ static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
|
||||
extern int mfd_add_devices(struct device *parent, int id,
|
||||
struct mfd_cell *cells, int n_devs,
|
||||
struct resource *mem_base,
|
||||
int irq_base);
|
||||
int irq_base, struct irq_domain *irq_domain);
|
||||
|
||||
extern void mfd_remove_devices(struct device *parent);
|
||||
|
||||
|
@@ -22,6 +22,9 @@
|
||||
#include <linux/regulator/driver.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
|
||||
/* TPS chip id list */
|
||||
#define TPS65217 0xF0
|
||||
|
||||
/* I2C ID for TPS65217 part */
|
||||
#define TPS65217_I2C_ID 0x24
|
||||
|
||||
@@ -248,13 +251,11 @@ struct tps_info {
|
||||
struct tps65217 {
|
||||
struct device *dev;
|
||||
struct tps65217_board *pdata;
|
||||
unsigned int id;
|
||||
struct regulator_desc desc[TPS65217_NUM_REGULATOR];
|
||||
struct regulator_dev *rdev[TPS65217_NUM_REGULATOR];
|
||||
struct tps_info *info[TPS65217_NUM_REGULATOR];
|
||||
struct regmap *regmap;
|
||||
|
||||
/* Client devices */
|
||||
struct platform_device *regulator_pdev[TPS65217_NUM_REGULATOR];
|
||||
};
|
||||
|
||||
static inline struct tps65217 *dev_to_tps65217(struct device *dev)
|
||||
@@ -262,6 +263,11 @@ static inline struct tps65217 *dev_to_tps65217(struct device *dev)
|
||||
return dev_get_drvdata(dev);
|
||||
}
|
||||
|
||||
static inline int tps65217_chip_id(struct tps65217 *tps65217)
|
||||
{
|
||||
return tps65217->id;
|
||||
}
|
||||
|
||||
int tps65217_reg_read(struct tps65217 *tps, unsigned int reg,
|
||||
unsigned int *val);
|
||||
int tps65217_reg_write(struct tps65217 *tps, unsigned int reg,
|
||||
|
Reference in New Issue
Block a user