diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-02-08 20:18:26 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-02-10 10:14:29 +0100 |
commit | b17bb9e7c1a3a2f40e53a52120b7f39042e351f7 (patch) | |
tree | c8adac5f6f234579df906dbe5d407e4577da92b9 /include/regulator.h | |
parent | 26a4c789170d197c30c3feaa4761d4696662349b (diff) | |
download | barebox-b17bb9e7c1a3a2f40e53a52120b7f39042e351f7.tar.gz |
regulator: add driver for stm32-vrefbuf
This driver supports STMicroelectronics STM32 VREFBUF (voltage
reference buffer) which can be used as voltage reference for
internal ADCs, DACs and also for external components through
dedicated Vref+ pin. Ported from Linux v5.11-rc1.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/regulator.h')
-rw-r--r-- | include/regulator.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/regulator.h b/include/regulator.h index 83a8813265..bbe8dd91d8 100644 --- a/include/regulator.h +++ b/include/regulator.h @@ -51,6 +51,7 @@ struct regulator_bulk_data { * @disable_val: Disabling value for control when using regmap enable/disable ops * @enable_is_inverted: A flag to indicate set enable_mask bits to disable * when using regulator_enable_regmap and friends APIs. + * @volt_table: Voltage mapping table (if table based mapping) * @fixed_uV: Fixed voltage of rails. * @off_on_delay: guard time (in uS), before re-enabling a regulator */ @@ -75,6 +76,7 @@ struct regulator_desc { const struct regulator_linear_range *linear_ranges; int n_linear_ranges; + const unsigned int *volt_table; int fixed_uV; unsigned int off_on_delay; }; @@ -190,6 +192,9 @@ int regulator_get_voltage(struct regulator *regulator); */ int regulator_desc_list_voltage_linear_range(const struct regulator_desc *desc, unsigned int selector); + +int regulator_list_voltage_table(struct regulator_dev *rdev, + unsigned int selector); #else static inline struct regulator *regulator_get(struct device_d *dev, const char *id) |