drivers: gpio: gpio_max32: Fix high-impedance setting

Put disconnected GPIOs to high impedance state by setting their
direction to input and pad control to none.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
This commit is contained in:
Tahsin Mutlugun 2024-07-23 11:58:27 +03:00 committed by Anas Nashif
parent c071cd72ca
commit 99603e4c38

View file

@ -101,8 +101,8 @@ static int api_pin_configure(const struct device *dev, gpio_pin_t pin, gpio_flag
} else if (flags & GPIO_INPUT) {
gpio_cfg.func = MXC_GPIO_FUNC_IN;
} else {
/* this case will not occur this function call for gpio mode in/out */
gpio_cfg.func = MXC_GPIO_FUNC_ALT1; /* TODO: Think on it */
gpio_cfg.func = MXC_GPIO_FUNC_IN;
gpio_cfg.pad = MXC_GPIO_PAD_NONE;
}
if (flags & MAX32_GPIO_VSEL_VDDIOH) {