Skip to content

ACPI: Translate Linux IRQ number directly from GpioInt

Mika Westerberg linux-acpi linux-gpio linux-i2c lkml 2 versions – In review

Get series with b4
b4 am 1430908148-201129-1-git-send-email-mika.westerberg@linux.intel.com

Versions newest first · linked by author and title

  1. v2 Latest3 patches 8 repliesIn review
  2. v12 patches 7 repliesSuperseded

Changes to the previous version from the cover letter

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

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3gpio / ACPI: Add support for retrieving GpioInt resources from a devicedrivers/gpio/gpiolib-acpi.c include/linux/acpi.h+36 -02 replies
2/3i2c / ACPI: Use 0 to indicate that device does not have interrupt assigneddrivers/i2c/i2c-core.c+1 -23 replies
3/3i2c / ACPI: Assign IRQ for devices that have GpioInt automaticallydrivers/i2c/i2c-core.c+7 -23 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchRafael J. WysockiAntonio OspiteWolfram Sang
1/3A-b T-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/3] ACPI: Translate Linux IRQ number directly from GpioInt

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(-)
Signature · 1 line
2.1.4