
31 Jan
2024
31 Jan
'24
4:35 p.m.
On Wed, Jan 31, 2024 at 03:16:59PM +0000, Caleb Connolly wrote:
diff --git a/drivers/gpio/msm_gpio.c b/drivers/gpio/msm_gpio.c index 80cd28bb231f..0230305af299 100644 --- a/drivers/gpio/msm_gpio.c +++ b/drivers/gpio/msm_gpio.c @@ -72,6 +72,23 @@ static int msm_gpio_direction_output(struct udevice *dev, unsigned int gpio, return 0; }
+static int msm_gpio_set_flags(struct udevice *dev, unsigned int gpio, ulong flags) +{
- if (flags & GPIOD_IS_OUT_ACTIVE) {
return msm_gpio_direction_output(dev, gpio, 1);
- } else if (flags & GPIOD_IS_OUT) {
return msm_gpio_direction_output(dev, gpio, 0);
- } else if (flags & GPIOD_IS_IN) {
return msm_gpio_direction_input(dev, gpio);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
if (flags & GPIOD_PULL_UP)
return msm_gpio_set_value(dev, gpio, 1);
else if (flags & GPIOD_PULL_DOWN)
return msm_gpio_set_value(dev, gpio, 0);
These lines are unreachable code.
- }
- return 0;
+}
regards, dan carpenter