Re: Question: GPIO direction callbacks calling pinctrl in atomic paths
From: Runyu Xiao
Date: Thu Jun 18 2026 - 11:13:48 EST
Hi,
Thanks for checking.
Thierry, thanks for confirming that Tegra does not currently provide a
gpio_set_direction callback. I agree with your concern: even if removing
the call is technically safe for the current Tegra pinctrl implementation,
it may be conceptually cleaner for the GPIO driver to keep delegating the
direction request to pinctrl.
Linus, yes, the mutex I am hitting is the pinctrl device list mutex taken
while resolving the GPIO range. If that lock can be made non-sleeping as
you suggested in the other thread, then this class of direction-path
warnings should be better handled in the pinctrl core instead of by
removing pinctrl_gpio_direction_*() calls from individual GPIO drivers.
I will hold back the PXA/Tegra driver-local patches for now and first
look at whether the pinctrl core locking change covers this direction
callback case as well.
Thanks,
Runyu