linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ACPI: Translate Linux IRQ number directly from GpioInt
@ 2015-04-28 15:05 Mika Westerberg
  2015-04-28 15:05 ` [PATCH 1/2] gpio / ACPI: Add support for retrieving GpioInt resources from a device Mika Westerberg
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Mika Westerberg @ 2015-04-28 15:05 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linus Walleij, Alexandre Courbot, Wolfram Sang, Octavian Purdila,
	Robert Dolca, Mika Westerberg, linux-gpio, linux-kernel,
	linux-acpi

Hi,

Currently drivers for ACPI enumerated devices that have their interrupt
line connected to a GPIO controller instead of IO-APIC are required to do
complete gpiod_get()/gpiod_to_irq() etc. dance themselves. This adds
unnecessary lines of code to these drivers.

It turned out that DT solved the problem already with introduction of
of_irq_get() which is able to handle GPIO based interrupts as well through
irqchip API [1].

Following two patches does the same for ACPI by introducing new function
acpi_dev_gpio_irq_get() that is then used in I2C core to automatically
translate ACPI GpioInt resource to Linux IRQ number.

This requires that the boot firmware (BIOS/coreboot) configures these pins
correctly (input, etc) before handing over to OS. I've tested this on Intel
Baytrail, Braswell and Skylake based machines where this is true.

[1] https://lkml.org/lkml/2015/3/25/103

Mika Westerberg (2):
  gpio / ACPI: Add support for retrieving GpioInt resources from a device
  i2c / ACPI: Assign IRQ for devices that have GpioInt automatically

 drivers/gpio/gpiolib-acpi.c | 29 +++++++++++++++++++++++++++++
 drivers/i2c/i2c-core.c      |  9 +++++++--
 include/linux/acpi.h        |  7 +++++++
 3 files changed, 43 insertions(+), 2 deletions(-)

-- 
2.1.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-05-05 12:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-28 15:05 [PATCH 0/2] ACPI: Translate Linux IRQ number directly from GpioInt Mika Westerberg
2015-04-28 15:05 ` [PATCH 1/2] gpio / ACPI: Add support for retrieving GpioInt resources from a device Mika Westerberg
2015-05-04 23:47   ` Rafael J. Wysocki
2015-05-05 12:29     ` Mika Westerberg
2015-04-28 15:05 ` [PATCH 2/2] i2c / ACPI: Assign IRQ for devices that have GpioInt automatically Mika Westerberg
2015-04-29  9:56   ` Wolfram Sang
2015-04-29 10:02     ` Mika Westerberg
2015-04-28 17:36 ` [PATCH 0/2] ACPI: Translate Linux IRQ number directly from GpioInt sathyanarayanan kuppuswamy
2015-04-29  9:26   ` Mika Westerberg
2015-04-29 17:45     ` sathyanarayanan kuppuswamy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).