diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-16 16:22:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-16 16:22:21 -0400 |
commit | 73f8be297e90f6ebb951c30490376833f8782349 (patch) | |
tree | 1e15c36ed544e33b82e2bbbc6ba8d787c9d3e7e4 /include/linux | |
parent | c500ce38e52bb2f526b84f41314a9a9f83a2fdf5 (diff) | |
parent | b186b12487efc80c44f2f0d26cc26eb249cf1524 (diff) |
Merge tag 'mfd-for-linus-3.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Pull mfd fixes from Samuel Ortiz:
"This is the remaining MFD fixes for 3.6, with 5 pending fixes:
- A tps65217 build error fix.
- A lcp_ich regression fix caused by the MFD driver failing to
initialize the watchdog sub device due to ACPI conflicts.
- 2 MAX77693 interrupt handling bug fixes.
- An MFD core fix, adding an IRQ domain argument to the MFD device
addition API in order to prevent silent and potentially harmful
remapping behaviour changes for drivers supporting non-DT
platforms."
* tag 'mfd-for-linus-3.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
mfd: MAX77693: Fix NULL pointer error when initializing irqs
mfd: MAX77693: Fix interrupt handling bug
mfd: core: Push irqdomain mapping out into devices
mfd: lpc_ich: Fix a 3.5 kernel regression for iTCO_wdt driver
mfd: Move tps65217 regulator plat data handling to regulator
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mfd/core.h | 4 | ||||
-rw-r--r-- | include/linux/mfd/tps65217.h | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 3a8435a8058f..cebe97ee98b8 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | 18 | ||
19 | struct irq_domain; | ||
20 | |||
19 | /* | 21 | /* |
20 | * This struct describes the MFD part ("cell"). | 22 | * This struct describes the MFD part ("cell"). |
21 | * After registration the copy of this structure will become the platform data | 23 | * 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) | |||
98 | extern int mfd_add_devices(struct device *parent, int id, | 100 | extern int mfd_add_devices(struct device *parent, int id, |
99 | struct mfd_cell *cells, int n_devs, | 101 | struct mfd_cell *cells, int n_devs, |
100 | struct resource *mem_base, | 102 | struct resource *mem_base, |
101 | int irq_base); | 103 | int irq_base, struct irq_domain *irq_domain); |
102 | 104 | ||
103 | extern void mfd_remove_devices(struct device *parent); | 105 | extern void mfd_remove_devices(struct device *parent); |
104 | 106 | ||
diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h index 12c06870829a..7cd83d826ed8 100644 --- a/include/linux/mfd/tps65217.h +++ b/include/linux/mfd/tps65217.h | |||
@@ -22,6 +22,9 @@ | |||
22 | #include <linux/regulator/driver.h> | 22 | #include <linux/regulator/driver.h> |
23 | #include <linux/regulator/machine.h> | 23 | #include <linux/regulator/machine.h> |
24 | 24 | ||
25 | /* TPS chip id list */ | ||
26 | #define TPS65217 0xF0 | ||
27 | |||
25 | /* I2C ID for TPS65217 part */ | 28 | /* I2C ID for TPS65217 part */ |
26 | #define TPS65217_I2C_ID 0x24 | 29 | #define TPS65217_I2C_ID 0x24 |
27 | 30 | ||
@@ -248,13 +251,11 @@ struct tps_info { | |||
248 | struct tps65217 { | 251 | struct tps65217 { |
249 | struct device *dev; | 252 | struct device *dev; |
250 | struct tps65217_board *pdata; | 253 | struct tps65217_board *pdata; |
254 | unsigned int id; | ||
251 | struct regulator_desc desc[TPS65217_NUM_REGULATOR]; | 255 | struct regulator_desc desc[TPS65217_NUM_REGULATOR]; |
252 | struct regulator_dev *rdev[TPS65217_NUM_REGULATOR]; | 256 | struct regulator_dev *rdev[TPS65217_NUM_REGULATOR]; |
253 | struct tps_info *info[TPS65217_NUM_REGULATOR]; | 257 | struct tps_info *info[TPS65217_NUM_REGULATOR]; |
254 | struct regmap *regmap; | 258 | struct regmap *regmap; |
255 | |||
256 | /* Client devices */ | ||
257 | struct platform_device *regulator_pdev[TPS65217_NUM_REGULATOR]; | ||
258 | }; | 259 | }; |
259 | 260 | ||
260 | static inline struct tps65217 *dev_to_tps65217(struct device *dev) | 261 | static inline struct tps65217 *dev_to_tps65217(struct device *dev) |
@@ -262,6 +263,11 @@ static inline struct tps65217 *dev_to_tps65217(struct device *dev) | |||
262 | return dev_get_drvdata(dev); | 263 | return dev_get_drvdata(dev); |
263 | } | 264 | } |
264 | 265 | ||
266 | static inline int tps65217_chip_id(struct tps65217 *tps65217) | ||
267 | { | ||
268 | return tps65217->id; | ||
269 | } | ||
270 | |||
265 | int tps65217_reg_read(struct tps65217 *tps, unsigned int reg, | 271 | int tps65217_reg_read(struct tps65217 *tps, unsigned int reg, |
266 | unsigned int *val); | 272 | unsigned int *val); |
267 | int tps65217_reg_write(struct tps65217 *tps, unsigned int reg, | 273 | int tps65217_reg_write(struct tps65217 *tps, unsigned int reg, |