diff options
| author | Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> | 2011-05-16 19:34:59 -0400 |
|---|---|---|
| committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2011-05-27 05:49:10 -0400 |
| commit | 795570561cc9c8dc7f7582ed6c4d07121b1c4831 (patch) | |
| tree | 767ca7646c6d23a5b8b38347014afe3f178cbdef /include/linux/mfd | |
| parent | 3c24019ddeab71ddf125ad2ad13a38041655c1fd (diff) | |
MFD: TPS65910: Add support for TPS65911 device
The TPS65911 is the next generation of the TPS65910 family of
PMIC chips. It adds a few features:
- Watchdog Timer
- PWM & LED generators
- Comparators for system control status
It also adds a set of Interrupts and GPIOs, among other things.
The driver exports a function to identify between different
versions of the tps65910 family, allowing other modules to
identify the capabilities of the current chip.
Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/linux/mfd')
| -rw-r--r-- | include/linux/mfd/tps65910.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h index be08a0c7e7de..6ceea0dab8d7 100644 --- a/include/linux/mfd/tps65910.h +++ b/include/linux/mfd/tps65910.h | |||
| @@ -17,6 +17,14 @@ | |||
| 17 | #ifndef __LINUX_MFD_TPS65910_H | 17 | #ifndef __LINUX_MFD_TPS65910_H |
| 18 | #define __LINUX_MFD_TPS65910_H | 18 | #define __LINUX_MFD_TPS65910_H |
| 19 | 19 | ||
| 20 | /* TPS chip id list */ | ||
| 21 | #define TPS65910 0 | ||
| 22 | #define TPS65911 1 | ||
| 23 | |||
| 24 | /* TPS regulator type list */ | ||
| 25 | #define REGULATOR_LDO 0 | ||
| 26 | #define REGULATOR_DCDC 1 | ||
| 27 | |||
| 20 | /* | 28 | /* |
| 21 | * List of registers for component TPS65910 | 29 | * List of registers for component TPS65910 |
| 22 | * | 30 | * |
| @@ -97,6 +105,21 @@ | |||
| 97 | #define TPS65910_MAX_REGISTER 0x80 | 105 | #define TPS65910_MAX_REGISTER 0x80 |
| 98 | 106 | ||
| 99 | /* | 107 | /* |
| 108 | * List of registers specific to TPS65911 | ||
| 109 | */ | ||
| 110 | #define TPS65911_VDDCTRL 0x27 | ||
| 111 | #define TPS65911_VDDCTRL_OP 0x28 | ||
| 112 | #define TPS65911_VDDCTRL_SR 0x29 | ||
| 113 | #define TPS65911_LDO1 0x30 | ||
| 114 | #define TPS65911_LDO2 0x31 | ||
| 115 | #define TPS65911_LDO5 0x32 | ||
| 116 | #define TPS65911_LDO8 0x33 | ||
| 117 | #define TPS65911_LDO7 0x34 | ||
| 118 | #define TPS65911_LDO6 0x35 | ||
| 119 | #define TPS65911_LDO4 0x36 | ||
| 120 | #define TPS65911_LDO3 0x37 | ||
| 121 | |||
| 122 | /* | ||
| 100 | * List of register bitfields for component TPS65910 | 123 | * List of register bitfields for component TPS65910 |
| 101 | * | 124 | * |
| 102 | */ | 125 | */ |
| @@ -702,6 +725,23 @@ | |||
| 702 | #define JTAGVERNUM_VERNUM_SHIFT 0 | 725 | #define JTAGVERNUM_VERNUM_SHIFT 0 |
| 703 | 726 | ||
| 704 | 727 | ||
| 728 | /* Register VDDCTRL (0x27) bit definitions */ | ||
| 729 | #define VDDCTRL_ST_MASK 0x03 | ||
| 730 | #define VDDCTRL_ST_SHIFT 0 | ||
| 731 | |||
| 732 | |||
| 733 | /*Register VDDCTRL_OP (0x28) bit definitios */ | ||
| 734 | #define VDDCTRL_OP_CMD_MASK 0x80 | ||
| 735 | #define VDDCTRL_OP_CMD_SHIFT 7 | ||
| 736 | #define VDDCTRL_OP_SEL_MASK 0x7F | ||
| 737 | #define VDDCTRL_OP_SEL_SHIFT 0 | ||
| 738 | |||
| 739 | |||
| 740 | /*Register VDDCTRL_SR (0x29) bit definitions */ | ||
| 741 | #define VDDCTRL_SR_SEL_MASK 0x7F | ||
| 742 | #define VDDCTRL_SR_SEL_SHIFT 0 | ||
| 743 | |||
| 744 | |||
| 705 | /* IRQ Definitions */ | 745 | /* IRQ Definitions */ |
| 706 | #define TPS65910_IRQ_VBAT_VMBDCH 0 | 746 | #define TPS65910_IRQ_VBAT_VMBDCH 0 |
| 707 | #define TPS65910_IRQ_VBAT_VMHI 1 | 747 | #define TPS65910_IRQ_VBAT_VMHI 1 |
| @@ -742,6 +782,7 @@ struct tps65910 { | |||
| 742 | struct device *dev; | 782 | struct device *dev; |
| 743 | struct i2c_client *i2c_client; | 783 | struct i2c_client *i2c_client; |
| 744 | struct mutex io_mutex; | 784 | struct mutex io_mutex; |
| 785 | unsigned int id; | ||
| 745 | int (*read)(struct tps65910 *tps65910, u8 reg, int size, void *dest); | 786 | int (*read)(struct tps65910 *tps65910, u8 reg, int size, void *dest); |
| 746 | int (*write)(struct tps65910 *tps65910, u8 reg, int size, void *src); | 787 | int (*write)(struct tps65910 *tps65910, u8 reg, int size, void *src); |
| 747 | 788 | ||
| @@ -771,4 +812,9 @@ void tps65910_gpio_init(struct tps65910 *tps65910, int gpio_base); | |||
| 771 | int tps65910_irq_init(struct tps65910 *tps65910, int irq, | 812 | int tps65910_irq_init(struct tps65910 *tps65910, int irq, |
| 772 | struct tps65910_platform_data *pdata); | 813 | struct tps65910_platform_data *pdata); |
| 773 | 814 | ||
| 815 | static inline int tps65910_chip_id(struct tps65910 *tps65910) | ||
| 816 | { | ||
| 817 | return tps65910->id; | ||
| 818 | } | ||
| 819 | |||
| 774 | #endif /* __LINUX_MFD_TPS65910_H */ | 820 | #endif /* __LINUX_MFD_TPS65910_H */ |
