OSDN Git Service

pinctrl: st: use gpiolib irqchip helpers
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 8 Apr 2014 12:45:47 +0000 (14:45 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 22 Apr 2014 06:41:34 +0000 (08:41 +0200)
commit130cbe3082a1d69e7009b8c1dabb44babedd9269
tree218383fd52fd6565718552818cfd5fa8723c7792
parentc15c0d160c1f64456ed31dc469f0283768cfcf59
pinctrl: st: use gpiolib irqchip helpers

This lets the gpiolib core handle the irqchip set-up and
chained IRQ on the primary (behind the mux) IRQ chip in
the st pinctrl driver.

Default irq type is set to level low at irqchip add time.

The v1 was sent by Linus
(https://lkml.org/lkml/2014/4/4/287).

Two changes were necessary to make it to work properly
on STiH416:
  1 - dev reference was not passed to the gpio_chip
      struct, causing a panic.
  2 - gpiochip_irqchip_add passed IRQ_TYPE_NONE as
      default type, which caused lot of warnings at
      init time. I choose IRQ_TYPE_LEVEL_LOW as default.

Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Maxime COQUELIN <maxime.coquelin@st.com>
drivers/pinctrl/Kconfig
drivers/pinctrl/pinctrl-st.c