drivers: gpio: Add default for switch statement

This causes a warning when making changes to add
support for GPIO_INT_WAKEUP flag.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This commit is contained in:
Mahesh Mahadevan 2023-12-15 13:19:40 -06:00 committed by Anas Nashif
parent e0dbd3fd39
commit e17045a02d
10 changed files with 28 additions and 2 deletions

View file

@ -279,6 +279,8 @@ static int ambiq_gpio_pin_interrupt_configure(const struct device *dev, gpio_pin
* ERR008: GPIO: Dual-edge interrupts are not vectoring
*/
return -ENOTSUP;
default:
return -EINVAL;
}
ret = am_hal_gpio_pinconfig(gpio_pin, pincfg);

View file

@ -311,6 +311,8 @@ static int gpio_eos_s3_pin_interrupt_configure(const struct device *dev,
break;
case GPIO_INT_TRIG_BOTH:
return -ENOTSUP;
default:
return -EINVAL;
}
}

View file

@ -323,6 +323,9 @@ static int mcp23xxx_pin_interrupt_configure(const struct device *dev, gpio_pin_t
/* can't happen */
ret = -ENOTSUP;
goto done;
default:
ret = -EINVAL;
goto done;
}
break;
@ -343,6 +346,9 @@ static int mcp23xxx_pin_interrupt_configure(const struct device *dev, gpio_pin_t
drv_data->rising_edge_ints |= BIT(pin);
drv_data->falling_edge_ints |= BIT(pin);
break;
default:
ret = -EINVAL;
goto done;
}
break;
}

View file

@ -205,6 +205,8 @@ static uint32_t get_port_pcr_irqc_value_from_flags(const struct device *dev,
case GPIO_INT_TRIG_BOTH:
port_interrupt = kPORT_InterruptEitherEdge;
break;
default:
return -EINVAL;
}
}
}

View file

@ -200,6 +200,8 @@ static int gpio_numicro_pin_interrupt_configure(const struct device *dev,
case GPIO_INT_TRIG_BOTH:
int_level = BIT(pin) | BIT(pin + 16);
break;
default:
return -EINVAL;
}
}

View file

@ -171,6 +171,8 @@ static int gpio_psoc6_pin_interrupt_configure(const struct device *dev,
case GPIO_INT_TRIG_LOW:
lv_trg = CY_GPIO_INTR_FALLING;
break;
default:
return -EINVAL;
}
}

View file

@ -255,6 +255,9 @@ static int gpio_rt1718s_pin_interrupt_configure(const struct device *dev, gpio_p
case GPIO_INT_TRIG_LOW:
new_reg_mask8 = (reg_mask8 | mask_fall) & ~mask_rise;
break;
default:
ret = -EINVAL;
goto done;
}
ret = rt1718s_reg_burst_read(config->rt1718s_dev, RT1718S_REG_ALERT_MASK,

View file

@ -64,6 +64,8 @@ static uint32_t get_port_pcr_irqc_value_from_flags(const struct device *dev,
case GPIO_INT_TRIG_BOTH:
port_interrupt = kPORT_InterruptEitherEdge;
break;
default:
return -EINVAL;
}
}
}

View file

@ -244,6 +244,8 @@ static int gpio_sedi_interrupt_configure(const struct device *dev,
pin_config.interrupt_mode =
SEDI_GPIO_INT_MODE_BOTH_EDGE;
break;
default:
return -EINVAL;
}
}
/* Configure interrupt mode */

View file

@ -623,8 +623,6 @@ static int gpio_stm32_pin_interrupt_configure(const struct device *dev,
goto exit;
}
gpio_stm32_enable_int(cfg->port, pin);
switch (trig) {
case GPIO_INT_TRIG_LOW:
edge = STM32_EXTI_TRIG_FALLING;
@ -635,8 +633,13 @@ static int gpio_stm32_pin_interrupt_configure(const struct device *dev,
case GPIO_INT_TRIG_BOTH:
edge = STM32_EXTI_TRIG_BOTH;
break;
default:
err = -EINVAL;
goto exit;
}
gpio_stm32_enable_int(cfg->port, pin);
stm32_exti_trigger(pin, edge);
stm32_exti_enable(pin);