Skip to content

Commit aed0ecf

Browse files
Manimaran-Anashif
authored andcommitted
drivers: gpio: mchp: Twister fix for test_input_output failure
Added logic to return ENOTSUP, if input-output GPIO direction requested. Signed-off-by: Manimaran A <manimaran.a@microchip.com>
1 parent 68be56d commit aed0ecf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/gpio/gpio_mchp_xec_v2.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ static int gpio_xec_validate_flags(gpio_flags_t flags)
9494
return -ENOTSUP;
9595
}
9696

97+
if ((flags & (GPIO_INPUT | GPIO_OUTPUT))
98+
== (GPIO_INPUT | GPIO_OUTPUT)) {
99+
return -ENOTSUP;
100+
}
101+
97102
if ((flags & GPIO_OUTPUT_INIT_LOW) && (flags & GPIO_OUTPUT_INIT_HIGH)) {
98103
return -EINVAL;
99104
}

0 commit comments

Comments
 (0)