]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: stm32: add lock mechanism for irqmux selection
authorAlexandre Torgue <alexandre.torgue@st.com>
Fri, 10 May 2019 07:43:03 +0000 (09:43 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 24 May 2019 11:25:34 +0000 (13:25 +0200)
commit8eb2dfee9fb1277f635ce369ef8669df0ec421bc
tree5dabf8afdf4745656d165ee7c0a840ad6ef5220d
parenta45623ddd0520d43d16d9943efd3a851d7247e19
pinctrl: stm32: add lock mechanism for irqmux selection

GPIOs are split between several banks (A, B, ...) and each bank can have
up to 16 lines. Those GPIOs could be used as interrupt lines thanks to
exti lines. As there are only 16 exti lines, a mux is used to select which
gpio line is connected to which exti line. Mapping is done as follow:

-A0, B0, C0.. -->exti_line_0 (X0 selected by mux_0)
-A1, B1, C1.. -->exti_line_1 (X1 selected by mux_1)
...

This patch adds a protection to avoid overriding on mux_n for exti_line_n.

Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/stm32/pinctrl-stm32.c