diff options
| author | Sundar R Iyer <sundar.iyer@stericsson.com> | 2010-07-13 02:21:28 -0400 |
|---|---|---|
| committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2010-08-11 06:38:01 -0400 |
| commit | 549931f99e030d63a437c23943fd8dc9b7c0e41c (patch) | |
| tree | 6367d2b696af0fcdda8e275e18c4c666743a54f2 /include/linux | |
| parent | 1880a2fc59d2afabc142a311497cf7c320d64506 (diff) | |
ab8500-mfd: add regulator support to ab8500 mfd device
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-By: Mattias Wallin <mattias.wallin@stericsson.com>
Acked-By: Bengt JONSSON <bengt.g.jonsson@stericsson.com>
Signed-off-by: Sundar R Iyer <sundar.iyer@stericsson.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/ab8500.h | 6 | ||||
| -rw-r--r-- | include/linux/regulator/ab8500.h | 25 |
2 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/mfd/ab8500.h b/include/linux/mfd/ab8500.h index b63ff3ba3351..f5cec4500f38 100644 --- a/include/linux/mfd/ab8500.h +++ b/include/linux/mfd/ab8500.h | |||
| @@ -76,6 +76,8 @@ | |||
| 76 | #define AB8500_NR_IRQS 104 | 76 | #define AB8500_NR_IRQS 104 |
| 77 | #define AB8500_NUM_IRQ_REGS 13 | 77 | #define AB8500_NUM_IRQ_REGS 13 |
| 78 | 78 | ||
| 79 | #define AB8500_NUM_REGULATORS 15 | ||
| 80 | |||
| 79 | /** | 81 | /** |
| 80 | * struct ab8500 - ab8500 internal structure | 82 | * struct ab8500 - ab8500 internal structure |
| 81 | * @dev: parent device | 83 | * @dev: parent device |
| @@ -108,14 +110,18 @@ struct ab8500 { | |||
| 108 | u8 oldmask[AB8500_NUM_IRQ_REGS]; | 110 | u8 oldmask[AB8500_NUM_IRQ_REGS]; |
| 109 | }; | 111 | }; |
| 110 | 112 | ||
| 113 | struct regulator_init_data; | ||
| 114 | |||
| 111 | /** | 115 | /** |
| 112 | * struct ab8500_platform_data - AB8500 platform data | 116 | * struct ab8500_platform_data - AB8500 platform data |
| 113 | * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used | 117 | * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used |
| 114 | * @init: board-specific initialization after detection of ab8500 | 118 | * @init: board-specific initialization after detection of ab8500 |
| 119 | * @regulator: machine-specific constraints for regulators | ||
| 115 | */ | 120 | */ |
| 116 | struct ab8500_platform_data { | 121 | struct ab8500_platform_data { |
| 117 | int irq_base; | 122 | int irq_base; |
| 118 | void (*init) (struct ab8500 *); | 123 | void (*init) (struct ab8500 *); |
| 124 | struct regulator_init_data *regulator[AB8500_NUM_REGULATORS]; | ||
| 119 | }; | 125 | }; |
| 120 | 126 | ||
| 121 | extern int ab8500_write(struct ab8500 *a8500, u16 addr, u8 data); | 127 | extern int ab8500_write(struct ab8500 *a8500, u16 addr, u8 data); |
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h new file mode 100644 index 000000000000..f509877c2ed4 --- /dev/null +++ b/include/linux/regulator/ab8500.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) ST-Ericsson SA 2010 | ||
| 3 | * | ||
| 4 | * License Terms: GNU General Public License v2 | ||
| 5 | * | ||
| 6 | * Author: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson | ||
| 7 | * | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __LINUX_MFD_AB8500_REGULATOR_H | ||
| 11 | #define __LINUX_MFD_AB8500_REGULATOR_H | ||
| 12 | |||
| 13 | /* AB8500 regulators */ | ||
| 14 | #define AB8500_LDO_AUX1 0 | ||
| 15 | #define AB8500_LDO_AUX2 1 | ||
| 16 | #define AB8500_LDO_AUX3 2 | ||
| 17 | #define AB8500_LDO_INTCORE 3 | ||
| 18 | #define AB8500_LDO_TVOUT 4 | ||
| 19 | #define AB8500_LDO_AUDIO 5 | ||
| 20 | #define AB8500_LDO_ANAMIC1 6 | ||
| 21 | #define AB8500_LDO_ANAMIC2 7 | ||
| 22 | #define AB8500_LDO_DMIC 8 | ||
| 23 | #define AB8500_LDO_ANA 9 | ||
| 24 | |||
| 25 | #endif | ||
