diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/max77693.h | 12 | ||||
| -rw-r--r-- | include/linux/mfd/palmas.h | 1 | ||||
| -rw-r--r-- | include/linux/mfd/stw481x.h | 4 | ||||
| -rw-r--r-- | include/linux/regulator/act8865.h | 14 | ||||
| -rw-r--r-- | include/linux/regulator/consumer.h | 23 | ||||
| -rw-r--r-- | include/linux/regulator/driver.h | 4 |
6 files changed, 39 insertions, 19 deletions
diff --git a/include/linux/mfd/max77693.h b/include/linux/mfd/max77693.h index f0b6585cd874..09a4dedaeea8 100644 --- a/include/linux/mfd/max77693.h +++ b/include/linux/mfd/max77693.h | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | #ifndef __LINUX_MFD_MAX77693_H | 30 | #ifndef __LINUX_MFD_MAX77693_H |
| 31 | #define __LINUX_MFD_MAX77693_H | 31 | #define __LINUX_MFD_MAX77693_H |
| 32 | 32 | ||
| 33 | /* MAX77686 regulator IDs */ | 33 | /* MAX77693 regulator IDs */ |
| 34 | enum max77693_regulators { | 34 | enum max77693_regulators { |
| 35 | MAX77693_ESAFEOUT1 = 0, | 35 | MAX77693_ESAFEOUT1 = 0, |
| 36 | MAX77693_ESAFEOUT2, | 36 | MAX77693_ESAFEOUT2, |
| @@ -38,12 +38,6 @@ enum max77693_regulators { | |||
| 38 | MAX77693_REG_MAX, | 38 | MAX77693_REG_MAX, |
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | struct max77693_regulator_data { | ||
| 42 | int id; | ||
| 43 | struct regulator_init_data *initdata; | ||
| 44 | struct device_node *of_node; | ||
| 45 | }; | ||
| 46 | |||
| 47 | struct max77693_reg_data { | 41 | struct max77693_reg_data { |
| 48 | u8 addr; | 42 | u8 addr; |
| 49 | u8 data; | 43 | u8 data; |
| @@ -103,10 +97,6 @@ struct max77693_led_platform_data { | |||
| 103 | /* MAX77693 */ | 97 | /* MAX77693 */ |
| 104 | 98 | ||
| 105 | struct max77693_platform_data { | 99 | struct max77693_platform_data { |
| 106 | /* regulator data */ | ||
| 107 | struct max77693_regulator_data *regulators; | ||
| 108 | int num_regulators; | ||
| 109 | |||
| 110 | /* muic data */ | 100 | /* muic data */ |
| 111 | struct max77693_muic_platform_data *muic_data; | 101 | struct max77693_muic_platform_data *muic_data; |
| 112 | struct max77693_led_platform_data *led_data; | 102 | struct max77693_led_platform_data *led_data; |
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h index ee7b1ce7a6f8..bb270bd03eed 100644 --- a/include/linux/mfd/palmas.h +++ b/include/linux/mfd/palmas.h | |||
| @@ -117,6 +117,7 @@ struct palmas_pmic_driver_data { | |||
| 117 | int ldo_begin; | 117 | int ldo_begin; |
| 118 | int ldo_end; | 118 | int ldo_end; |
| 119 | int max_reg; | 119 | int max_reg; |
| 120 | bool has_regen3; | ||
| 120 | struct palmas_regs_info *palmas_regs_info; | 121 | struct palmas_regs_info *palmas_regs_info; |
| 121 | struct of_regulator_match *palmas_matches; | 122 | struct of_regulator_match *palmas_matches; |
| 122 | struct palmas_sleep_requestor_info *sleep_req_info; | 123 | struct palmas_sleep_requestor_info *sleep_req_info; |
diff --git a/include/linux/mfd/stw481x.h b/include/linux/mfd/stw481x.h index eda121556e5d..833074b766bd 100644 --- a/include/linux/mfd/stw481x.h +++ b/include/linux/mfd/stw481x.h | |||
| @@ -41,15 +41,11 @@ | |||
| 41 | 41 | ||
| 42 | /** | 42 | /** |
| 43 | * struct stw481x - state holder for the Stw481x drivers | 43 | * struct stw481x - state holder for the Stw481x drivers |
| 44 | * @mutex: mutex to serialize I2C accesses | ||
| 45 | * @i2c_client: corresponding I2C client | 44 | * @i2c_client: corresponding I2C client |
| 46 | * @regulator: regulator device for regulator children | ||
| 47 | * @map: regmap handle to access device registers | 45 | * @map: regmap handle to access device registers |
| 48 | */ | 46 | */ |
| 49 | struct stw481x { | 47 | struct stw481x { |
| 50 | struct mutex lock; | ||
| 51 | struct i2c_client *client; | 48 | struct i2c_client *client; |
| 52 | struct regulator_dev *vmmc_regulator; | ||
| 53 | struct regmap *map; | 49 | struct regmap *map; |
| 54 | }; | 50 | }; |
| 55 | 51 | ||
diff --git a/include/linux/regulator/act8865.h b/include/linux/regulator/act8865.h index b6c4909b33af..15fa8f2d35c9 100644 --- a/include/linux/regulator/act8865.h +++ b/include/linux/regulator/act8865.h | |||
| @@ -19,6 +19,19 @@ | |||
| 19 | #include <linux/regulator/machine.h> | 19 | #include <linux/regulator/machine.h> |
| 20 | 20 | ||
| 21 | enum { | 21 | enum { |
| 22 | ACT8600_ID_DCDC1, | ||
| 23 | ACT8600_ID_DCDC2, | ||
| 24 | ACT8600_ID_DCDC3, | ||
| 25 | ACT8600_ID_SUDCDC4, | ||
| 26 | ACT8600_ID_LDO5, | ||
| 27 | ACT8600_ID_LDO6, | ||
| 28 | ACT8600_ID_LDO7, | ||
| 29 | ACT8600_ID_LDO8, | ||
| 30 | ACT8600_ID_LDO9, | ||
| 31 | ACT8600_ID_LDO10, | ||
| 32 | }; | ||
| 33 | |||
| 34 | enum { | ||
| 22 | ACT8865_ID_DCDC1, | 35 | ACT8865_ID_DCDC1, |
| 23 | ACT8865_ID_DCDC2, | 36 | ACT8865_ID_DCDC2, |
| 24 | ACT8865_ID_DCDC3, | 37 | ACT8865_ID_DCDC3, |
| @@ -46,6 +59,7 @@ enum { | |||
| 46 | }; | 59 | }; |
| 47 | 60 | ||
| 48 | enum { | 61 | enum { |
| 62 | ACT8600, | ||
| 49 | ACT8865, | 63 | ACT8865, |
| 50 | ACT8846, | 64 | ACT8846, |
| 51 | }; | 65 | }; |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index d17e1ff7ad01..f8a689ed62a5 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
| @@ -114,7 +114,7 @@ struct regmap; | |||
| 114 | #define REGULATOR_EVENT_OVER_TEMP 0x10 | 114 | #define REGULATOR_EVENT_OVER_TEMP 0x10 |
| 115 | #define REGULATOR_EVENT_FORCE_DISABLE 0x20 | 115 | #define REGULATOR_EVENT_FORCE_DISABLE 0x20 |
| 116 | #define REGULATOR_EVENT_VOLTAGE_CHANGE 0x40 | 116 | #define REGULATOR_EVENT_VOLTAGE_CHANGE 0x40 |
| 117 | #define REGULATOR_EVENT_DISABLE 0x80 | 117 | #define REGULATOR_EVENT_DISABLE 0x80 |
| 118 | #define REGULATOR_EVENT_PRE_VOLTAGE_CHANGE 0x100 | 118 | #define REGULATOR_EVENT_PRE_VOLTAGE_CHANGE 0x100 |
| 119 | #define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE 0x200 | 119 | #define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE 0x200 |
| 120 | #define REGULATOR_EVENT_PRE_DISABLE 0x400 | 120 | #define REGULATOR_EVENT_PRE_DISABLE 0x400 |
| @@ -238,7 +238,7 @@ int regulator_get_current_limit(struct regulator *regulator); | |||
| 238 | 238 | ||
| 239 | int regulator_set_mode(struct regulator *regulator, unsigned int mode); | 239 | int regulator_set_mode(struct regulator *regulator, unsigned int mode); |
| 240 | unsigned int regulator_get_mode(struct regulator *regulator); | 240 | unsigned int regulator_get_mode(struct regulator *regulator); |
| 241 | int regulator_set_optimum_mode(struct regulator *regulator, int load_uA); | 241 | int regulator_set_load(struct regulator *regulator, int load_uA); |
| 242 | 242 | ||
| 243 | int regulator_allow_bypass(struct regulator *regulator, bool allow); | 243 | int regulator_allow_bypass(struct regulator *regulator, bool allow); |
| 244 | 244 | ||
| @@ -252,8 +252,12 @@ int regulator_list_hardware_vsel(struct regulator *regulator, | |||
| 252 | /* regulator notifier block */ | 252 | /* regulator notifier block */ |
| 253 | int regulator_register_notifier(struct regulator *regulator, | 253 | int regulator_register_notifier(struct regulator *regulator, |
| 254 | struct notifier_block *nb); | 254 | struct notifier_block *nb); |
| 255 | int devm_regulator_register_notifier(struct regulator *regulator, | ||
| 256 | struct notifier_block *nb); | ||
| 255 | int regulator_unregister_notifier(struct regulator *regulator, | 257 | int regulator_unregister_notifier(struct regulator *regulator, |
| 256 | struct notifier_block *nb); | 258 | struct notifier_block *nb); |
| 259 | void devm_regulator_unregister_notifier(struct regulator *regulator, | ||
| 260 | struct notifier_block *nb); | ||
| 257 | 261 | ||
| 258 | /* driver data - core doesn't touch */ | 262 | /* driver data - core doesn't touch */ |
| 259 | void *regulator_get_drvdata(struct regulator *regulator); | 263 | void *regulator_get_drvdata(struct regulator *regulator); |
| @@ -479,8 +483,7 @@ static inline unsigned int regulator_get_mode(struct regulator *regulator) | |||
| 479 | return REGULATOR_MODE_NORMAL; | 483 | return REGULATOR_MODE_NORMAL; |
| 480 | } | 484 | } |
| 481 | 485 | ||
| 482 | static inline int regulator_set_optimum_mode(struct regulator *regulator, | 486 | static inline int regulator_set_load(struct regulator *regulator, int load_uA) |
| 483 | int load_uA) | ||
| 484 | { | 487 | { |
| 485 | return REGULATOR_MODE_NORMAL; | 488 | return REGULATOR_MODE_NORMAL; |
| 486 | } | 489 | } |
| @@ -515,12 +518,24 @@ static inline int regulator_register_notifier(struct regulator *regulator, | |||
| 515 | return 0; | 518 | return 0; |
| 516 | } | 519 | } |
| 517 | 520 | ||
| 521 | static inline int devm_regulator_register_notifier(struct regulator *regulator, | ||
| 522 | struct notifier_block *nb) | ||
| 523 | { | ||
| 524 | return 0; | ||
| 525 | } | ||
| 526 | |||
| 518 | static inline int regulator_unregister_notifier(struct regulator *regulator, | 527 | static inline int regulator_unregister_notifier(struct regulator *regulator, |
| 519 | struct notifier_block *nb) | 528 | struct notifier_block *nb) |
| 520 | { | 529 | { |
| 521 | return 0; | 530 | return 0; |
| 522 | } | 531 | } |
| 523 | 532 | ||
| 533 | static inline int devm_regulator_unregister_notifier(struct regulator *regulator, | ||
| 534 | struct notifier_block *nb) | ||
| 535 | { | ||
| 536 | return 0; | ||
| 537 | } | ||
| 538 | |||
| 524 | static inline void *regulator_get_drvdata(struct regulator *regulator) | 539 | static inline void *regulator_get_drvdata(struct regulator *regulator) |
| 525 | { | 540 | { |
| 526 | return NULL; | 541 | return NULL; |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 045f709cb89b..fffa688ac3a7 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -98,6 +98,7 @@ struct regulator_linear_range { | |||
| 98 | * REGULATOR_STATUS value (or negative errno) | 98 | * REGULATOR_STATUS value (or negative errno) |
| 99 | * @get_optimum_mode: Get the most efficient operating mode for the regulator | 99 | * @get_optimum_mode: Get the most efficient operating mode for the regulator |
| 100 | * when running with the specified parameters. | 100 | * when running with the specified parameters. |
| 101 | * @set_load: Set the load for the regulator. | ||
| 101 | * | 102 | * |
| 102 | * @set_bypass: Set the regulator in bypass mode. | 103 | * @set_bypass: Set the regulator in bypass mode. |
| 103 | * @get_bypass: Get the regulator bypass mode state. | 104 | * @get_bypass: Get the regulator bypass mode state. |
| @@ -167,6 +168,8 @@ struct regulator_ops { | |||
| 167 | /* get most efficient regulator operating mode for load */ | 168 | /* get most efficient regulator operating mode for load */ |
| 168 | unsigned int (*get_optimum_mode) (struct regulator_dev *, int input_uV, | 169 | unsigned int (*get_optimum_mode) (struct regulator_dev *, int input_uV, |
| 169 | int output_uV, int load_uA); | 170 | int output_uV, int load_uA); |
| 171 | /* set the load on the regulator */ | ||
| 172 | int (*set_load)(struct regulator_dev *, int load_uA); | ||
| 170 | 173 | ||
| 171 | /* control and report on bypass mode */ | 174 | /* control and report on bypass mode */ |
| 172 | int (*set_bypass)(struct regulator_dev *dev, bool enable); | 175 | int (*set_bypass)(struct regulator_dev *dev, bool enable); |
| @@ -367,6 +370,7 @@ struct regulator_dev { | |||
| 367 | struct device dev; | 370 | struct device dev; |
| 368 | struct regulation_constraints *constraints; | 371 | struct regulation_constraints *constraints; |
| 369 | struct regulator *supply; /* for tree */ | 372 | struct regulator *supply; /* for tree */ |
| 373 | const char *supply_name; | ||
| 370 | struct regmap *regmap; | 374 | struct regmap *regmap; |
| 371 | 375 | ||
| 372 | struct delayed_work disable_work; | 376 | struct delayed_work disable_work; |
