Skip to content

Commit 34f1778

Browse files
committed
drivers: gpio: mspm0g3xxx: 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 <[email protected]>
1 parent 3197b35 commit 34f1778

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpio_mspm0g3xxx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static int gpio_mspm0g3xxx_pin_configure(const struct device *port, gpio_pin_t p
7979
: (flags & GPIO_PULL_DOWN)
8080
? DL_GPIO_RESISTOR_PULL_DOWN
8181
: DL_GPIO_RESISTOR_NONE,
82-
DL_GPIO_DRIVE_STRENGTH_LOW, DL_GPIO_HIZ_DISABLE);
82+
DL_GPIO_DRIVE_STRENGTH_LOW, (flags & GPIO_OPEN_DRAIN) ? DL_GPIO_HIZ_ENABLE : DL_GPIO_HIZ_DISABLE);
8383

8484
/* Set initial state */
8585
if (flags & GPIO_OUTPUT_INIT_HIGH) {

0 commit comments

Comments
 (0)