diff options
author | Mike Rapoport <mike@compulab.co.il> | 2010-08-10 19:11:04 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-08-12 05:28:12 -0400 |
commit | c6c193326384aecfd668c8f271799a44dbc74c1a (patch) | |
tree | 58df734fad40389f64641a6f757d245b6274a93e /include/linux/mfd | |
parent | 1c888e2e3824a3f7565b4d96ede423cb9a9a28b7 (diff) |
mfd: Add TPS6586x driver
Add mfd core driver for TPS6586x PMICs family.
The driver provides I/O access for the sub-device drivers and performs
regstration of the sub-devices based on the platform requirements.
In addition it implements GPIOlib interface for the chip GPIOs.
TODO:
- add interrupt support
- add platform data for PWM, backlight leds and charger
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r-- | include/linux/mfd/tps6586x.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h new file mode 100644 index 000000000000..772b3ae640af --- /dev/null +++ b/include/linux/mfd/tps6586x.h | |||
@@ -0,0 +1,47 @@ | |||
1 | #ifndef __LINUX_MFD_TPS6586X_H | ||
2 | #define __LINUX_MFD_TPS6586X_H | ||
3 | |||
4 | enum { | ||
5 | TPS6586X_ID_SM_0, | ||
6 | TPS6586X_ID_SM_1, | ||
7 | TPS6586X_ID_SM_2, | ||
8 | TPS6586X_ID_LDO_0, | ||
9 | TPS6586X_ID_LDO_1, | ||
10 | TPS6586X_ID_LDO_2, | ||
11 | TPS6586X_ID_LDO_3, | ||
12 | TPS6586X_ID_LDO_4, | ||
13 | TPS6586X_ID_LDO_5, | ||
14 | TPS6586X_ID_LDO_6, | ||
15 | TPS6586X_ID_LDO_7, | ||
16 | TPS6586X_ID_LDO_8, | ||
17 | TPS6586X_ID_LDO_9, | ||
18 | TPS6586X_ID_LDO_RTC, | ||
19 | }; | ||
20 | |||
21 | struct tps6586x_subdev_info { | ||
22 | int id; | ||
23 | const char *name; | ||
24 | void *platform_data; | ||
25 | }; | ||
26 | |||
27 | struct tps6586x_platform_data { | ||
28 | int num_subdevs; | ||
29 | struct tps6586x_subdev_info *subdevs; | ||
30 | |||
31 | int gpio_base; | ||
32 | }; | ||
33 | |||
34 | /* | ||
35 | * NOTE: the functions below are not intended for use outside | ||
36 | * of the TPS6586X sub-device drivers | ||
37 | */ | ||
38 | extern int tps6586x_write(struct device *dev, int reg, uint8_t val); | ||
39 | extern int tps6586x_writes(struct device *dev, int reg, int len, uint8_t *val); | ||
40 | extern int tps6586x_read(struct device *dev, int reg, uint8_t *val); | ||
41 | extern int tps6586x_reads(struct device *dev, int reg, int len, uint8_t *val); | ||
42 | extern int tps6586x_set_bits(struct device *dev, int reg, uint8_t bit_mask); | ||
43 | extern int tps6586x_clr_bits(struct device *dev, int reg, uint8_t bit_mask); | ||
44 | extern int tps6586x_update(struct device *dev, int reg, uint8_t val, | ||
45 | uint8_t mask); | ||
46 | |||
47 | #endif /*__LINUX_MFD_TPS6586X_H */ | ||