zephyr/drivers/pinctrl
Andrzej Głąbek 3fed0510a6 drivers: pinctrl_nrf: Fix disconnecting of pins
This is a follow-up to commit 223cc3c6bd.

When a peripheral pin is disconnected, the pinctrl driver should skip
applying of GPIO configuration, as there is no pin number available in
such case, but due to an incorrect check, it actually did not skip it
and used an incorrect pin number for that. In nrfx prior to 3.0.0, this
caused an assertion failure, but because of a fallback routine, things
could still work in most cases (when assertions were disabled) as that
GPIO configuration was just applied to P0.31. Hence the bug was not
discovered until now. In the recent nrfx, this causes a null pointer
dereference, so always a crash.
This commit corrects the mentioned check and also uses the term "psel"
instead of "pin" where it is possible that the value is not a correct
pin number, in the hope of preventing a similar problem in the future.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-05-22 12:02:45 +02:00
..
CMakeLists.txt
Kconfig
Kconfig.b91
Kconfig.cc13xx_cc26xx
Kconfig.esp32
Kconfig.gd32
Kconfig.gecko
Kconfig.ifx_cat1
Kconfig.imx
Kconfig.it8xxx2
Kconfig.kinetis
Kconfig.lpc_iocon
Kconfig.npcx
Kconfig.nrf
Kconfig.numicro
Kconfig.nxp_s32
Kconfig.rcar
Kconfig.rpi_pico
Kconfig.rv32m1
Kconfig.sam
Kconfig.sam0
Kconfig.sifive
Kconfig.smartbond
Kconfig.stm32
Kconfig.ti_k3
Kconfig.xec
Kconfig.xlnx
Kconfig.xmc4xxx
common.c
pfc_rcar.c
pinctrl_b91.c
pinctrl_cc13xx_cc26xx.c
pinctrl_esp32.c
pinctrl_gd32_af.c
pinctrl_gd32_afio.c
pinctrl_gecko.c
pinctrl_ifx_cat1.c
pinctrl_imx.c drivers: pinctrl: imx: Use sys_write32 function 2023-05-03 17:01:24 -05:00
pinctrl_ite_it8xxx2.c
pinctrl_kinetis.c
pinctrl_lpc_iocon.c
pinctrl_mchp_xec.c drivers: pinctrl: Microchip XEC PINCTRL glitch fix 2023-05-16 18:52:44 -04:00
pinctrl_npcx.c
pinctrl_nrf.c drivers: pinctrl_nrf: Fix disconnecting of pins 2023-05-22 12:02:45 +02:00
pinctrl_numicro.c
pinctrl_nxp_s32.c
pinctrl_rpi_pico.c
pinctrl_rv32m1.c
pinctrl_sam.c
pinctrl_sam0.c
pinctrl_sifive.c
pinctrl_smartbond.c drivers: spi: Add driver for smartbond 2023-04-20 10:32:40 +02:00
pinctrl_stm32.c
pinctrl_ti_k3.c
pinctrl_xlnx_zynq.c
pinctrl_xmc4xxx.c