From 4c0f83924de62b56e4c34712ab297a9df6212b10 Mon Sep 17 00:00:00 2001 From: Ahnaf Shahriar Date: Mon, 24 Aug 2026 14:54:47 -0400 Subject: [PATCH] drivers: modem: cellular: select GPIO modem_cellular_init() unconditionally calls gpio_pin_configure_dt() for the wake, power, reset and ring GPIOs of the modem, and the bindings mark mdm-power-gpios and mdm-reset-gpios as required. MODEM_CELLULAR however only selects the modem modules, PPP, CMUX, CHAT, the UART backend and the ring buffer, not GPIO. CONFIG_GPIO has no default, so an application that does not enable it explicitly still builds. samples/net/cellular_modem is such an application: configuring it for b_u585i_iot02a leaves CONFIG_GPIO unset in the resulting .config. The GPIO driver is then not built, the gpio_dt_spec device pointers reference a device with no API, and the first gpio_pin_configure_dt() call in the driver's init function faults before the modem is ever powered on. Select GPIO from MODEM_CELLULAR, the same way the driver already selects everything else it calls into. This matches how other drivers that dereference a GPIO unconditionally handle the dependency. Signed-off-by: Ahnaf Shahriar --- drivers/modem/Kconfig.cellular | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/modem/Kconfig.cellular b/drivers/modem/Kconfig.cellular index 0c0f8ce8a056..6aff7f8fb152 100644 --- a/drivers/modem/Kconfig.cellular +++ b/drivers/modem/Kconfig.cellular @@ -10,6 +10,7 @@ config MODEM_CELLULAR select MODEM_PIPE select MODEM_PIPELINK select MODEM_BACKEND_UART + select GPIO select UART_USE_RUNTIME_CONFIGURE select RING_BUFFER select NET_L2_PPP_OPTION_MRU