From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-gpio@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [PATCH v2] gpio: pca953x: Override IRQ for one of the expanders on Galileo Gen 2
Date: Tue, 26 May 2020 16:34:05 +0300 [thread overview]
Message-ID: <20200526133405.GV247495@lahna.fi.intel.com> (raw)
In-Reply-To: <20200526131119.GQ1634618@smile.fi.intel.com>
On Tue, May 26, 2020 at 04:11:19PM +0300, Andy Shevchenko wrote:
> On Tue, May 26, 2020 at 08:31:01AM +0300, Mika Westerberg wrote:
> > On Mon, May 25, 2020 at 10:08:45PM +0300, Andy Shevchenko wrote:
>
> ...
>
> > > + dev_info(dev, "Applying ACPI interrupt quirk (GPIO %d)\n", pin);
> > > + return gpiod_to_irq(gpio_to_desc(pin));
> >
> > You need to request the GPIO as well, I missed that from my example.
>
> How? I can't find a function to request GPIO by its descriptor in
> include/linux/gpio/*.
Not by descriptor but by number which you are already using here anyway.
The function that does that is gpio_request(). I know we should use GPIO
descriptors everywhere but this is a special case for a special hardware
with a broken firmware, so IMHO it should be fine ;-) Once the legacy
API is gets removed this whole hack can be removed as well and nobody
will notice.
next prev parent reply other threads:[~2020-05-26 13:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 19:08 [PATCH v2] gpio: pca953x: Override IRQ for one of the expanders on Galileo Gen 2 Andy Shevchenko
2020-05-26 5:31 ` Mika Westerberg
2020-05-26 13:11 ` Andy Shevchenko
2020-05-26 13:34 ` Mika Westerberg [this message]
2020-05-27 5:43 ` Linus Walleij
2020-05-27 9:10 ` Andy Shevchenko
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=20200526133405.GV247495@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox