From cc08d96d79c615f4ec81d12cc0ceb68ef569acef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alvin=20=C5=A0ipraga?= Date: Wed, 19 Mar 2025 16:55:02 +0100 Subject: [PATCH] drivers: gpio: mspm0: allow configuration of open-drain outputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Check the GPIO_OPEN_DRAIN flag and set the corresponding HIZ1 bit in the PINCM register. Signed-off-by: Alvin Šipraga --- drivers/gpio/gpio_mspm0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpio_mspm0.c b/drivers/gpio/gpio_mspm0.c index 38eab8b806c..3535b6d25a7 100644 --- a/drivers/gpio/gpio_mspm0.c +++ b/drivers/gpio/gpio_mspm0.c @@ -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 */