]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: uniphier: set legitimate irq trigger type in .to_irq hook
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 14 Jun 2018 05:27:45 +0000 (14:27 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 23 Jul 2018 21:13:31 +0000 (23:13 +0200)
commit50cbf14f562b348df076e5cedb434368dcf6e7e7
treed8f6d4c740b1ea3c9deb73886df45902a1c8cf38
parentb2168810b46fde07642a2cb94b40d08b9951eab0
gpio: uniphier: set legitimate irq trigger type in .to_irq hook

If a GPIO chip is a part of a hierarchy IRQ domain, there is no
way to specify the trigger type when gpio(d)_to_irq() allocates an
interrupt on-the-fly.

Currently, uniphier_gpio_to_irq() sets IRQ_TYPE_NONE, but it causes
an error in the .alloc() hook of the parent domain.
(drivers/irq/irq-uniphier-aidet.c)

Even if we change irq-uniphier-aidet.c to accept the NONE type,
GIC complains about it since commit 84afc849b2fe ("irqchip/gic:
Loudly complain about the use of IRQ_TYPE_NONE").

Instead, use IRQ_TYPE_LEVEL_HIGH as a temporary value when an irq
is allocated.  irq_set_irq_type() will override it when the irq is
really requested.

Fixes: 4c87d5c227b8 ("gpio: uniphier: add UniPhier GPIO controller driver")
Reported-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-uniphier.c