diff options
author | Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> | 2019-02-14 11:38:05 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-02-14 15:12:26 +0000 |
commit | 6a47b4da551a762217215aeeda22e46469c5868a (patch) | |
tree | 50d305a1807646538778dca11a8797a6530edce2 /include/linux/regulator | |
parent | f43d1b388f9be4aa47ed42c33659243a675c5c76 (diff) | |
download | linux-6a47b4da551a762217215aeeda22e46469c5868a.tar.gz linux-6a47b4da551a762217215aeeda22e46469c5868a.tar.bz2 linux-6a47b4da551a762217215aeeda22e46469c5868a.zip |
regulator: add regulator_desc_list_voltage_linear_range
Add regulator_desc_list_voltage_linear_range which can be used
by drivers for getting the voltages before regulator is registered.
This may be useful for drivers which need to fetch the voltage
selectors at device-tree parsing callback.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Acked-by: Mark Brown <broonie@kernel.org>
Tested-by: Angus Ainslie <angus@akkea.ca>
Reviewed-by: Angus Ainslie <angus@akkea.ca>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator')
-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 7f8345bff4e1..05efe2b057c1 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -539,4 +539,10 @@ void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data); void regulator_lock(struct regulator_dev *rdev); void regulator_unlock(struct regulator_dev *rdev); +/* + * Helper functions intended to be used by regulator drivers prior registering + * their regulators. + */ +int regulator_desc_list_voltage_linear_range(const struct regulator_desc *desc, + unsigned int selector); #endif |