Commit aed0ecfd authored by Manimaran A's avatar Manimaran A Committed by Anas Nashif
Browse files

drivers: gpio: mchp: Twister fix for test_input_output failure



Added logic to return ENOTSUP, if input-output GPIO
direction requested.

Signed-off-by: default avatarManimaran A <manimaran.a@microchip.com>
parent 68be56d2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;
	}