linux/drivers/pinctrl/qcom
Bartosz Golaszewski ea7a54393d pinctrl: qcom: lpass-lpi: mark the GPIO controller as sleeping
commit ebc18e9854 upstream.

The gpio_chip settings in this driver say the controller can't sleep
but it actually uses a mutex for synchronization. This triggers the
following BUG():

[    9.233659] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:281
[    9.233665] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 554, name: (udev-worker)
[    9.233669] preempt_count: 1, expected: 0
[    9.233673] RCU nest depth: 0, expected: 0
[    9.233688] Tainted: [W]=WARN
[    9.233690] Hardware name: Dell Inc. Latitude 7455/0FK7MX, BIOS 2.10.1 05/20/2025
[    9.233694] Call trace:
[    9.233696]  show_stack+0x24/0x38 (C)
[    9.233709]  dump_stack_lvl+0x40/0x88
[    9.233716]  dump_stack+0x18/0x24
[    9.233722]  __might_resched+0x148/0x160
[    9.233731]  __might_sleep+0x38/0x98
[    9.233736]  mutex_lock+0x30/0xd8
[    9.233749]  lpi_config_set+0x2e8/0x3c8 [pinctrl_lpass_lpi]
[    9.233757]  lpi_gpio_direction_output+0x58/0x90 [pinctrl_lpass_lpi]
[    9.233761]  gpiod_direction_output_raw_commit+0x110/0x428
[    9.233772]  gpiod_direction_output_nonotify+0x234/0x358
[    9.233779]  gpiod_direction_output+0x38/0xd0
[    9.233786]  gpio_shared_proxy_direction_output+0xb8/0x2a8 [gpio_shared_proxy]
[    9.233792]  gpiod_direction_output_raw_commit+0x110/0x428
[    9.233799]  gpiod_direction_output_nonotify+0x234/0x358
[    9.233806]  gpiod_configure_flags+0x2c0/0x580
[    9.233812]  gpiod_find_and_request+0x358/0x4f8
[    9.233819]  gpiod_get_index+0x7c/0x98
[    9.233826]  devm_gpiod_get+0x34/0xb0
[    9.233829]  reset_gpio_probe+0x58/0x128 [reset_gpio]
[    9.233836]  auxiliary_bus_probe+0xb0/0xf0
[    9.233845]  really_probe+0x14c/0x450
[    9.233853]  __driver_probe_device+0xb0/0x188
[    9.233858]  driver_probe_device+0x4c/0x250
[    9.233863]  __driver_attach+0xf8/0x2a0
[    9.233868]  bus_for_each_dev+0xf8/0x158
[    9.233872]  driver_attach+0x30/0x48
[    9.233876]  bus_add_driver+0x158/0x2b8
[    9.233880]  driver_register+0x74/0x118
[    9.233886]  __auxiliary_driver_register+0x94/0xe8
[    9.233893]  init_module+0x34/0xfd0 [reset_gpio]
[    9.233898]  do_one_initcall+0xec/0x300
[    9.233903]  do_init_module+0x64/0x260
[    9.233910]  load_module+0x16c4/0x1900
[    9.233915]  __arm64_sys_finit_module+0x24c/0x378
[    9.233919]  invoke_syscall+0x4c/0xe8
[    9.233925]  el0_svc_common+0x8c/0xf0
[    9.233929]  do_el0_svc+0x28/0x40
[    9.233934]  el0_svc+0x38/0x100
[    9.233938]  el0t_64_sync_handler+0x84/0x130
[    9.233943]  el0t_64_sync+0x17c/0x180

Mark the controller as sleeping.

Fixes: 6e261d1090 ("pinctrl: qcom: Add sm8250 lpass lpi pinctrl driver")
Cc: stable@vger.kernel.org
Reported-by: Val Packett <val@packett.cool>
Closes: https://lore.kernel.org/all/98c0f185-b0e0-49ea-896c-f3972dd011ca@packett.cool/
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-17 16:35:14 +01:00
..
Kconfig pinctrl: qcom: Add SDM660 LPASS LPI TLMM 2025-09-10 15:35:42 +02:00
Kconfig.msm pinctrl: qcom: Add glymur pinctrl driver 2025-09-08 14:56:47 +02:00
Makefile pinctrl: qcom: Add SDM660 LPASS LPI TLMM 2025-09-10 15:35:42 +02:00
pinctrl-apq8064.c pinctrl: qcom: switch to devm_gpiochip_add_data() 2025-06-09 10:16:45 +02:00
pinctrl-apq8084.c pinctrl: qcom: switch to devm_gpiochip_add_data() 2025-06-09 10:16:45 +02:00
pinctrl-glymur.c pinctrl: qcom: glymur: Fix the gpio and egpio pin functions 2025-12-18 14:02:27 +01:00
pinctrl-ipq4019.c pinctrl: qcom: switch to devm_gpiochip_add_data() 2025-06-09 10:16:45 +02:00
pinctrl-ipq5018.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-ipq5332.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-ipq5424.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-ipq6018.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-ipq8064.c pinctrl: qcom: switch to devm_gpiochip_add_data() 2025-06-09 10:16:45 +02:00
pinctrl-ipq8074.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-ipq9574.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-lpass-lpi.c pinctrl: qcom: lpass-lpi: mark the GPIO controller as sleeping 2026-01-17 16:35:14 +01:00
pinctrl-lpass-lpi.h pinctrl: qcom: lpass-lpi: Add ability to use custom pin offsets 2025-09-10 15:35:41 +02:00
pinctrl-mdm9607.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-mdm9615.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-milos.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-msm.c pinctrl: qcom: msm: Fix deadlock in pinmux configuration 2025-11-12 13:41:34 +01:00
pinctrl-msm.h pinctrl: qcom: add infrastructure for marking pin functions as GPIOs 2025-09-08 14:23:07 +02:00
pinctrl-msm8x74.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-msm8226.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-msm8660.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-msm8909.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-msm8916.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-msm8917.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-msm8953.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-msm8960.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-msm8976.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-msm8994.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-msm8996.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-msm8998.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-qcm2290.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-qcs404.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-qcs615.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-qcs8300.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-qdf2xxx.c pinctrl: qcom: switch to devm_gpiochip_add_data() 2025-06-09 10:16:45 +02:00
pinctrl-qdu1000.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sa8775p.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sar2130p.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sc7180.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sc7280-lpass-lpi.c pinctrl: Switch back to struct platform_driver::remove() 2024-10-11 21:45:47 +02:00
pinctrl-sc7280.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sc8180x.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sc8280xp-lpass-lpi.c pinctrl: Switch back to struct platform_driver::remove() 2024-10-11 21:45:47 +02:00
pinctrl-sc8280xp.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sdm660-lpass-lpi.c pinctrl: qcom: Add SDM660 LPASS LPI TLMM 2025-09-10 15:35:42 +02:00
pinctrl-sdm660.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sdm670.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sdm845.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sdx55.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sdx65.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sdx75.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sm4250-lpass-lpi.c pinctrl: Switch back to struct platform_driver::remove() 2024-10-11 21:45:47 +02:00
pinctrl-sm4450.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sm6115-lpass-lpi.c pinctrl: Switch back to struct platform_driver::remove() 2024-10-11 21:45:47 +02:00
pinctrl-sm6115.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sm6125.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sm6350.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sm6375.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sm7150.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sm8150.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sm8250-lpass-lpi.c pinctrl: Switch back to struct platform_driver::remove() 2024-10-11 21:45:47 +02:00
pinctrl-sm8250.c pinctrl: qcom: sm8250: Add egpio support 2025-09-08 14:24:32 +02:00
pinctrl-sm8350-lpass-lpi.c pinctrl: Switch back to struct platform_driver::remove() 2024-10-11 21:45:47 +02:00
pinctrl-sm8350.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sm8450-lpass-lpi.c pinctrl: Switch back to struct platform_driver::remove() 2024-10-11 21:45:47 +02:00
pinctrl-sm8450.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sm8550-lpass-lpi.c pinctrl: Switch back to struct platform_driver::remove() 2024-10-11 21:45:47 +02:00
pinctrl-sm8550.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sm8650-lpass-lpi.c pinctrl: Switch back to struct platform_driver::remove() 2024-10-11 21:45:47 +02:00
pinctrl-sm8650.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-sm8750.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
pinctrl-spmi-gpio.c pinctrl: generic: rename PIN_CONFIG_OUTPUT to LEVEL 2025-09-08 14:24:20 +02:00
pinctrl-spmi-mpp.c pinctrl: generic: rename PIN_CONFIG_OUTPUT to LEVEL 2025-09-08 14:24:20 +02:00
pinctrl-ssbi-gpio.c pinctrl: generic: rename PIN_CONFIG_OUTPUT to LEVEL 2025-09-08 14:24:20 +02:00
pinctrl-ssbi-mpp.c pinctrl: generic: rename PIN_CONFIG_OUTPUT to LEVEL 2025-09-08 14:24:20 +02:00
pinctrl-x1e80100.c pinctrl: qcom: mark the gpio and egpio pins function as non-strict functions 2025-09-08 14:23:15 +02:00
tlmm-test.c pinctrl: qcom: add multi TLMM region option parameter 2025-07-03 23:44:21 +02:00