* [PATCH] gpio: fix getting nonexclusive gpiods from DT
@ 2019-09-16 13:43 Marco Felsch
2019-09-17 7:53 ` Bartosz Golaszewski
0 siblings, 1 reply; 5+ messages in thread
From: Marco Felsch @ 2019-09-16 13:43 UTC (permalink / raw)
To: linus.walleij, bgolaszewski, m.szyprowski, ckeepax, broonie
Cc: linux-gpio, kernel
Since commit ec757001c818 ("gpio: Enable nonexclusive gpiods from DT
nodes") we are able to get GPIOD_FLAGS_BIT_NONEXCLUSIVE marked gpios.
Currently the gpiolib uses the wrong flags variable for the check. We
need to check the gpiod_flags instead of the of_gpio_flags else we
return -EBUSY for GPIOD_FLAGS_BIT_NONEXCLUSIVE marked and requested
gpiod's.
Fixes: ec757001c818 gpio: Enable nonexclusive gpiods from DT nodes
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
drivers/gpio/gpiolib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index d9074191edef..e4203c1eb869 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -4303,7 +4303,7 @@ struct gpio_desc *gpiod_get_from_of_node(struct device_node *node,
transitory = flags & OF_GPIO_TRANSITORY;
ret = gpiod_request(desc, label);
- if (ret == -EBUSY && (flags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
+ if (ret == -EBUSY && (dflags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
return desc;
if (ret)
return ERR_PTR(ret);
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gpio: fix getting nonexclusive gpiods from DT
2019-09-16 13:43 [PATCH] gpio: fix getting nonexclusive gpiods from DT Marco Felsch
@ 2019-09-17 7:53 ` Bartosz Golaszewski
2019-11-18 10:33 ` Marco Felsch
0 siblings, 1 reply; 5+ messages in thread
From: Bartosz Golaszewski @ 2019-09-17 7:53 UTC (permalink / raw)
To: Marco Felsch
Cc: Linus Walleij, m.szyprowski, Charles Keepax, Mark Brown,
linux-gpio, kernel
pon., 16 wrz 2019 o 15:43 Marco Felsch <m.felsch@pengutronix.de> napisał(a):
>
> Since commit ec757001c818 ("gpio: Enable nonexclusive gpiods from DT
> nodes") we are able to get GPIOD_FLAGS_BIT_NONEXCLUSIVE marked gpios.
> Currently the gpiolib uses the wrong flags variable for the check. We
> need to check the gpiod_flags instead of the of_gpio_flags else we
> return -EBUSY for GPIOD_FLAGS_BIT_NONEXCLUSIVE marked and requested
> gpiod's.
>
> Fixes: ec757001c818 gpio: Enable nonexclusive gpiods from DT nodes
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> drivers/gpio/gpiolib.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index d9074191edef..e4203c1eb869 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -4303,7 +4303,7 @@ struct gpio_desc *gpiod_get_from_of_node(struct device_node *node,
> transitory = flags & OF_GPIO_TRANSITORY;
>
> ret = gpiod_request(desc, label);
> - if (ret == -EBUSY && (flags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
> + if (ret == -EBUSY && (dflags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
> return desc;
> if (ret)
> return ERR_PTR(ret);
> --
> 2.20.1
>
Queued for fixes, thanks.
Bart
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gpio: fix getting nonexclusive gpiods from DT
2019-09-17 7:53 ` Bartosz Golaszewski
@ 2019-11-18 10:33 ` Marco Felsch
2019-11-18 10:56 ` Bartosz Golaszewski
0 siblings, 1 reply; 5+ messages in thread
From: Marco Felsch @ 2019-11-18 10:33 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Linus Walleij, m.szyprowski, Charles Keepax, Mark Brown,
linux-gpio, kernel
Hi Bart,
On 19-09-17 09:53, Bartosz Golaszewski wrote:
> pon., 16 wrz 2019 o 15:43 Marco Felsch <m.felsch@pengutronix.de> napisał(a):
> >
> > Since commit ec757001c818 ("gpio: Enable nonexclusive gpiods from DT
> > nodes") we are able to get GPIOD_FLAGS_BIT_NONEXCLUSIVE marked gpios.
> > Currently the gpiolib uses the wrong flags variable for the check. We
> > need to check the gpiod_flags instead of the of_gpio_flags else we
> > return -EBUSY for GPIOD_FLAGS_BIT_NONEXCLUSIVE marked and requested
> > gpiod's.
> >
> > Fixes: ec757001c818 gpio: Enable nonexclusive gpiods from DT nodes
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > ---
> > drivers/gpio/gpiolib.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> > index d9074191edef..e4203c1eb869 100644
> > --- a/drivers/gpio/gpiolib.c
> > +++ b/drivers/gpio/gpiolib.c
> > @@ -4303,7 +4303,7 @@ struct gpio_desc *gpiod_get_from_of_node(struct device_node *node,
> > transitory = flags & OF_GPIO_TRANSITORY;
> >
> > ret = gpiod_request(desc, label);
> > - if (ret == -EBUSY && (flags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
> > + if (ret == -EBUSY && (dflags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
> > return desc;
> > if (ret)
> > return ERR_PTR(ret);
> > --
> > 2.20.1
> >
>
> Queued for fixes, thanks.
I rebased my patch stack ontop of -rc8 and didn't saw this commit. Is
this intended?
Regards,
Marco
> Bart
>
--
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 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gpio: fix getting nonexclusive gpiods from DT
2019-11-18 10:33 ` Marco Felsch
@ 2019-11-18 10:56 ` Bartosz Golaszewski
2019-11-18 11:29 ` Marco Felsch
0 siblings, 1 reply; 5+ messages in thread
From: Bartosz Golaszewski @ 2019-11-18 10:56 UTC (permalink / raw)
To: Marco Felsch
Cc: Bartosz Golaszewski, Linus Walleij, m.szyprowski, Charles Keepax,
Mark Brown, linux-gpio, Sascha Hauer
pon., 18 lis 2019 o 11:33 Marco Felsch <m.felsch@pengutronix.de> napisał(a):
>
> Hi Bart,
>
> On 19-09-17 09:53, Bartosz Golaszewski wrote:
> > pon., 16 wrz 2019 o 15:43 Marco Felsch <m.felsch@pengutronix.de> napisał(a):
> > >
> > > Since commit ec757001c818 ("gpio: Enable nonexclusive gpiods from DT
> > > nodes") we are able to get GPIOD_FLAGS_BIT_NONEXCLUSIVE marked gpios.
> > > Currently the gpiolib uses the wrong flags variable for the check. We
> > > need to check the gpiod_flags instead of the of_gpio_flags else we
> > > return -EBUSY for GPIOD_FLAGS_BIT_NONEXCLUSIVE marked and requested
> > > gpiod's.
> > >
> > > Fixes: ec757001c818 gpio: Enable nonexclusive gpiods from DT nodes
> > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > > ---
> > > drivers/gpio/gpiolib.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> > > index d9074191edef..e4203c1eb869 100644
> > > --- a/drivers/gpio/gpiolib.c
> > > +++ b/drivers/gpio/gpiolib.c
> > > @@ -4303,7 +4303,7 @@ struct gpio_desc *gpiod_get_from_of_node(struct device_node *node,
> > > transitory = flags & OF_GPIO_TRANSITORY;
> > >
> > > ret = gpiod_request(desc, label);
> > > - if (ret == -EBUSY && (flags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
> > > + if (ret == -EBUSY && (dflags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
> > > return desc;
> > > if (ret)
> > > return ERR_PTR(ret);
> > > --
> > > 2.20.1
> > >
> >
> > Queued for fixes, thanks.
>
> I rebased my patch stack ontop of -rc8 and didn't saw this commit. Is
> this intended?
>
I'm not sure what you mean, it's been in mainline since v5.4-rc2 as
commit be7ae45cfea9 ("gpio: fix getting nonexclusive gpiods from DT").
Bart
> Regards,
> Marco
>
> > Bart
> >
>
> --
> 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 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gpio: fix getting nonexclusive gpiods from DT
2019-11-18 10:56 ` Bartosz Golaszewski
@ 2019-11-18 11:29 ` Marco Felsch
0 siblings, 0 replies; 5+ messages in thread
From: Marco Felsch @ 2019-11-18 11:29 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Bartosz Golaszewski, Linus Walleij, m.szyprowski, Charles Keepax,
Mark Brown, linux-gpio, Sascha Hauer
On 19-11-18 11:56, Bartosz Golaszewski wrote:
> pon., 18 lis 2019 o 11:33 Marco Felsch <m.felsch@pengutronix.de> napisał(a):
> >
> > Hi Bart,
> >
> > On 19-09-17 09:53, Bartosz Golaszewski wrote:
> > > pon., 16 wrz 2019 o 15:43 Marco Felsch <m.felsch@pengutronix.de> napisał(a):
> > > >
> > > > Since commit ec757001c818 ("gpio: Enable nonexclusive gpiods from DT
> > > > nodes") we are able to get GPIOD_FLAGS_BIT_NONEXCLUSIVE marked gpios.
> > > > Currently the gpiolib uses the wrong flags variable for the check. We
> > > > need to check the gpiod_flags instead of the of_gpio_flags else we
> > > > return -EBUSY for GPIOD_FLAGS_BIT_NONEXCLUSIVE marked and requested
> > > > gpiod's.
> > > >
> > > > Fixes: ec757001c818 gpio: Enable nonexclusive gpiods from DT nodes
> > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > > > ---
> > > > drivers/gpio/gpiolib.c | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> > > > index d9074191edef..e4203c1eb869 100644
> > > > --- a/drivers/gpio/gpiolib.c
> > > > +++ b/drivers/gpio/gpiolib.c
> > > > @@ -4303,7 +4303,7 @@ struct gpio_desc *gpiod_get_from_of_node(struct device_node *node,
> > > > transitory = flags & OF_GPIO_TRANSITORY;
> > > >
> > > > ret = gpiod_request(desc, label);
> > > > - if (ret == -EBUSY && (flags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
> > > > + if (ret == -EBUSY && (dflags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
> > > > return desc;
> > > > if (ret)
> > > > return ERR_PTR(ret);
> > > > --
> > > > 2.20.1
> > > >
> > >
> > > Queued for fixes, thanks.
> >
> > I rebased my patch stack ontop of -rc8 and didn't saw this commit. Is
> > this intended?
> >
>
> I'm not sure what you mean, it's been in mainline since v5.4-rc2 as
> commit be7ae45cfea9 ("gpio: fix getting nonexclusive gpiods from DT").
>
> Bart
Arrg.. I checked the drivers/gpio/gpiolib.c file but it is within
gpiolib-of.c. Sorry for the noise.
Regards,
Marco
> > Regards,
> > Marco
> >
> > > Bart
> > >
> >
> > --
> > 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 |
>
--
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 |
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-18 11:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16 13:43 [PATCH] gpio: fix getting nonexclusive gpiods from DT Marco Felsch
2019-09-17 7:53 ` Bartosz Golaszewski
2019-11-18 10:33 ` Marco Felsch
2019-11-18 10:56 ` Bartosz Golaszewski
2019-11-18 11:29 ` Marco Felsch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.