drivers: gpio: mspm0: allow configuration of open-drain outputs

Check the GPIO_OPEN_DRAIN flag and set the corresponding HIZ1 bit in the
PINCM register.

Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
This commit is contained in:
Alvin Šipraga 2025-03-19 16:55:02 +01:00 committed by Alberto Escolar
parent 5ede804e2d
commit cc08d96d79

View File

@ -148,6 +148,8 @@ static int gpio_mspm0_pin_configure(const struct device *port,
DL_GPIO_INVERSION_DISABLE,
pull_res,
DL_GPIO_DRIVE_STRENGTH_LOW,
(flags & GPIO_OPEN_DRAIN) ?
DL_GPIO_HIZ_ENABLE :
DL_GPIO_HIZ_DISABLE);
/* Set initial state */