All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	m.szyprowski@samsung.com,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	Mark Brown <broonie@kernel.org>,
	linux-gpio <linux-gpio@vger.kernel.org>,
	kernel@pengutronix.de
Subject: Re: [PATCH] gpio: fix getting nonexclusive gpiods from DT
Date: Mon, 18 Nov 2019 11:33:32 +0100	[thread overview]
Message-ID: <20191118103332.bmafrl5izirbauqw@pengutronix.de> (raw)
In-Reply-To: <CAMpxmJXYPSu85UmsWO2n01+fWBdw-1UeEyi3Z2LOFjNbg+m6kQ@mail.gmail.com>

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 |

  reply	other threads:[~2019-11-18 10:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-11-18 10:56     ` Bartosz Golaszewski
2019-11-18 11:29       ` Marco Felsch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191118103332.bmafrl5izirbauqw@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=bgolaszewski@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.