diff options
author | Maíra Canal <maira.canal@usp.br> | 2021-10-15 12:14:35 -0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-10-16 18:23:55 +0100 |
commit | 72bf80cf09c4693780ad93a31b48fa5a4e17a946 (patch) | |
tree | 9451f41f1c9de084e295cc59960d2f32435ef152 /include/linux/regulator | |
parent | 636bdb5f84ca0a8a79e5ad6c368277a73fb04a42 (diff) | |
download | lwn-72bf80cf09c4693780ad93a31b48fa5a4e17a946.tar.gz lwn-72bf80cf09c4693780ad93a31b48fa5a4e17a946.zip |
regulator: lp872x: replacing legacy gpio interface for gpiod
Removing all linux/gpio.h and linux/of_gpio.h dependencies and replacing
them with the gpiod interface
Signed-off-by: Maíra Canal <maira.canal@usp.br>
Message-Id: <YWma2yTyuwS5XwhY@fedora>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r-- | include/linux/regulator/lp872x.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/regulator/lp872x.h b/include/linux/regulator/lp872x.h index d780dbb8b423..8e7e0343c6e1 100644 --- a/include/linux/regulator/lp872x.h +++ b/include/linux/regulator/lp872x.h @@ -10,7 +10,7 @@ #include <linux/regulator/machine.h> #include <linux/platform_device.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #define LP872X_MAX_REGULATORS 9 @@ -41,8 +41,8 @@ enum lp872x_regulator_id { }; enum lp872x_dvs_state { - DVS_LOW = GPIOF_OUT_INIT_LOW, - DVS_HIGH = GPIOF_OUT_INIT_HIGH, + DVS_LOW = GPIOD_OUT_LOW, + DVS_HIGH = GPIOD_OUT_HIGH, }; enum lp872x_dvs_sel { @@ -52,12 +52,12 @@ enum lp872x_dvs_sel { /** * lp872x_dvs - * @gpio : gpio pin number for dvs control + * @gpio : gpio descriptor for dvs control * @vsel : dvs selector for buck v1 or buck v2 register * @init_state : initial dvs pin state */ struct lp872x_dvs { - int gpio; + struct gpio_desc *gpio; enum lp872x_dvs_sel vsel; enum lp872x_dvs_state init_state; }; @@ -78,14 +78,14 @@ struct lp872x_regulator_data { * @update_config : if LP872X_GENERAL_CFG register is updated, set true * @regulator_data : platform regulator id and init data * @dvs : dvs data for buck voltage control - * @enable_gpio : gpio pin number for enable control + * @enable_gpio : gpio descriptor for enable control */ struct lp872x_platform_data { u8 general_config; bool update_config; struct lp872x_regulator_data regulator_data[LP872X_MAX_REGULATORS]; struct lp872x_dvs *dvs; - int enable_gpio; + struct gpio_desc *enable_gpio; }; #endif |