aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-03 14:44:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-03 14:44:48 -0400
commit312c76f1a3989b8d0c0c13fee765bb2c41f2d114 (patch)
treec3aeb04e87ad51cbf060a475c123b80d679cd33a /include/linux
parente13cccfd86481bd4c0499577f44c570d334da79b (diff)
parent978371cbabb4cb7a47751049d72f06dc8348cab2 (diff)
Merge tag 'regulator-v3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into next
Pull regulator updates from Mark Brown: "The bulk of the changes for this release are a few new drivers however there are a couple of noticable core changes and the usual stream of cleanups and fixes: - move disable of unused regulators later in init so it comes after deferred probe has iterated making startup smoother. - fixes to reference counting of the DT nodes for constraints from Charles Keepax. This has little practical impact since all real users of the regulator bindings use FDT which doesn't need the reference counting. - lots of cleanups, especially to the Samsung drivers. - support for Linear Technologies LTC3589, Texas Instruments TPS658640 and X-Powers AXP20x" * tag 'regulator-v3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (64 commits) regulator: pbias: remove unnecessary OOM messages regulator: max8649: remove unnecessary OOM messages regulator: core: Fix the init of DT defined fixed regulators regulator: core: Disable unused regulators after deferred probing is done regulator: Don't disable unused regulators we don't have permission for regulator: axp20x: Use regulator_map_voltage_ascend for LDO4 regulator: use of_property_read_{bool|u32}() regulator: Fix regulator_get_{optional,exclusive}() documentation regulators: Add definition of regulator_set_voltage_time() for !CONFIG_REGULATOR regulator: arizona-ldo1: add missing #include regulator: pfuze100: Support enable/disable for fixed regulator regulator: ltc3589: Remove ltc3589_list_voltage_fixed function regulator: ltc3589: Fix module dependency regulator: tps6586x: Remove unused to_tps6586x_dev() function regulator: tps65218: Convert to use regulator_set_voltage_time_sel regulator: tps6586x: Add support for the TPS658640 regulator: tps6586x: Prepare supporting fixed regulators regulator: pfuze100: Don't allocate an invalid gpio regulator: pfuze100: Support SWB enable/disable regulator: fixed: use of_property_read_{bool|u32}() ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/arizona/core.h3
-rw-r--r--include/linux/mfd/bcm590xx.h9
-rw-r--r--include/linux/mfd/core.h2
-rw-r--r--include/linux/mfd/samsung/s2mps14.h2
-rw-r--r--include/linux/mfd/tps65090.h19
-rw-r--r--include/linux/mfd/tps65217.h1
-rw-r--r--include/linux/mfd/tps6586x.h2
-rw-r--r--include/linux/regulator/consumer.h42
8 files changed, 59 insertions, 21 deletions
diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h
index 5cf8b91ce996..6d9371f88875 100644
--- a/include/linux/mfd/arizona/core.h
+++ b/include/linux/mfd/arizona/core.h
@@ -124,4 +124,7 @@ int wm5102_patch(struct arizona *arizona);
124int wm5110_patch(struct arizona *arizona); 124int wm5110_patch(struct arizona *arizona);
125int wm8997_patch(struct arizona *arizona); 125int wm8997_patch(struct arizona *arizona);
126 126
127extern int arizona_of_get_named_gpio(struct arizona *arizona, const char *prop,
128 bool mandatory);
129
127#endif 130#endif
diff --git a/include/linux/mfd/bcm590xx.h b/include/linux/mfd/bcm590xx.h
index 434df2d4e587..267aedee1c7a 100644
--- a/include/linux/mfd/bcm590xx.h
+++ b/include/linux/mfd/bcm590xx.h
@@ -19,12 +19,15 @@
19#include <linux/regmap.h> 19#include <linux/regmap.h>
20 20
21/* max register address */ 21/* max register address */
22#define BCM590XX_MAX_REGISTER 0xe7 22#define BCM590XX_MAX_REGISTER_PRI 0xe7
23#define BCM590XX_MAX_REGISTER_SEC 0xf0
23 24
24struct bcm590xx { 25struct bcm590xx {
25 struct device *dev; 26 struct device *dev;
26 struct i2c_client *i2c_client; 27 struct i2c_client *i2c_pri;
27 struct regmap *regmap; 28 struct i2c_client *i2c_sec;
29 struct regmap *regmap_pri;
30 struct regmap *regmap_sec;
28 unsigned int id; 31 unsigned int id;
29}; 32};
30 33
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index bdba8c61207b..f543de91ce19 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -63,7 +63,7 @@ struct mfd_cell {
63 /* A list of regulator supplies that should be mapped to the MFD 63 /* A list of regulator supplies that should be mapped to the MFD
64 * device rather than the child device when requested 64 * device rather than the child device when requested
65 */ 65 */
66 const char **parent_supplies; 66 const char * const *parent_supplies;
67 int num_parent_supplies; 67 int num_parent_supplies;
68}; 68};
69 69
diff --git a/include/linux/mfd/samsung/s2mps14.h b/include/linux/mfd/samsung/s2mps14.h
index 4b449b8ac548..900cd7a04314 100644
--- a/include/linux/mfd/samsung/s2mps14.h
+++ b/include/linux/mfd/samsung/s2mps14.h
@@ -148,6 +148,8 @@ enum s2mps14_regulators {
148#define S2MPS14_ENABLE_SHIFT 6 148#define S2MPS14_ENABLE_SHIFT 6
149/* On/Off controlled by PWREN */ 149/* On/Off controlled by PWREN */
150#define S2MPS14_ENABLE_SUSPEND (0x01 << S2MPS14_ENABLE_SHIFT) 150#define S2MPS14_ENABLE_SUSPEND (0x01 << S2MPS14_ENABLE_SHIFT)
151/* On/Off controlled by LDO10EN or EMMCEN */
152#define S2MPS14_ENABLE_EXT_CONTROL (0x00 << S2MPS14_ENABLE_SHIFT)
151#define S2MPS14_LDO_N_VOLTAGES (S2MPS14_LDO_VSEL_MASK + 1) 153#define S2MPS14_LDO_N_VOLTAGES (S2MPS14_LDO_VSEL_MASK + 1)
152#define S2MPS14_BUCK_N_VOLTAGES (S2MPS14_BUCK_VSEL_MASK + 1) 154#define S2MPS14_BUCK_N_VOLTAGES (S2MPS14_BUCK_VSEL_MASK + 1)
153 155
diff --git a/include/linux/mfd/tps65090.h b/include/linux/mfd/tps65090.h
index 3f43069413e7..0bf2708df150 100644
--- a/include/linux/mfd/tps65090.h
+++ b/include/linux/mfd/tps65090.h
@@ -64,6 +64,20 @@ enum {
64 TPS65090_REGULATOR_MAX, 64 TPS65090_REGULATOR_MAX,
65}; 65};
66 66
67/* Register addresses */
68#define TPS65090_REG_INTR_STS 0x00
69#define TPS65090_REG_INTR_STS2 0x01
70#define TPS65090_REG_INTR_MASK 0x02
71#define TPS65090_REG_INTR_MASK2 0x03
72#define TPS65090_REG_CG_CTRL0 0x04
73#define TPS65090_REG_CG_CTRL1 0x05
74#define TPS65090_REG_CG_CTRL2 0x06
75#define TPS65090_REG_CG_CTRL3 0x07
76#define TPS65090_REG_CG_CTRL4 0x08
77#define TPS65090_REG_CG_CTRL5 0x09
78#define TPS65090_REG_CG_STATUS1 0x0a
79#define TPS65090_REG_CG_STATUS2 0x0b
80
67struct tps65090 { 81struct tps65090 {
68 struct device *dev; 82 struct device *dev;
69 struct regmap *rmap; 83 struct regmap *rmap;
@@ -78,11 +92,16 @@ struct tps65090 {
78 * DCDC1, DCDC2 and DCDC3. 92 * DCDC1, DCDC2 and DCDC3.
79 * @gpio: Gpio number if external control is enabled and controlled through 93 * @gpio: Gpio number if external control is enabled and controlled through
80 * gpio. 94 * gpio.
95 * @overcurrent_wait_valid: True if the overcurrent_wait should be applied.
96 * @overcurrent_wait: Value to set as the overcurrent wait time. This is the
97 * actual bitfield value, not a time in ms (valid value are 0 - 3).
81 */ 98 */
82struct tps65090_regulator_plat_data { 99struct tps65090_regulator_plat_data {
83 struct regulator_init_data *reg_init_data; 100 struct regulator_init_data *reg_init_data;
84 bool enable_ext_control; 101 bool enable_ext_control;
85 int gpio; 102 int gpio;
103 bool overcurrent_wait_valid;
104 int overcurrent_wait;
86}; 105};
87 106
88struct tps65090_platform_data { 107struct tps65090_platform_data {
diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h
index 54b5458ec084..95d6938737fd 100644
--- a/include/linux/mfd/tps65217.h
+++ b/include/linux/mfd/tps65217.h
@@ -254,7 +254,6 @@ struct tps65217 {
254 struct tps65217_board *pdata; 254 struct tps65217_board *pdata;
255 unsigned long id; 255 unsigned long id;
256 struct regulator_desc desc[TPS65217_NUM_REGULATOR]; 256 struct regulator_desc desc[TPS65217_NUM_REGULATOR];
257 struct regulator_dev *rdev[TPS65217_NUM_REGULATOR];
258 struct regmap *regmap; 257 struct regmap *regmap;
259}; 258};
260 259
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h
index cbecec2e353a..96187ed9f9bb 100644
--- a/include/linux/mfd/tps6586x.h
+++ b/include/linux/mfd/tps6586x.h
@@ -17,6 +17,8 @@
17#define TPS658621A 0x15 17#define TPS658621A 0x15
18#define TPS658621CD 0x2c 18#define TPS658621CD 0x2c
19#define TPS658623 0x1b 19#define TPS658623 0x1b
20#define TPS658640 0x01
21#define TPS658640v2 0x02
20#define TPS658643 0x03 22#define TPS658643 0x03
21 23
22enum { 24enum {
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 1a4a8c157b31..a2d9d81038d1 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -151,11 +151,13 @@ int regulator_register_supply_alias(struct device *dev, const char *id,
151 const char *alias_id); 151 const char *alias_id);
152void regulator_unregister_supply_alias(struct device *dev, const char *id); 152void regulator_unregister_supply_alias(struct device *dev, const char *id);
153 153
154int regulator_bulk_register_supply_alias(struct device *dev, const char **id, 154int regulator_bulk_register_supply_alias(struct device *dev,
155 const char *const *id,
155 struct device *alias_dev, 156 struct device *alias_dev,
156 const char **alias_id, int num_id); 157 const char *const *alias_id,
158 int num_id);
157void regulator_bulk_unregister_supply_alias(struct device *dev, 159void regulator_bulk_unregister_supply_alias(struct device *dev,
158 const char **id, int num_id); 160 const char * const *id, int num_id);
159 161
160int devm_regulator_register_supply_alias(struct device *dev, const char *id, 162int devm_regulator_register_supply_alias(struct device *dev, const char *id,
161 struct device *alias_dev, 163 struct device *alias_dev,
@@ -164,12 +166,12 @@ void devm_regulator_unregister_supply_alias(struct device *dev,
164 const char *id); 166 const char *id);
165 167
166int devm_regulator_bulk_register_supply_alias(struct device *dev, 168int devm_regulator_bulk_register_supply_alias(struct device *dev,
167 const char **id, 169 const char *const *id,
168 struct device *alias_dev, 170 struct device *alias_dev,
169 const char **alias_id, 171 const char *const *alias_id,
170 int num_id); 172 int num_id);
171void devm_regulator_bulk_unregister_supply_alias(struct device *dev, 173void devm_regulator_bulk_unregister_supply_alias(struct device *dev,
172 const char **id, 174 const char *const *id,
173 int num_id); 175 int num_id);
174 176
175/* regulator output control and status */ 177/* regulator output control and status */
@@ -290,17 +292,17 @@ static inline void regulator_unregister_supply_alias(struct device *dev,
290} 292}
291 293
292static inline int regulator_bulk_register_supply_alias(struct device *dev, 294static inline int regulator_bulk_register_supply_alias(struct device *dev,
293 const char **id, 295 const char *const *id,
294 struct device *alias_dev, 296 struct device *alias_dev,
295 const char **alias_id, 297 const char * const *alias_id,
296 int num_id) 298 int num_id)
297{ 299{
298 return 0; 300 return 0;
299} 301}
300 302
301static inline void regulator_bulk_unregister_supply_alias(struct device *dev, 303static inline void regulator_bulk_unregister_supply_alias(struct device *dev,
302 const char **id, 304 const char * const *id,
303 int num_id) 305 int num_id)
304{ 306{
305} 307}
306 308
@@ -317,15 +319,17 @@ static inline void devm_regulator_unregister_supply_alias(struct device *dev,
317{ 319{
318} 320}
319 321
320static inline int devm_regulator_bulk_register_supply_alias( 322static inline int devm_regulator_bulk_register_supply_alias(struct device *dev,
321 struct device *dev, const char **id, struct device *alias_dev, 323 const char *const *id,
322 const char **alias_id, int num_id) 324 struct device *alias_dev,
325 const char *const *alias_id,
326 int num_id)
323{ 327{
324 return 0; 328 return 0;
325} 329}
326 330
327static inline void devm_regulator_bulk_unregister_supply_alias( 331static inline void devm_regulator_bulk_unregister_supply_alias(
328 struct device *dev, const char **id, int num_id) 332 struct device *dev, const char *const *id, int num_id)
329{ 333{
330} 334}
331 335
@@ -397,6 +401,12 @@ static inline int regulator_set_voltage(struct regulator *regulator,
397 return 0; 401 return 0;
398} 402}
399 403
404static inline int regulator_set_voltage_time(struct regulator *regulator,
405 int old_uV, int new_uV)
406{
407 return 0;
408}
409
400static inline int regulator_get_voltage(struct regulator *regulator) 410static inline int regulator_get_voltage(struct regulator *regulator)
401{ 411{
402 return -EINVAL; 412 return -EINVAL;