diff options
author | Samuel Holland <samuel@sholland.org> | 2023-01-22 17:46:22 -0600 |
---|---|---|
committer | Andre Przywara <andre.przywara@arm.com> | 2023-04-28 01:30:24 +0100 |
commit | 09cbd3858f156e0461c0c939f23cf3c76ef95dcc (patch) | |
tree | 11fb6be1f92aca9cfbcf486cbcbb587f2ab3208a /drivers/gpio/axp_gpio.c | |
parent | 7d5b17cca626a45b8e414820044831470ae1b300 (diff) |
gpio: axp/sunxi: Remove virtual VBUS detection GPIO
Now that this functionality is modeled using the device tree and
regulator uclass, the named GPIO is not referenced anywhere. Remove it.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'drivers/gpio/axp_gpio.c')
-rw-r--r-- | drivers/gpio/axp_gpio.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/gpio/axp_gpio.c b/drivers/gpio/axp_gpio.c index 35585dc8ac..49672193ff 100644 --- a/drivers/gpio/axp_gpio.c +++ b/drivers/gpio/axp_gpio.c @@ -36,18 +36,11 @@ static int axp_gpio_direction_input(struct udevice *dev, unsigned pin) { u8 reg; - switch (pin) { -#ifndef CONFIG_AXP152_POWER /* NA on axp152 */ - case SUNXI_GPIO_AXP0_VBUS_DETECT: - return 0; -#endif - default: - reg = axp_get_gpio_ctrl_reg(pin); - if (reg == 0) - return -EINVAL; + reg = axp_get_gpio_ctrl_reg(pin); + if (reg == 0) + return -EINVAL; - return pmic_bus_write(reg, AXP_GPIO_CTRL_INPUT); - } + return pmic_bus_write(reg, AXP_GPIO_CTRL_INPUT); } static int axp_gpio_direction_output(struct udevice *dev, unsigned pin, @@ -83,12 +76,6 @@ static int axp_gpio_get_value(struct udevice *dev, unsigned pin) int ret; switch (pin) { -#ifndef CONFIG_AXP152_POWER /* NA on axp152 */ - case SUNXI_GPIO_AXP0_VBUS_DETECT: - ret = pmic_bus_read(AXP_POWER_STATUS, &val); - mask = AXP_POWER_STATUS_VBUS_PRESENT; - break; -#endif #ifdef AXP_MISC_CTRL_N_VBUSEN_FUNC /* Only available on later PMICs */ case SUNXI_GPIO_AXP0_VBUS_ENABLE: |