[PATCH 1/9] ARM: boards: protonic-imx6: prtvt7 hardkey inputs are active low

Robin van der Gracht robin at protonic.nl
Thu Jun 16 06:11:06 PDT 2022


The usb check needs to be skipped unless both keys are pressed
simultaneously.

Signed-off-by: Robin van der Gracht <robin at protonic.nl>
---
 arch/arm/boards/protonic-imx6/board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boards/protonic-imx6/board.c b/arch/arm/boards/protonic-imx6/board.c
index cdbb8debe6..8f8a0c745e 100644
--- a/arch/arm/boards/protonic-imx6/board.c
+++ b/arch/arm/boards/protonic-imx6/board.c
@@ -645,7 +645,7 @@ static int prt_imx6_init_prtvt7(struct prt_imx6_priv *priv)
 	gpio_direction_input(GPIO_KEY_F6);
 	gpio_direction_input(GPIO_KEY_CYCLE);
 
-	if (gpio_get_value(GPIO_KEY_CYCLE) && gpio_get_value(GPIO_KEY_F6))
+	if (gpio_get_value(GPIO_KEY_CYCLE) || gpio_get_value(GPIO_KEY_F6))
 		priv->no_usb_check = 1;
 
 	return 0;
-- 
2.34.1




More information about the barebox mailing list