diff options
author | Corentin Labbe <clabbe@baylibre.com> | 2022-11-15 07:36:01 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-11-18 15:13:34 +0000 |
commit | 27b9ecc7a9ba1d0014779bfe5a6dbf630899c6e7 (patch) | |
tree | 50f145a8cd2f00d416b280a20c51aa0e4e913a91 /include/linux/regulator | |
parent | 9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff) | |
download | linux-27b9ecc7a9ba1d0014779bfe5a6dbf630899c6e7.tar.gz linux-27b9ecc7a9ba1d0014779bfe5a6dbf630899c6e7.tar.bz2 linux-27b9ecc7a9ba1d0014779bfe5a6dbf630899c6e7.zip |
regulator: Add of_regulator_bulk_get_all
It work exactly like regulator_bulk_get() but instead of working on a
provided list of names, it seek all consumers properties matching
xxx-supply.
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Link: https://lore.kernel.org/r/20221115073603.3425396-2-clabbe@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r-- | include/linux/regulator/consumer.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index ee3b4a014611..276488dad61d 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -244,6 +244,8 @@ int regulator_disable_deferred(struct regulator *regulator, int ms); int __must_check regulator_bulk_get(struct device *dev, int num_consumers, struct regulator_bulk_data *consumers); +int __must_check of_regulator_bulk_get_all(struct device *dev, struct device_node *np, + struct regulator_bulk_data **consumers); int __must_check devm_regulator_bulk_get(struct device *dev, int num_consumers, struct regulator_bulk_data *consumers); void devm_regulator_bulk_put(struct regulator_bulk_data *consumers); @@ -479,6 +481,12 @@ static inline int devm_regulator_bulk_get(struct device *dev, int num_consumers, return 0; } +static inline int of_regulator_bulk_get_all(struct device *dev, struct device_node *np, + struct regulator_bulk_data **consumers) +{ + return 0; +} + static inline int regulator_bulk_enable(int num_consumers, struct regulator_bulk_data *consumers) { |