Commit 8d05560d authored by Linus Walleij's avatar Linus Walleij Committed by Mark Brown

regulator: da9055: Pass descriptor instead of GPIO number

When setting up a fixed regulator on the DA9055, pass a descriptor
instead of a global GPIO number. This facility is not used in the
kernel so we can easily just say that this should be a descriptor
if/when put to use.
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e45e290a
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/regulator/driver.h> #include <linux/regulator/driver.h>
#include <linux/regulator/machine.h> #include <linux/regulator/machine.h>
...@@ -455,8 +456,7 @@ static int da9055_gpio_init(struct da9055_regulator *regulator, ...@@ -455,8 +456,7 @@ static int da9055_gpio_init(struct da9055_regulator *regulator,
char name[18]; char name[18];
int gpio_mux = pdata->gpio_ren[id]; int gpio_mux = pdata->gpio_ren[id];
config->ena_gpio = pdata->ena_gpio[id]; config->ena_gpiod = pdata->ena_gpiods[id];
config->ena_gpio_flags = GPIOF_OUT_INIT_HIGH;
config->ena_gpio_invert = 1; config->ena_gpio_invert = 1;
/* /*
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#define DA9055_MAX_REGULATORS 8 #define DA9055_MAX_REGULATORS 8
struct da9055; struct da9055;
struct gpio_desc;
enum gpio_select { enum gpio_select {
NO_GPIO = 0, NO_GPIO = 0,
...@@ -47,7 +48,7 @@ struct da9055_pdata { ...@@ -47,7 +48,7 @@ struct da9055_pdata {
* controls the regulator set A/B, 0 if not available. * controls the regulator set A/B, 0 if not available.
*/ */
enum gpio_select *reg_rsel; enum gpio_select *reg_rsel;
/* GPIOs to enable regulator, 0 if not available */ /* GPIO descriptors to enable regulator, NULL if not available */
int *ena_gpio; struct gpio_desc **ena_gpiods;
}; };
#endif /* __DA9055_PDATA_H */ #endif /* __DA9055_PDATA_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment