Re: Question: pinctrl-backed GPIO set_config and gpio_chip::can_sleep
From: Runyu Xiao
Date: Thu Jun 18 2026 - 11:23:20 EST
Hi,
Thanks for checking this.
I agree that marking these memory-mapped controllers as can_sleep is too
broad if the only sleepable part is the pinctrl range lookup. That would
make consumers treat otherwise MMIO-backed get/set paths as sleepable,
which is not the contract I want to change.
I will hold back the at91-pio4/stm32/sunxi can_sleep series and look at
the pinctrl core direction instead, specifically whether
pinctrldev_list_mutex can be replaced by a non-sleeping lock for
pinctrl_get_device_gpio_range(). That should also line up with the GPIO
direction callback case discussed in the other thread.
Thanks,
Runyu