diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2019-07-03 19:10:34 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-07-04 19:07:25 +0300 |
commit | 2da8d9473e20a2f6645dcb0cea4848a2c1e83af9 (patch) | |
tree | d76abfc73cbc76a688f6e7f6e07a4c5f1e88abbf /include/linux | |
parent | ba2bf340ade89e71c53273ea115c7872865782c1 (diff) | |
download | linux-2da8d9473e20a2f6645dcb0cea4848a2c1e83af9.tar.xz |
regulator: implement selector stepping
Some regulators require that the requested voltage be reached gradually
by setting all or some of the intermediate values. Implement a new field
in the regulator description struct that allows users to specify the
number of selectors by which the regulator API should step when ramping
the voltage up/down.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Link: https://lore.kernel.org/r/20190703161035.31808-2-brgl@bgdev.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/regulator/driver.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 377da2357118..f0d7b0496e54 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -286,6 +286,11 @@ enum regulator_type { * @vsel_range_mask: Mask for register bitfield used for range selector * @vsel_reg: Register for selector when using regulator_regmap_X_voltage_ * @vsel_mask: Mask for register bitfield used for selector + * @vsel_step: Specify the resolution of selector stepping when setting + * voltage. If 0, then no stepping is done (requested selector is + * set directly), if >0 then the regulator API will ramp the + * voltage up/down gradually each time increasing/decreasing the + * selector by the specified step value. * @csel_reg: Register for current limit selector using regmap set_current_limit * @csel_mask: Mask for register bitfield used for current limit selector * @apply_reg: Register for initiate voltage change on the output when @@ -360,6 +365,7 @@ struct regulator_desc { unsigned int vsel_range_mask; unsigned int vsel_reg; unsigned int vsel_mask; + unsigned int vsel_step; unsigned int csel_reg; unsigned int csel_mask; unsigned int apply_reg; |