Skip to content

Commit

Permalink
drivers: pinctrl: add low power support
Browse files Browse the repository at this point in the history
- Add low power pinctrl configuration support for gecko platform
  • Loading branch information
Romain Pelletant committed Jan 3, 2025
1 parent 024344f commit ec87230
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/pinctrl/pinctrl_gecko.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt, uintp
pin_config.pin = GECKO_GET_PIN(pins[i]);
loc = GECKO_GET_LOC(pins[i]);

/* Force input for low power mode */
if (GECKO_GET_LP(pins[i]) == GECKO_LP_ENABLE) {
pin_config.mode = gpioModeInput;
pin_config.out = 0;
GPIO_PinModeSet(pin_config.port, pin_config.pin, pin_config.mode,
pin_config.out);
continue;
}

switch (GECKO_GET_FUN(pins[i])) {
#ifdef CONFIG_UART_GECKO
case GECKO_FUN_UART_RX:
Expand Down

0 comments on commit ec87230

Please sign in to comment.