diff options
Diffstat (limited to 'include/linux/regulator')
| -rw-r--r-- | include/linux/regulator/ab8500.h | 24 | ||||
| -rw-r--r-- | include/linux/regulator/consumer.h | 1 | ||||
| -rw-r--r-- | include/linux/regulator/driver.h | 19 |
3 files changed, 29 insertions, 15 deletions
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index f509877c2ed4..6a210f1511fc 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h | |||
| @@ -11,15 +11,17 @@ | |||
| 11 | #define __LINUX_MFD_AB8500_REGULATOR_H | 11 | #define __LINUX_MFD_AB8500_REGULATOR_H |
| 12 | 12 | ||
| 13 | /* AB8500 regulators */ | 13 | /* AB8500 regulators */ |
| 14 | #define AB8500_LDO_AUX1 0 | 14 | enum ab8500_regulator_id { |
| 15 | #define AB8500_LDO_AUX2 1 | 15 | AB8500_LDO_AUX1, |
| 16 | #define AB8500_LDO_AUX3 2 | 16 | AB8500_LDO_AUX2, |
| 17 | #define AB8500_LDO_INTCORE 3 | 17 | AB8500_LDO_AUX3, |
| 18 | #define AB8500_LDO_TVOUT 4 | 18 | AB8500_LDO_INTCORE, |
| 19 | #define AB8500_LDO_AUDIO 5 | 19 | AB8500_LDO_TVOUT, |
| 20 | #define AB8500_LDO_ANAMIC1 6 | 20 | AB8500_LDO_AUDIO, |
| 21 | #define AB8500_LDO_ANAMIC2 7 | 21 | AB8500_LDO_ANAMIC1, |
| 22 | #define AB8500_LDO_DMIC 8 | 22 | AB8500_LDO_ANAMIC2, |
| 23 | #define AB8500_LDO_ANA 9 | 23 | AB8500_LDO_DMIC, |
| 24 | 24 | AB8500_LDO_ANA, | |
| 25 | AB8500_NUM_REGULATORS, | ||
| 26 | }; | ||
| 25 | #endif | 27 | #endif |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index ebd747265294..7954f6bd7edb 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
| @@ -154,6 +154,7 @@ int regulator_is_supported_voltage(struct regulator *regulator, | |||
| 154 | int min_uV, int max_uV); | 154 | int min_uV, int max_uV); |
| 155 | int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); | 155 | int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); |
| 156 | int regulator_get_voltage(struct regulator *regulator); | 156 | int regulator_get_voltage(struct regulator *regulator); |
| 157 | int regulator_sync_voltage(struct regulator *regulator); | ||
| 157 | int regulator_set_current_limit(struct regulator *regulator, | 158 | int regulator_set_current_limit(struct regulator *regulator, |
| 158 | int min_uA, int max_uA); | 159 | int min_uA, int max_uA); |
| 159 | int regulator_get_current_limit(struct regulator *regulator); | 160 | int regulator_get_current_limit(struct regulator *regulator); |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 592cd7c642c2..b8ed16a33c47 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -42,7 +42,11 @@ enum regulator_status { | |||
| 42 | * | 42 | * |
| 43 | * @set_voltage: Set the voltage for the regulator within the range specified. | 43 | * @set_voltage: Set the voltage for the regulator within the range specified. |
| 44 | * The driver should select the voltage closest to min_uV. | 44 | * The driver should select the voltage closest to min_uV. |
| 45 | * @set_voltage_sel: Set the voltage for the regulator using the specified | ||
| 46 | * selector. | ||
| 45 | * @get_voltage: Return the currently configured voltage for the regulator. | 47 | * @get_voltage: Return the currently configured voltage for the regulator. |
| 48 | * @get_voltage_sel: Return the currently configured voltage selector for the | ||
| 49 | * regulator. | ||
| 46 | * @list_voltage: Return one of the supported voltages, in microvolts; zero | 50 | * @list_voltage: Return one of the supported voltages, in microvolts; zero |
| 47 | * if the selector indicates a voltage that is unusable on this system; | 51 | * if the selector indicates a voltage that is unusable on this system; |
| 48 | * or negative errno. Selectors range from zero to one less than | 52 | * or negative errno. Selectors range from zero to one less than |
| @@ -79,8 +83,11 @@ struct regulator_ops { | |||
| 79 | int (*list_voltage) (struct regulator_dev *, unsigned selector); | 83 | int (*list_voltage) (struct regulator_dev *, unsigned selector); |
| 80 | 84 | ||
| 81 | /* get/set regulator voltage */ | 85 | /* get/set regulator voltage */ |
| 82 | int (*set_voltage) (struct regulator_dev *, int min_uV, int max_uV); | 86 | int (*set_voltage) (struct regulator_dev *, int min_uV, int max_uV, |
| 87 | unsigned *selector); | ||
| 88 | int (*set_voltage_sel) (struct regulator_dev *, unsigned selector); | ||
| 83 | int (*get_voltage) (struct regulator_dev *); | 89 | int (*get_voltage) (struct regulator_dev *); |
| 90 | int (*get_voltage_sel) (struct regulator_dev *); | ||
| 84 | 91 | ||
| 85 | /* get/set regulator current */ | 92 | /* get/set regulator current */ |
| 86 | int (*set_current_limit) (struct regulator_dev *, | 93 | int (*set_current_limit) (struct regulator_dev *, |
| @@ -168,9 +175,9 @@ struct regulator_desc { | |||
| 168 | */ | 175 | */ |
| 169 | struct regulator_dev { | 176 | struct regulator_dev { |
| 170 | struct regulator_desc *desc; | 177 | struct regulator_desc *desc; |
| 171 | int use_count; | ||
| 172 | int open_count; | ||
| 173 | int exclusive; | 178 | int exclusive; |
| 179 | u32 use_count; | ||
| 180 | u32 open_count; | ||
| 174 | 181 | ||
| 175 | /* lists we belong to */ | 182 | /* lists we belong to */ |
| 176 | struct list_head list; /* list of all regulators */ | 183 | struct list_head list; /* list of all regulators */ |
| @@ -188,10 +195,14 @@ struct regulator_dev { | |||
| 188 | struct regulator_dev *supply; /* for tree */ | 195 | struct regulator_dev *supply; /* for tree */ |
| 189 | 196 | ||
| 190 | void *reg_data; /* regulator_dev data */ | 197 | void *reg_data; /* regulator_dev data */ |
| 198 | |||
| 199 | #ifdef CONFIG_DEBUG_FS | ||
| 200 | struct dentry *debugfs; | ||
| 201 | #endif | ||
| 191 | }; | 202 | }; |
| 192 | 203 | ||
| 193 | struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, | 204 | struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, |
| 194 | struct device *dev, struct regulator_init_data *init_data, | 205 | struct device *dev, const struct regulator_init_data *init_data, |
| 195 | void *driver_data); | 206 | void *driver_data); |
| 196 | void regulator_unregister(struct regulator_dev *rdev); | 207 | void regulator_unregister(struct regulator_dev *rdev); |
| 197 | 208 | ||
