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 83a86fbb5b56 ("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: dbe776c2ca54 ("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>

authored by Masahiro Yamada and committed by Linus Walleij bbfbf04c 906402a4

Changed files
+5 -1
drivers
+5 -1
drivers/gpio/gpio-uniphier.c
··· 181 181 fwspec.fwnode = of_node_to_fwnode(chip->parent->of_node); 182 182 fwspec.param_count = 2; 183 183 fwspec.param[0] = offset - UNIPHIER_GPIO_IRQ_OFFSET; 184 - fwspec.param[1] = IRQ_TYPE_NONE; 184 + /* 185 + * IRQ_TYPE_NONE is rejected by the parent irq domain. Set LEVEL_HIGH 186 + * temporarily. Anyway, ->irq_set_type() will override it later. 187 + */ 188 + fwspec.param[1] = IRQ_TYPE_LEVEL_HIGH; 185 189 186 190 return irq_create_fwspec_mapping(&fwspec); 187 191 }