This is the bulk of GPIO changes for the v3.16 series:

- We are finalizing and fixing up the gpiochip irqchip helpers
  bringing a helpful irqchip implementation into the gpiolib
  core and avoiding duplicate code and, more importantly,
  duplicate bug fixes:

  - Support for using the helpers with threaded interrupt
    handlers as used on sleeping GPIO-irqchips

  - Do not set up hardware triggers for edges or levels if
    the default IRQ type is IRQ_TYPE_NONE - some drivers
    would exploit the fact that you could get default
    initialization of the IRQ type from the core at probe()
    but if no default type is set up from the helper, we
    should not call the driver to configure anything. Wait
    until a consumer requests the interrupt instead.

  - Make the irqchip helpers put the GPIO irqs into their
    own lock class. The GPIO irqchips can often emit
    (harmless, but annoying) lockdep warnings about recursions
    when they are in fact just cascaded IRQs. By putting
    them into their own lock class we help the lockdep core
    to keep track of things.

  - Switch the tc3589x GPIO expanders to use the irqchip

  - Switch the OMAP GPIO driver to use the irqchip helpers

  - Add some documentation for the irqchip helpers

  - select IRQ_DOMAIN when using the helpers since some
    platforms may not be using this by default and it's a
    strict dependency.

- Continued GPIO descriptor refactoring:

  - Remove the one instance of gpio_to_desc() from the
    device tree code, making the OF GPIO code use GPIO
    descriptors only.

  - Introduce gpiod_get_optional() and
    gpiod_get_optional_index() akin to the similar
    regulator functions for cases where the use of GPIO
    is optional and not strictly required.

  - Make of_get_named_gpiod_flags() private - we do not
    want to unnecessarily expose APIs to drivers that
    make the gpiolib harder than necessary to maintain
    and refactor. Privatize this function.

- Support "-gpio" suffix for the OF GPIO retrieveal path.
  We used to look for "foo-gpios" or just "gpios" in device
  tree nodes, but it turns out that some drivers with a
  single GPIO line will just state "foo-gpio" (singularis).
  Sigh. Support this with a fallback looking for it, as
  this simplifies driver code and handles it in core code.

- Switch the ACPI GPIO core to fetch GPIOs with the
  *_cansleep function variants as the GPIO operation
  region handler can sleep, and shall be able to handle
  gpiochips that sleep.

- Tons of cleanups and janitorial work from Jingoo Han,
  Axel Lin, Javier Martinez Canillas and Abdoulaye Berthe.
  Notably Jingoo cut off a ton of pointless OOM messages.

- Incremental development and fixes for various drivers,
  nothing really special here.
Version: GnuPG v1

gpio: select IRQ_DOMAIN for gpiolib irqchip helpers

These helpers depend on the IRQ_DOMAIN so select it explicitly,
as it will not be present on all platforms such as Intel
desktops and laptops using Intel-MID.

Signed-off-by: Linus Walleij <>
1 file changed