regulator: da9211: Pass descriptors instead of GPIO numbers

This augments the DA9211 regulator driver to fetch its GPIO descriptors
directly from the device tree using the newly exported
devm_get_gpiod_from_child().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Linus Walleij
2018-02-12 14:17:02 +01:00
committed by Mark Brown
parent 8d05560d1d
commit 11da04af0d
2 changed files with 14 additions and 13 deletions

View File

@@ -21,6 +21,8 @@
#define DA9211_MAX_REGULATORS 2
struct gpio_desc;
enum da9211_chip_id {
DA9211,
DA9212,
@@ -39,7 +41,7 @@ struct da9211_pdata {
* 2 : 2 phase 2 buck
*/
int num_buck;
int gpio_ren[DA9211_MAX_REGULATORS];
struct gpio_desc *gpiod_ren[DA9211_MAX_REGULATORS];
struct device_node *reg_node[DA9211_MAX_REGULATORS];
struct regulator_init_data *init_data[DA9211_MAX_REGULATORS];
};