linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/3] ACPI: Add irq_type to gpio interrupt
@ 2015-12-15  7:11 Christophe Ricard
  2015-12-15  7:11 ` [PATCH v7 1/3] acpi: Rename acpi_gsi_get_irq_type to acpi_dev_get_irq_type and export symbol Christophe Ricard
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Christophe Ricard @ 2015-12-15  7:11 UTC (permalink / raw)
  To: rjw, lenb, linus.walleij, gnurou, andriy.shevchenko,
	mika.westerberg, broonie
  Cc: linux-spi, linux-gpio, linux-acpi, Christophe Ricard

Hi,

ACPI probing method does not retrieve irq_type from a gpio interrupt declared
with GpioInt as it is done with devicetree probing. In other terms, irq_get_trigger_type
will always send back 0.

Those 3 patches propose a way to retrieve the correct interrupt polarity/type from a GpioInt
acpi declaration when using irq_get_trigger_type.

Since v4 after Mika and Andy's feedbacks:
- acpi_gpio_info active_low field got renamed polarity. Note that polarity/active_low is having sense
also when a gpio is not mapped as an interrupt but as an output (For example: check gpiod_set_value
in drivers/gpio/gpiolib.c).
- acpi_gsi_get_irq_type is now renamed acpi_dev_get_irq_type and moved to drivers/acpi/resource.c
- The irq described in the acpi spi slave node is now set once we fall back to retrieve normal interrupt.

Since v5 after Andy's feedbacks:
- Make sure we are not using u* type but pure C type for non hardware value.

Since v6:
- Patches now applies on top of Raphael tree tag linux-next

Best Regards
Christophe 

Christophe Ricard (3):
  acpi: Rename acpi_gsi_get_irq_type to acpi_dev_get_irq_type and export
    symbol
  ACPI / gpio: Add irq_type when a gpio is used as an interrupt
  ACPI / spi: attach gpio irq from acpi description to spi device

 drivers/acpi/gsi.c          | 21 +--------------------
 drivers/acpi/resource.c     | 26 ++++++++++++++++++++++++++
 drivers/gpio/gpiolib-acpi.c | 30 ++++++++++++++++++++++++------
 drivers/gpio/gpiolib.c      |  4 ++--
 drivers/gpio/gpiolib.h      |  3 ++-
 drivers/spi/spi.c           |  2 ++
 include/linux/acpi.h        |  1 +
 7 files changed, 58 insertions(+), 29 deletions(-)

-- 
2.1.4


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

end of thread, other threads:[~2015-12-18  9:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-15  7:11 [PATCH v7 0/3] ACPI: Add irq_type to gpio interrupt Christophe Ricard
2015-12-15  7:11 ` [PATCH v7 1/3] acpi: Rename acpi_gsi_get_irq_type to acpi_dev_get_irq_type and export symbol Christophe Ricard
2015-12-18  8:40   ` Mika Westerberg
     [not found] ` <1450163493-4938-1-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2015-12-15  7:11   ` [PATCH v7 2/3] ACPI / gpio: Add irq_type when a gpio is used as an interrupt Christophe Ricard
     [not found]     ` <1450163493-4938-3-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2015-12-18  9:13       ` Mika Westerberg
2015-12-15  7:11 ` [PATCH v7 3/3] ACPI / spi: attach gpio irq from acpi description to spi device Christophe Ricard
     [not found]   ` <1450163493-4938-4-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2015-12-18  8:01     ` Mark Brown
2015-12-18  9:17   ` Mika Westerberg

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