linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/12] gpio: acpi: Make it working
@ 2017-05-23 17:03 Andy Shevchenko
  2017-05-23 17:03 ` [PATCH v2 01/12] gpiolib: Export gpiod_configure_flags() to internal users Andy Shevchenko
                   ` (12 more replies)
  0 siblings, 13 replies; 31+ messages in thread
From: Andy Shevchenko @ 2017-05-23 17:03 UTC (permalink / raw)
  To: Linus Walleij, linux-gpio, Dmitry Torokhov, Hans de Goede,
	linux-kernel, Rafael J. Wysocki, linux-acpi, Mika Westerberg,
	Jarkko Nikula, Jagadish Krishnamoorthy
  Cc: Andy Shevchenko

This is second iteration of the fix of GPIO ACPI library to make it
robust against different ACPI specification generations and thus
firmwares.

Currently GPIO ACPI library provides an API to get a GPIO resources
(IO or interrupt) from ACPI tables for the individual drivers.

This library has few flaws which makes some devices not working:
- the library allows to abuse ACPI by using a _CRS fallback mechanism
- the library neglects flags of the resource
- the PNP ACPI is not ready for GpioInt() resources for interrupts

In this series:
- the _CRS fallback is forbidden
- the pin configuration follows what firmware wants to
- the documentation is updated in order to clarify corner cases
- the PNP ACPI is extended to support GpioInt() for interrupts

After this series it's possible to use GPIO pins for input (interrupt)
which were set as output due to HW reset default is input buffer
disabled and BIOS didn't touch that pin at all. It's a crucial
functionality for Internet of Things (IoT) open connected boards where
user may choose any of available pin for almost any of available
function, including GPIO input (interrupt).

Current bad behaviour was first reported by Jarkko Nikula few months ago.

Jagadish, it would be nice if you can re-test entire series in your
environment and give a Tested-by tag.

In v2:
- add 4 patches to fix an issue with device that takes GpioInt resource
- amend documentation
- fix several spelling typos
- add Mika's and Jarkko's tags
- rebase on top of recent linux-next

Andy Shevchenko (11):
  gpiolib: Export gpiod_configure_flags() to internal users
  gpio: acpi: Align acpi_find_gpio() with DT version
  gpio: acpi: Do sanity check for GpioInt in acpi_find_gpio()
  gpio: acpi: Even more tighten up ACPI GPIO lookups
  gpio: acpi: Synchronize acpi_find_gpio() and acpi_gpio_count()
  gpio: acpi: Explain how to get GPIO descriptors in ACPI case
  gpio: acpi: Factor out acpi_gpio_to_gpiod_flags() helper
  gpio: acpi: Override GPIO initialization flags
  gpio: acpi: Split out acpi_gpio_get_irq_resource() helper
  PNP / ACPI: join strings back for better maintenance
  PNP / ACPI: remove FSF address

Jagadish Krishnamoorthy (1):
  PNP / ACPI: add support for GpioInt resource type

 Documentation/acpi/gpio-properties.txt |  65 ++++++++++++
 drivers/gpio/gpiolib-acpi.c            | 185 ++++++++++++++++++++-------------
 drivers/gpio/gpiolib.c                 |  10 +-
 drivers/gpio/gpiolib.h                 |  17 ++-
 drivers/pnp/pnpacpi/rsparser.c         |  37 ++++---
 include/linux/acpi.h                   |   7 ++
 6 files changed, 230 insertions(+), 91 deletions(-)

-- 
2.11.0

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

end of thread, other threads:[~2017-05-29 13:09 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-23 17:03 [PATCH v2 00/12] gpio: acpi: Make it working Andy Shevchenko
2017-05-23 17:03 ` [PATCH v2 01/12] gpiolib: Export gpiod_configure_flags() to internal users Andy Shevchenko
2017-05-29  9:15   ` Linus Walleij
2017-05-23 17:03 ` [PATCH v2 02/12] gpio: acpi: Align acpi_find_gpio() with DT version Andy Shevchenko
2017-05-29  9:16   ` Linus Walleij
2017-05-23 17:03 ` [PATCH v2 03/12] gpio: acpi: Do sanity check for GpioInt in acpi_find_gpio() Andy Shevchenko
2017-05-29  9:17   ` Linus Walleij
2017-05-23 17:03 ` [PATCH v2 04/12] gpio: acpi: Even more tighten up ACPI GPIO lookups Andy Shevchenko
2017-05-29  9:18   ` Linus Walleij
2017-05-23 17:03 ` [PATCH v2 05/12] gpio: acpi: Synchronize acpi_find_gpio() and acpi_gpio_count() Andy Shevchenko
2017-05-29  9:19   ` Linus Walleij
2017-05-23 17:03 ` [PATCH v2 06/12] gpio: acpi: Explain how to get GPIO descriptors in ACPI case Andy Shevchenko
2017-05-29  9:20   ` Linus Walleij
2017-05-23 17:03 ` [PATCH v2 07/12] gpio: acpi: Factor out acpi_gpio_to_gpiod_flags() helper Andy Shevchenko
2017-05-29  9:21   ` Linus Walleij
2017-05-23 17:03 ` [PATCH v2 08/12] gpio: acpi: Override GPIO initialization flags Andy Shevchenko
2017-05-29  9:22   ` Linus Walleij
2017-05-23 17:03 ` [PATCH v2 09/12] gpio: acpi: Split out acpi_gpio_get_irq_resource() helper Andy Shevchenko
2017-05-24 11:53   ` Mika Westerberg
2017-05-29  9:23   ` Linus Walleij
2017-05-23 17:03 ` [PATCH v2 10/12] PNP / ACPI: add support for GpioInt resource type Andy Shevchenko
2017-05-24 12:02   ` Mika Westerberg
2017-05-29  9:26   ` Linus Walleij
2017-05-23 17:03 ` [PATCH v2 11/12] PNP / ACPI: join strings back for better maintenance Andy Shevchenko
2017-05-24 12:02   ` Mika Westerberg
2017-05-29  9:28   ` Linus Walleij
2017-05-23 17:03 ` [PATCH v2 12/12] PNP / ACPI: remove FSF address Andy Shevchenko
2017-05-24 12:06   ` Mika Westerberg
2017-05-29  9:29   ` Linus Walleij
2017-05-29  9:31 ` [PATCH v2 00/12] gpio: acpi: Make it working Linus Walleij
2017-05-29 13:09   ` Andy Shevchenko

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