[PATCH] gpio-uclass: fix gpio flags save condition

Köry Maincent kory.maincent at bootlin.com
Mon Jan 25 15:27:33 CET 2021


Hello Simon,

On Sun, 24 Jan 2021 13:24:14 -0700
Simon Glass <sjg at chromium.org> wrote:

> Hi Kory,
> 
> On Fri, 22 Jan 2021 at 08:23, Kory Maincent <kory.maincent at bootlin.com> wrote:
> >
> > The commit cd2faeba1a moves the location where we save the flags to the gpio
> > descriptor but it adds a "!" character.
> > This breaks the condition we expect to save the flags.
> >
> > Signed-off-by: Kory Maincent <kory.maincent at bootlin.com>
> > ---
> >  drivers/gpio/gpio-uclass.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >  
> 
> This does indeed seem to be a bug, and the tests do not cover it. But
> this happens to be fixed by my GPIO series. I'm about to send out v3
> so will copy you on it.

Thanks.

I have tested your series of patch and it seems to have also an issue with my
use case.
I am working with w1-gpio.
I got this issue: 
=> w1 bus
check_dir_flags: flags 0x16 has GPIOD_IS_OUT and GPIOD_IS_IN
gpio_sunxi PD: PD error: set_dir_flags for gpio PD2 has invalid dir flags 0x16
Bus 0:  onewire  (active)
        w1_eeprom at 0 (0) uclass w1_eeprom : family 0x0



Regards,

Köry


More information about the U-Boot mailing list