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>
This commit is contained in:
parent
68be56d282
commit
aed0ecfd56
1 changed files with 5 additions and 0 deletions
|
@ -94,6 +94,11 @@ static int gpio_xec_validate_flags(gpio_flags_t flags)
|
|||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
if ((flags & (GPIO_INPUT | GPIO_OUTPUT))
|
||||
== (GPIO_INPUT | GPIO_OUTPUT)) {
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
if ((flags & GPIO_OUTPUT_INIT_LOW) && (flags & GPIO_OUTPUT_INIT_HIGH)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue