diff options
author | Yadwinder Singh Brar <yadi.brar01@gmail.com> | 2012-06-09 07:10:38 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-11 00:01:46 -0400 |
commit | 98a175b60f46a80dfa44fb0e0807f2e5a351f35f (patch) | |
tree | 07c81163935868d9b1334a1bb33f8edddc6a29ca /include/linux/regulator/driver.h | |
parent | ab0d1cbe55014ac65cfc317f8ef2cd5fa4b7d4da (diff) |
regulator: core: Add regulator_set_voltage_time_sel to calculate ramp delay.
This patch adds regulator_set_voltage_time_sel(), to move into core, the
commonly used code by drivers to provide the .set_voltage_time_sel callback.
It will also allow us to configure different ramp delay for different
regulators easily.
Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/regulator/driver.h')
-rw-r--r-- | include/linux/regulator/driver.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 80226383e561..ae5c25379237 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -170,6 +170,7 @@ enum regulator_type { | |||
170 | * | 170 | * |
171 | * @min_uV: Voltage given by the lowest selector (if linear mapping) | 171 | * @min_uV: Voltage given by the lowest selector (if linear mapping) |
172 | * @uV_step: Voltage increase with each selector (if linear mapping) | 172 | * @uV_step: Voltage increase with each selector (if linear mapping) |
173 | * @ramp_delay: Time to settle down after voltage change (unit: mV/us) | ||
173 | * @volt_table: Voltage mapping table (if table based mapping) | 174 | * @volt_table: Voltage mapping table (if table based mapping) |
174 | * | 175 | * |
175 | * @vsel_reg: Register for selector when using regulator_regmap_X_voltage_ | 176 | * @vsel_reg: Register for selector when using regulator_regmap_X_voltage_ |
@@ -189,6 +190,7 @@ struct regulator_desc { | |||
189 | 190 | ||
190 | unsigned int min_uV; | 191 | unsigned int min_uV; |
191 | unsigned int uV_step; | 192 | unsigned int uV_step; |
193 | unsigned int ramp_delay; | ||
192 | 194 | ||
193 | const unsigned int *volt_table; | 195 | const unsigned int *volt_table; |
194 | 196 | ||
@@ -285,6 +287,9 @@ int regulator_set_voltage_sel_regmap(struct regulator_dev *rdev, unsigned sel); | |||
285 | int regulator_is_enabled_regmap(struct regulator_dev *rdev); | 287 | int regulator_is_enabled_regmap(struct regulator_dev *rdev); |
286 | int regulator_enable_regmap(struct regulator_dev *rdev); | 288 | int regulator_enable_regmap(struct regulator_dev *rdev); |
287 | int regulator_disable_regmap(struct regulator_dev *rdev); | 289 | int regulator_disable_regmap(struct regulator_dev *rdev); |
290 | int regulator_set_voltage_time_sel(struct regulator_dev *rdev, | ||
291 | unsigned int old_selector, | ||
292 | unsigned int new_selector); | ||
288 | 293 | ||
289 | void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data); | 294 | void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data); |
290 | 295 | ||