aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBengt Jonsson <bengt.g.jonsson@stericsson.com>2011-03-11 05:54:46 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2011-03-26 10:15:05 -0400
commit79568b941277b5986a8a7f0fb8578b2ccfc3e87e (patch)
treeb66551a8bd5c9fa75f01767578e76a19d030ee32 /include/linux
parentea05ef31f2aa98b25d14222300dc9c1d1eb59e41 (diff)
regulator: initialization for ab8500 regulators
The regulators on the AB8500 have a lot of custom hardware control settings pertaining to 8 external signals, settings which are board-specific and need be provided from the platform at startup. Initialization added for regulators Vana, VextSupply1, VextSupply2, VextSupply3, Vaux1, Vaux2, Vaux3, VTVout, Vintcore12, Vaudio, Vdmic, Vamic1, Vamic2, VrefDDR. Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Reviewed-by: Rickard Andersson <rickard.andersson@stericsson.com> Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/ab8500.h6
-rw-r--r--include/linux/regulator/ab8500.h50
2 files changed, 54 insertions, 2 deletions
diff --git a/include/linux/mfd/ab8500.h b/include/linux/mfd/ab8500.h
index 56f8dea72152..6e4f77ef4d20 100644
--- a/include/linux/mfd/ab8500.h
+++ b/include/linux/mfd/ab8500.h
@@ -139,17 +139,23 @@ struct ab8500 {
139 u8 oldmask[AB8500_NUM_IRQ_REGS]; 139 u8 oldmask[AB8500_NUM_IRQ_REGS];
140}; 140};
141 141
142struct regulator_reg_init;
142struct regulator_init_data; 143struct regulator_init_data;
143 144
144/** 145/**
145 * struct ab8500_platform_data - AB8500 platform data 146 * struct ab8500_platform_data - AB8500 platform data
146 * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used 147 * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used
147 * @init: board-specific initialization after detection of ab8500 148 * @init: board-specific initialization after detection of ab8500
149 * @num_regulator_reg_init: number of regulator init registers
150 * @regulator_reg_init: regulator init registers
151 * @num_regulator: number of regulators
148 * @regulator: machine-specific constraints for regulators 152 * @regulator: machine-specific constraints for regulators
149 */ 153 */
150struct ab8500_platform_data { 154struct ab8500_platform_data {
151 int irq_base; 155 int irq_base;
152 void (*init) (struct ab8500 *); 156 void (*init) (struct ab8500 *);
157 int num_regulator_reg_init;
158 struct ab8500_regulator_reg_init *regulator_reg_init;
153 int num_regulator; 159 int num_regulator;
154 struct regulator_init_data *regulator; 160 struct regulator_init_data *regulator;
155}; 161};
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h
index d4eacdef2017..76579f964a29 100644
--- a/include/linux/regulator/ab8500.h
+++ b/include/linux/regulator/ab8500.h
@@ -3,8 +3,8 @@
3 * 3 *
4 * License Terms: GNU General Public License v2 4 * License Terms: GNU General Public License v2
5 * 5 *
6 * Author: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson 6 * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
7 * 7 * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
8 */ 8 */
9 9
10#ifndef __LINUX_MFD_AB8500_REGULATOR_H 10#ifndef __LINUX_MFD_AB8500_REGULATOR_H
@@ -25,4 +25,50 @@ enum ab8500_regulator_id {
25 AB8500_LDO_ANA, 25 AB8500_LDO_ANA,
26 AB8500_NUM_REGULATORS, 26 AB8500_NUM_REGULATORS,
27}; 27};
28
29/* AB8500 register initialization */
30struct ab8500_regulator_reg_init {
31 int id;
32 u8 value;
33};
34
35#define INIT_REGULATOR_REGISTER(_id, _value) \
36 { \
37 .id = _id, \
38 .value = _value, \
39 }
40
41/* AB8500 registers */
42enum ab8500_regulator_reg {
43 AB8500_REGUREQUESTCTRL2,
44 AB8500_REGUREQUESTCTRL3,
45 AB8500_REGUREQUESTCTRL4,
46 AB8500_REGUSYSCLKREQ1HPVALID1,
47 AB8500_REGUSYSCLKREQ1HPVALID2,
48 AB8500_REGUHWHPREQ1VALID1,
49 AB8500_REGUHWHPREQ1VALID2,
50 AB8500_REGUHWHPREQ2VALID1,
51 AB8500_REGUHWHPREQ2VALID2,
52 AB8500_REGUSWHPREQVALID1,
53 AB8500_REGUSWHPREQVALID2,
54 AB8500_REGUSYSCLKREQVALID1,
55 AB8500_REGUSYSCLKREQVALID2,
56 AB8500_REGUMISC1,
57 AB8500_VAUDIOSUPPLY,
58 AB8500_REGUCTRL1VAMIC,
59 AB8500_VPLLVANAREGU,
60 AB8500_VREFDDR,
61 AB8500_EXTSUPPLYREGU,
62 AB8500_VAUX12REGU,
63 AB8500_VRF1VAUX3REGU,
64 AB8500_VAUX1SEL,
65 AB8500_VAUX2SEL,
66 AB8500_VRF1VAUX3SEL,
67 AB8500_REGUCTRL2SPARE,
68 AB8500_REGUCTRLDISCH,
69 AB8500_REGUCTRLDISCH2,
70 AB8500_VSMPS1SEL1,
71 AB8500_NUM_REGULATOR_REGISTERS,
72};
73
28#endif 74#endif