From 6a47b4da551a762217215aeeda22e46469c5868a Mon Sep 17 00:00:00 2001 From: Matti Vaittinen Date: Thu, 14 Feb 2019 11:38:05 +0200 Subject: 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 Acked-by: Mark Brown Tested-by: Angus Ainslie Reviewed-by: Angus Ainslie Signed-off-by: Mark Brown --- include/linux/regulator/driver.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') 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 -- cgit v1.2.3