pinctrl: stm32: check for IRQ MUX validity during alloc()
authorFabien Dessenne <fabien.dessenne@foss.st.com>
Thu, 17 Jun 2021 14:46:02 +0000 (16:46 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 25 Jun 2021 23:52:35 +0000 (01:52 +0200)
commitdb0f032512443678d30aa26c247099220e3e5aee
tree077f9c110fe32468f2635ea804081a12e0c7061c
parentfa99e7013827858b9cfe43ebe539b9060a7861e8
pinctrl: stm32: check for IRQ MUX validity during alloc()

Considering the following irq_domain_ops call chain:
- .alloc() is called when a clients calls platform_get_irq() or
  gpiod_to_irq()
- .activate() is called next, when the clients calls
  request_threaded_irq()
Check for the IRQ MUX conflict during the first stage (alloc instead of
activate). This avoids to provide the client with an IRQ that can't be
used.

Signed-off-by: Fabien Dessenne <fabien.dessenne@foss.st.com>
Link: https://lore.kernel.org/r/20210617144602.2557619-1-fabien.dessenne@foss.st.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/stm32/pinctrl-stm32.c