On 22-06-17, Sascha Hauer wrote: > On Thu, Jun 16, 2022 at 06:38:45PM +0200, Oleksij Rempel wrote: > > Am 16.06.22 um 18:28 schrieb Oleksij Rempel: > > > Hi Robin, > > > > > > On Thu, Jun 16, 2022 at 03:11:06PM +0200, Robin van der Gracht wrote: > > > > The usb check needs to be skipped unless both keys are pressed > > > > simultaneously. > > > > > > > > Signed-off-by: Robin van der Gracht <robin@xxxxxxxxxxx> > > > > --- > > > > 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; > > > > > > Hm, you probably wont: > > > if (!(gpio_get_value(GPIO_KEY_CYCLE) && gpio_get_value(GPIO_KEY_F6))) > > > > > > otherwise usb check will be always skipped. > > > > Or, it is active low and your patch is correct :D > > If they are, can we add a comment or _N suffix to the names? Does barebox not have gpiod? The board code just should check if it is active or not. Whatever active means in this case. Regards, Marco > > Sascha > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > >