aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 19:32:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 19:32:25 -0400
commit8ded8d4e4facab78acf616bc34085ddd15c2c21c (patch)
tree7cb470ffbaffd4c1119d1baf4b0341f76cb4242a /include
parent7b053842b95914119f132fdac294fb2591b2e9a8 (diff)
parentbee546581424b5514ec6a034fb83fd4e95b804da (diff)
Merge tag 'regulator-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "The diffstat and changelog here is dominated by Lee Jones' heroic efforts to sync the ab8500 driver that's been maintained out of tree with mainline (plus Axel's cleanup work on the results) but there's a few other things here: - Axel Lin added regulator_map_voltage_ascend() optimising a common pattern for drivers using the core code. - Milo Kim tought the regulator core to handle regulators sharing an enable GPIO, avoiding the need to do hacks to support such systems. - Andrew Bresticker added code to handle missing supplies for regulators more sensibly for device tree systems, reducing the need for stubbing there. plus the usual batch of driver specific updates and fixes" * tag 'regulator-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (152 commits) regulator: mc13892: Fix MC13892_SWITCHERS0_SWxHI bit in set_voltage_sel regulator: Remove NULL test before calling regulator_unregister() regulator: mc13783: Add device tree probe support regulator: mc13xxx: Add warning of incorrect names of regulators regulator: max77686: Don't update max77686->opmode if update register fails regulator: max8952: Add missing config.of_node setting for regulator register regulator: ab3100: Fix regulator register error handling regulator: tps6524x: Use regulator_map_voltage_ascend regulator: lp8788-buck: Use regulator_map_voltage_ascend regulator: lp872x: Use regulator_map_voltage_ascend regulator: mc13892: Use regulator_map_voltage_ascend for mc13892_sw_regulator_ops regulator: tps65023: Use regulator_map_voltage_ascend regulator: tps65023: Merge tps65020 ldo1 and ldo2 vsel table regulator: tps6507x: Use regulator_map_voltage_ascend regulator: mc13892: Fix MC13892_SWITCHERS0_SWxHI bit in set_voltage_sel regulator: ab3100: device tree support regulator: ab3100: refactor probe to use IDs regulator: max8973: Don't override control1 variable when set ramp delay bits regulator: tps80031: Convert tps80031_dcdc_ops to [get|set]_voltage_sel_regmap regulator: tps80031: Fix LDO2 track mode for TPS80031 or TPS80032-ES1.0 ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/abx500/ab8500.h11
-rw-r--r--include/linux/mfd/palmas.h24
-rw-r--r--include/linux/regulator/ab8500.h217
-rw-r--r--include/linux/regulator/consumer.h14
-rw-r--r--include/linux/regulator/driver.h9
-rw-r--r--include/linux/regulator/max8952.h10
6 files changed, 241 insertions, 44 deletions
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
index 9db0bda446a0..84f449475c25 100644
--- a/include/linux/mfd/abx500/ab8500.h
+++ b/include/linux/mfd/abx500/ab8500.h
@@ -364,8 +364,7 @@ struct ab8500 {
364 const int *irq_reg_offset; 364 const int *irq_reg_offset;
365}; 365};
366 366
367struct regulator_reg_init; 367struct ab8500_regulator_platform_data;
368struct regulator_init_data;
369struct ab8500_gpio_platform_data; 368struct ab8500_gpio_platform_data;
370struct ab8500_codec_platform_data; 369struct ab8500_codec_platform_data;
371struct ab8500_sysctrl_platform_data; 370struct ab8500_sysctrl_platform_data;
@@ -375,19 +374,13 @@ struct ab8500_sysctrl_platform_data;
375 * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used 374 * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used
376 * @pm_power_off: Should machine pm power off hook be registered or not 375 * @pm_power_off: Should machine pm power off hook be registered or not
377 * @init: board-specific initialization after detection of ab8500 376 * @init: board-specific initialization after detection of ab8500
378 * @num_regulator_reg_init: number of regulator init registers
379 * @regulator_reg_init: regulator init registers
380 * @num_regulator: number of regulators
381 * @regulator: machine-specific constraints for regulators 377 * @regulator: machine-specific constraints for regulators
382 */ 378 */
383struct ab8500_platform_data { 379struct ab8500_platform_data {
384 int irq_base; 380 int irq_base;
385 bool pm_power_off; 381 bool pm_power_off;
386 void (*init) (struct ab8500 *); 382 void (*init) (struct ab8500 *);
387 int num_regulator_reg_init; 383 struct ab8500_regulator_platform_data *regulator;
388 struct ab8500_regulator_reg_init *regulator_reg_init;
389 int num_regulator;
390 struct regulator_init_data *regulator;
391 struct abx500_gpio_platform_data *gpio; 384 struct abx500_gpio_platform_data *gpio;
392 struct ab8500_codec_platform_data *codec; 385 struct ab8500_codec_platform_data *codec;
393 struct ab8500_sysctrl_platform_data *sysctrl; 386 struct ab8500_sysctrl_platform_data *sysctrl;
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 3bbda22721ea..ecddc5173c7c 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -109,19 +109,6 @@ struct palmas_reg_init {
109 */ 109 */
110 int mode_sleep; 110 int mode_sleep;
111 111
112 /* tstep is the timestep loaded to the TSTEP register
113 *
114 * For SMPS
115 *
116 * 0: Jump (no slope control)
117 * 1: 10mV/us
118 * 2: 5mV/us
119 * 3: 2.5mV/us
120 *
121 * For LDO unused
122 */
123 int tstep;
124
125 /* voltage_sel is the bitfield loaded onto the SMPSX_VOLTAGE 112 /* voltage_sel is the bitfield loaded onto the SMPSX_VOLTAGE
126 * register. Set this is the default voltage set in OTP needs 113 * register. Set this is the default voltage set in OTP needs
127 * to be overridden. 114 * to be overridden.
@@ -154,6 +141,12 @@ enum palmas_regulators {
154 PALMAS_REG_LDO9, 141 PALMAS_REG_LDO9,
155 PALMAS_REG_LDOLN, 142 PALMAS_REG_LDOLN,
156 PALMAS_REG_LDOUSB, 143 PALMAS_REG_LDOUSB,
144 /* External regulators */
145 PALMAS_REG_REGEN1,
146 PALMAS_REG_REGEN2,
147 PALMAS_REG_REGEN3,
148 PALMAS_REG_SYSEN1,
149 PALMAS_REG_SYSEN2,
157 /* Total number of regulators */ 150 /* Total number of regulators */
158 PALMAS_NUM_REGS, 151 PALMAS_NUM_REGS,
159}; 152};
@@ -171,6 +164,9 @@ struct palmas_pmic_platform_data {
171 164
172 /* use LDO6 for vibrator control */ 165 /* use LDO6 for vibrator control */
173 int ldo6_vibrator; 166 int ldo6_vibrator;
167
168 /* Enable tracking mode of LDO8 */
169 bool enable_ldo8_tracking;
174}; 170};
175 171
176struct palmas_usb_platform_data { 172struct palmas_usb_platform_data {
@@ -331,6 +327,8 @@ struct palmas_pmic {
331 int smps457; 327 int smps457;
332 328
333 int range[PALMAS_REG_SMPS10]; 329 int range[PALMAS_REG_SMPS10];
330 unsigned int ramp_delay[PALMAS_REG_SMPS10];
331 unsigned int current_reg_mode[PALMAS_REG_SMPS10];
334}; 332};
335 333
336struct palmas_resource { 334struct palmas_resource {
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h
index 7bd73bbdfd1b..7c5ff0c55773 100644
--- a/include/linux/regulator/ab8500.h
+++ b/include/linux/regulator/ab8500.h
@@ -5,11 +5,14 @@
5 * 5 *
6 * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson 6 * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
7 * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson 7 * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
8 * Daniel Willerud <daniel.willerud@stericsson.com> for ST-Ericsson
8 */ 9 */
9 10
10#ifndef __LINUX_MFD_AB8500_REGULATOR_H 11#ifndef __LINUX_MFD_AB8500_REGULATOR_H
11#define __LINUX_MFD_AB8500_REGULATOR_H 12#define __LINUX_MFD_AB8500_REGULATOR_H
12 13
14#include <linux/platform_device.h>
15
13/* AB8500 regulators */ 16/* AB8500 regulators */
14enum ab8500_regulator_id { 17enum ab8500_regulator_id {
15 AB8500_LDO_AUX1, 18 AB8500_LDO_AUX1,
@@ -17,7 +20,6 @@ enum ab8500_regulator_id {
17 AB8500_LDO_AUX3, 20 AB8500_LDO_AUX3,
18 AB8500_LDO_INTCORE, 21 AB8500_LDO_INTCORE,
19 AB8500_LDO_TVOUT, 22 AB8500_LDO_TVOUT,
20 AB8500_LDO_USB,
21 AB8500_LDO_AUDIO, 23 AB8500_LDO_AUDIO,
22 AB8500_LDO_ANAMIC1, 24 AB8500_LDO_ANAMIC1,
23 AB8500_LDO_ANAMIC2, 25 AB8500_LDO_ANAMIC2,
@@ -26,7 +28,28 @@ enum ab8500_regulator_id {
26 AB8500_NUM_REGULATORS, 28 AB8500_NUM_REGULATORS,
27}; 29};
28 30
29/* AB9450 regulators */ 31/* AB8505 regulators */
32enum ab8505_regulator_id {
33 AB8505_LDO_AUX1,
34 AB8505_LDO_AUX2,
35 AB8505_LDO_AUX3,
36 AB8505_LDO_AUX4,
37 AB8505_LDO_AUX5,
38 AB8505_LDO_AUX6,
39 AB8505_LDO_INTCORE,
40 AB8505_LDO_ADC,
41 AB8505_LDO_USB,
42 AB8505_LDO_AUDIO,
43 AB8505_LDO_ANAMIC1,
44 AB8505_LDO_ANAMIC2,
45 AB8505_LDO_AUX8,
46 AB8505_LDO_ANA,
47 AB8505_SYSCLKREQ_2,
48 AB8505_SYSCLKREQ_4,
49 AB8505_NUM_REGULATORS,
50};
51
52/* AB9540 regulators */
30enum ab9540_regulator_id { 53enum ab9540_regulator_id {
31 AB9540_LDO_AUX1, 54 AB9540_LDO_AUX1,
32 AB9540_LDO_AUX2, 55 AB9540_LDO_AUX2,
@@ -45,16 +68,39 @@ enum ab9540_regulator_id {
45 AB9540_NUM_REGULATORS, 68 AB9540_NUM_REGULATORS,
46}; 69};
47 70
48/* AB8500 and AB9540 register initialization */ 71/* AB8540 regulators */
72enum ab8540_regulator_id {
73 AB8540_LDO_AUX1,
74 AB8540_LDO_AUX2,
75 AB8540_LDO_AUX3,
76 AB8540_LDO_AUX4,
77 AB8540_LDO_AUX5,
78 AB8540_LDO_AUX6,
79 AB8540_LDO_INTCORE,
80 AB8540_LDO_TVOUT,
81 AB8540_LDO_AUDIO,
82 AB8540_LDO_ANAMIC1,
83 AB8540_LDO_ANAMIC2,
84 AB8540_LDO_DMIC,
85 AB8540_LDO_ANA,
86 AB8540_LDO_SDIO,
87 AB8540_SYSCLKREQ_2,
88 AB8540_SYSCLKREQ_4,
89 AB8540_NUM_REGULATORS,
90};
91
92/* AB8500, AB8505, and AB9540 register initialization */
49struct ab8500_regulator_reg_init { 93struct ab8500_regulator_reg_init {
50 int id; 94 int id;
95 u8 mask;
51 u8 value; 96 u8 value;
52}; 97};
53 98
54#define INIT_REGULATOR_REGISTER(_id, _value) \ 99#define INIT_REGULATOR_REGISTER(_id, _mask, _value) \
55 { \ 100 { \
56 .id = _id, \ 101 .id = _id, \
57 .value = _value, \ 102 .mask = _mask, \
103 .value = _value, \
58 } 104 }
59 105
60/* AB8500 registers */ 106/* AB8500 registers */
@@ -86,10 +132,58 @@ enum ab8500_regulator_reg {
86 AB8500_REGUCTRL2SPARE, 132 AB8500_REGUCTRL2SPARE,
87 AB8500_REGUCTRLDISCH, 133 AB8500_REGUCTRLDISCH,
88 AB8500_REGUCTRLDISCH2, 134 AB8500_REGUCTRLDISCH2,
89 AB8500_VSMPS1SEL1,
90 AB8500_NUM_REGULATOR_REGISTERS, 135 AB8500_NUM_REGULATOR_REGISTERS,
91}; 136};
92 137
138/* AB8505 registers */
139enum ab8505_regulator_reg {
140 AB8505_REGUREQUESTCTRL1,
141 AB8505_REGUREQUESTCTRL2,
142 AB8505_REGUREQUESTCTRL3,
143 AB8505_REGUREQUESTCTRL4,
144 AB8505_REGUSYSCLKREQ1HPVALID1,
145 AB8505_REGUSYSCLKREQ1HPVALID2,
146 AB8505_REGUHWHPREQ1VALID1,
147 AB8505_REGUHWHPREQ1VALID2,
148 AB8505_REGUHWHPREQ2VALID1,
149 AB8505_REGUHWHPREQ2VALID2,
150 AB8505_REGUSWHPREQVALID1,
151 AB8505_REGUSWHPREQVALID2,
152 AB8505_REGUSYSCLKREQVALID1,
153 AB8505_REGUSYSCLKREQVALID2,
154 AB8505_REGUVAUX4REQVALID,
155 AB8505_REGUMISC1,
156 AB8505_VAUDIOSUPPLY,
157 AB8505_REGUCTRL1VAMIC,
158 AB8505_VSMPSAREGU,
159 AB8505_VSMPSBREGU,
160 AB8505_VSAFEREGU, /* NOTE! PRCMU register */
161 AB8505_VPLLVANAREGU,
162 AB8505_EXTSUPPLYREGU,
163 AB8505_VAUX12REGU,
164 AB8505_VRF1VAUX3REGU,
165 AB8505_VSMPSASEL1,
166 AB8505_VSMPSASEL2,
167 AB8505_VSMPSASEL3,
168 AB8505_VSMPSBSEL1,
169 AB8505_VSMPSBSEL2,
170 AB8505_VSMPSBSEL3,
171 AB8505_VSAFESEL1, /* NOTE! PRCMU register */
172 AB8505_VSAFESEL2, /* NOTE! PRCMU register */
173 AB8505_VSAFESEL3, /* NOTE! PRCMU register */
174 AB8505_VAUX1SEL,
175 AB8505_VAUX2SEL,
176 AB8505_VRF1VAUX3SEL,
177 AB8505_VAUX4REQCTRL,
178 AB8505_VAUX4REGU,
179 AB8505_VAUX4SEL,
180 AB8505_REGUCTRLDISCH,
181 AB8505_REGUCTRLDISCH2,
182 AB8505_REGUCTRLDISCH3,
183 AB8505_CTRLVAUX5,
184 AB8505_CTRLVAUX6,
185 AB8505_NUM_REGULATOR_REGISTERS,
186};
93 187
94/* AB9540 registers */ 188/* AB9540 registers */
95enum ab9540_regulator_reg { 189enum ab9540_regulator_reg {
@@ -139,4 +233,111 @@ enum ab9540_regulator_reg {
139 AB9540_NUM_REGULATOR_REGISTERS, 233 AB9540_NUM_REGULATOR_REGISTERS,
140}; 234};
141 235
236/* AB8540 registers */
237enum ab8540_regulator_reg {
238 AB8540_REGUREQUESTCTRL1,
239 AB8540_REGUREQUESTCTRL2,
240 AB8540_REGUREQUESTCTRL3,
241 AB8540_REGUREQUESTCTRL4,
242 AB8540_REGUSYSCLKREQ1HPVALID1,
243 AB8540_REGUSYSCLKREQ1HPVALID2,
244 AB8540_REGUHWHPREQ1VALID1,
245 AB8540_REGUHWHPREQ1VALID2,
246 AB8540_REGUHWHPREQ2VALID1,
247 AB8540_REGUHWHPREQ2VALID2,
248 AB8540_REGUSWHPREQVALID1,
249 AB8540_REGUSWHPREQVALID2,
250 AB8540_REGUSYSCLKREQVALID1,
251 AB8540_REGUSYSCLKREQVALID2,
252 AB8540_REGUVAUX4REQVALID,
253 AB8540_REGUVAUX5REQVALID,
254 AB8540_REGUVAUX6REQVALID,
255 AB8540_REGUVCLKBREQVALID,
256 AB8540_REGUVRF1REQVALID,
257 AB8540_REGUMISC1,
258 AB8540_VAUDIOSUPPLY,
259 AB8540_REGUCTRL1VAMIC,
260 AB8540_VHSIC,
261 AB8540_VSDIO,
262 AB8540_VSMPS1REGU,
263 AB8540_VSMPS2REGU,
264 AB8540_VSMPS3REGU,
265 AB8540_VPLLVANAREGU,
266 AB8540_EXTSUPPLYREGU,
267 AB8540_VAUX12REGU,
268 AB8540_VRF1VAUX3REGU,
269 AB8540_VSMPS1SEL1,
270 AB8540_VSMPS1SEL2,
271 AB8540_VSMPS1SEL3,
272 AB8540_VSMPS2SEL1,
273 AB8540_VSMPS2SEL2,
274 AB8540_VSMPS2SEL3,
275 AB8540_VSMPS3SEL1,
276 AB8540_VSMPS3SEL2,
277 AB8540_VAUX1SEL,
278 AB8540_VAUX2SEL,
279 AB8540_VRF1VAUX3SEL,
280 AB8540_REGUCTRL2SPARE,
281 AB8540_VAUX4REQCTRL,
282 AB8540_VAUX4REGU,
283 AB8540_VAUX4SEL,
284 AB8540_VAUX5REQCTRL,
285 AB8540_VAUX5REGU,
286 AB8540_VAUX5SEL,
287 AB8540_VAUX6REQCTRL,
288 AB8540_VAUX6REGU,
289 AB8540_VAUX6SEL,
290 AB8540_VCLKBREQCTRL,
291 AB8540_VCLKBREGU,
292 AB8540_VCLKBSEL,
293 AB8540_VRF1REQCTRL,
294 AB8540_REGUCTRLDISCH,
295 AB8540_REGUCTRLDISCH2,
296 AB8540_REGUCTRLDISCH3,
297 AB8540_REGUCTRLDISCH4,
298 AB8540_VSIMSYSCLKCTRL,
299 AB8540_VANAVPLLSEL,
300 AB8540_NUM_REGULATOR_REGISTERS,
301};
302
303/* AB8500 external regulators */
304struct ab8500_ext_regulator_cfg {
305 bool hwreq; /* requires hw mode or high power mode */
306};
307
308enum ab8500_ext_regulator_id {
309 AB8500_EXT_SUPPLY1,
310 AB8500_EXT_SUPPLY2,
311 AB8500_EXT_SUPPLY3,
312 AB8500_NUM_EXT_REGULATORS,
313};
314
315/* AB8500 regulator platform data */
316struct ab8500_regulator_platform_data {
317 int num_reg_init;
318 struct ab8500_regulator_reg_init *reg_init;
319 int num_regulator;
320 struct regulator_init_data *regulator;
321 int num_ext_regulator;
322 struct regulator_init_data *ext_regulator;
323};
324
325#ifdef CONFIG_REGULATOR_AB8500_DEBUG
326int ab8500_regulator_debug_init(struct platform_device *pdev);
327int ab8500_regulator_debug_exit(struct platform_device *pdev);
328#else
329static inline int ab8500_regulator_debug_init(struct platform_device *pdev)
330{
331 return 0;
332}
333static inline int ab8500_regulator_debug_exit(struct platform_device *pdev)
334{
335 return 0;
336}
337#endif
338
339/* AB8500 external regulator functions. */
340int ab8500_ext_regulator_init(struct platform_device *pdev);
341void ab8500_ext_regulator_exit(struct platform_device *pdev);
342
142#endif 343#endif
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 7bc732ce6e50..145022a83085 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -141,18 +141,18 @@ void regulator_put(struct regulator *regulator);
141void devm_regulator_put(struct regulator *regulator); 141void devm_regulator_put(struct regulator *regulator);
142 142
143/* regulator output control and status */ 143/* regulator output control and status */
144int regulator_enable(struct regulator *regulator); 144int __must_check regulator_enable(struct regulator *regulator);
145int regulator_disable(struct regulator *regulator); 145int regulator_disable(struct regulator *regulator);
146int regulator_force_disable(struct regulator *regulator); 146int regulator_force_disable(struct regulator *regulator);
147int regulator_is_enabled(struct regulator *regulator); 147int regulator_is_enabled(struct regulator *regulator);
148int regulator_disable_deferred(struct regulator *regulator, int ms); 148int regulator_disable_deferred(struct regulator *regulator, int ms);
149 149
150int regulator_bulk_get(struct device *dev, int num_consumers, 150int __must_check regulator_bulk_get(struct device *dev, int num_consumers,
151 struct regulator_bulk_data *consumers); 151 struct regulator_bulk_data *consumers);
152int devm_regulator_bulk_get(struct device *dev, int num_consumers, 152int __must_check devm_regulator_bulk_get(struct device *dev, int num_consumers,
153 struct regulator_bulk_data *consumers); 153 struct regulator_bulk_data *consumers);
154int regulator_bulk_enable(int num_consumers, 154int __must_check regulator_bulk_enable(int num_consumers,
155 struct regulator_bulk_data *consumers); 155 struct regulator_bulk_data *consumers);
156int regulator_bulk_disable(int num_consumers, 156int regulator_bulk_disable(int num_consumers,
157 struct regulator_bulk_data *consumers); 157 struct regulator_bulk_data *consumers);
158int regulator_bulk_force_disable(int num_consumers, 158int regulator_bulk_force_disable(int num_consumers,
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 7df93f52db08..6700cc94bdd1 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -22,6 +22,7 @@
22struct regmap; 22struct regmap;
23struct regulator_dev; 23struct regulator_dev;
24struct regulator_init_data; 24struct regulator_init_data;
25struct regulator_enable_gpio;
25 26
26enum regulator_status { 27enum regulator_status {
27 REGULATOR_STATUS_OFF, 28 REGULATOR_STATUS_OFF,
@@ -199,6 +200,8 @@ enum regulator_type {
199 * output when using regulator_set_voltage_sel_regmap 200 * output when using regulator_set_voltage_sel_regmap
200 * @enable_reg: Register for control when using regmap enable/disable ops 201 * @enable_reg: Register for control when using regmap enable/disable ops
201 * @enable_mask: Mask for control when using regmap enable/disable ops 202 * @enable_mask: Mask for control when using regmap enable/disable ops
203 * @enable_is_inverted: A flag to indicate set enable_mask bits to disable
204 * when using regulator_enable_regmap and friends APIs.
202 * @bypass_reg: Register for control when using regmap set_bypass 205 * @bypass_reg: Register for control when using regmap set_bypass
203 * @bypass_mask: Mask for control when using regmap set_bypass 206 * @bypass_mask: Mask for control when using regmap set_bypass
204 * 207 *
@@ -228,6 +231,7 @@ struct regulator_desc {
228 unsigned int apply_bit; 231 unsigned int apply_bit;
229 unsigned int enable_reg; 232 unsigned int enable_reg;
230 unsigned int enable_mask; 233 unsigned int enable_mask;
234 bool enable_is_inverted;
231 unsigned int bypass_reg; 235 unsigned int bypass_reg;
232 unsigned int bypass_mask; 236 unsigned int bypass_mask;
233 237
@@ -302,8 +306,7 @@ struct regulator_dev {
302 306
303 struct dentry *debugfs; 307 struct dentry *debugfs;
304 308
305 int ena_gpio; 309 struct regulator_enable_gpio *ena_pin;
306 unsigned int ena_gpio_invert:1;
307 unsigned int ena_gpio_state:1; 310 unsigned int ena_gpio_state:1;
308}; 311};
309 312
@@ -329,6 +332,8 @@ int regulator_map_voltage_linear(struct regulator_dev *rdev,
329 int min_uV, int max_uV); 332 int min_uV, int max_uV);
330int regulator_map_voltage_iterate(struct regulator_dev *rdev, 333int regulator_map_voltage_iterate(struct regulator_dev *rdev,
331 int min_uV, int max_uV); 334 int min_uV, int max_uV);
335int regulator_map_voltage_ascend(struct regulator_dev *rdev,
336 int min_uV, int max_uV);
332int regulator_get_voltage_sel_regmap(struct regulator_dev *rdev); 337int regulator_get_voltage_sel_regmap(struct regulator_dev *rdev);
333int regulator_set_voltage_sel_regmap(struct regulator_dev *rdev, unsigned sel); 338int regulator_set_voltage_sel_regmap(struct regulator_dev *rdev, unsigned sel);
334int regulator_is_enabled_regmap(struct regulator_dev *rdev); 339int regulator_is_enabled_regmap(struct regulator_dev *rdev);
diff --git a/include/linux/regulator/max8952.h b/include/linux/regulator/max8952.h
index 45e42855ad05..4dbb63a1d4ab 100644
--- a/include/linux/regulator/max8952.h
+++ b/include/linux/regulator/max8952.h
@@ -122,13 +122,13 @@ struct max8952_platform_data {
122 int gpio_vid1; 122 int gpio_vid1;
123 int gpio_en; 123 int gpio_en;
124 124
125 u8 default_mode; 125 u32 default_mode;
126 u8 dvs_mode[MAX8952_NUM_DVS_MODE]; /* MAX8952_DVS_MODEx_XXXXmV */ 126 u32 dvs_mode[MAX8952_NUM_DVS_MODE]; /* MAX8952_DVS_MODEx_XXXXmV */
127 127
128 u8 sync_freq; 128 u32 sync_freq;
129 u8 ramp_speed; 129 u32 ramp_speed;
130 130
131 struct regulator_init_data reg_data; 131 struct regulator_init_data *reg_data;
132}; 132};
133 133
134 134