linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] ACPI: Translate Linux IRQ number directly from GpioInt
@ 2015-05-06 10:29 Mika Westerberg
  2015-05-06 10:29 ` [PATCH v2 1/3] gpio / ACPI: Add support for retrieving GpioInt resources from a device Mika Westerberg
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Mika Westerberg @ 2015-05-06 10:29 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, linux-i2c

Hi,

This is second iteration of the series. The previous version can be found
from [1].

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 [2].

The following three patches achieve 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.

Changes to the previous version:
 - Added Rafael's ack to the first patch
 - Introduce new patch that makes I2C ACPI slave enumeration code use 0 to mean
   no interrupt.

If no objections, I would like this to merged via either I2C or GPIO trees.

Thanks.

[1] https://lkml.org/lkml/2015/4/28/455
[2] https://lkml.org/lkml/2015/3/25/103

Mika Westerberg (3):
  gpio / ACPI: Add support for retrieving GpioInt resources from a device
  i2c / ACPI: Use 0 to indicate that device does not have interrupt assigned
  i2c / ACPI: Assign IRQ for devices that have GpioInt automatically

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

-- 
2.1.4


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

end of thread, other threads:[~2015-05-13  8:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-06 10:29 [PATCH v2 0/3] ACPI: Translate Linux IRQ number directly from GpioInt Mika Westerberg
2015-05-06 10:29 ` [PATCH v2 1/3] gpio / ACPI: Add support for retrieving GpioInt resources from a device Mika Westerberg
2015-05-11  9:56   ` Linus Walleij
2015-05-12 12:49   ` Antonio Ospite
2015-05-06 10:29 ` [PATCH v2 2/3] i2c / ACPI: Use 0 to indicate that device does not have interrupt assigned Mika Westerberg
2015-05-11  9:58   ` Linus Walleij
2015-05-12 13:09   ` wsa
     [not found]   ` <1430908148-201129-3-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-05-13  8:24     ` Linus Walleij
2015-05-06 10:29 ` [PATCH v2 3/3] i2c / ACPI: Assign IRQ for devices that have GpioInt automatically Mika Westerberg
2015-05-11  9:59   ` Linus Walleij
2015-05-12 13:09   ` wsa
     [not found]   ` <1430908148-201129-4-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-05-13  8:25     ` Linus Walleij

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).