Re: [PATCH v2] gpio: pca953x: Override IRQ for one of the expanders on Galileo Gen 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux