Skip to content

Commit a73fdfb

Browse files
ananglde-nordic
authored andcommitted
[nrf fromlist] drivers: pinctrl_nrf: Add missing break statements
This is a follow-up to commit fd76331. For some reason the above commit added several switch cases without required break statements. In effect, the same pin could get assigned to multiple signal lines in QDEC or QSPI peripherals if not all pins were defined for them in devicetree, and consequently these peripherals could not work properly. Upstream PR: zephyrproject-rtos/zephyr#45439. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
1 parent 275ae78 commit a73fdfb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/pinctrl/pinctrl_nrf.c

+4
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
274274
NRF_PSEL_QDEC(reg, B) = NRF_GET_PIN(pins[i]);
275275
nrf_pin_configure(pins[i], NRF_GPIO_PIN_DIR_INPUT,
276276
NRF_GPIO_PIN_INPUT_CONNECT);
277+
break;
277278
case NRF_FUN_QDEC_LED:
278279
NRF_PSEL_QDEC(reg, LED) = NRF_GET_PIN(pins[i]);
279280
nrf_pin_configure(pins[i], NRF_GPIO_PIN_DIR_INPUT,
@@ -295,14 +296,17 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
295296
NRF_PSEL_QSPI(reg, IO0) = NRF_GET_PIN(pins[i]);
296297
nrf_pin_configure(pins[i], NRF_GPIO_PIN_DIR_INPUT,
297298
NRF_GPIO_PIN_INPUT_DISCONNECT);
299+
break;
298300
case NRF_FUN_QSPI_IO1:
299301
NRF_PSEL_QSPI(reg, IO1) = NRF_GET_PIN(pins[i]);
300302
nrf_pin_configure(pins[i], NRF_GPIO_PIN_DIR_INPUT,
301303
NRF_GPIO_PIN_INPUT_DISCONNECT);
304+
break;
302305
case NRF_FUN_QSPI_IO2:
303306
NRF_PSEL_QSPI(reg, IO2) = NRF_GET_PIN(pins[i]);
304307
nrf_pin_configure(pins[i], NRF_GPIO_PIN_DIR_INPUT,
305308
NRF_GPIO_PIN_INPUT_DISCONNECT);
309+
break;
306310
case NRF_FUN_QSPI_IO3:
307311
NRF_PSEL_QSPI(reg, IO3) = NRF_GET_PIN(pins[i]);
308312
nrf_pin_configure(pins[i], NRF_GPIO_PIN_DIR_INPUT,

0 commit comments

Comments
 (0)