[PATCH v2] pinctrl: stm32: fix the unit of the hwspinlock timeout

Ju Nan junan76 at 163.com
Sat Aug 29 04:20:02 PDT 2026


> diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c
> index d97057ec2..0d888d30f 100644
> --- a/drivers/pinctrl/stm32/pinctrl-stm32.c
> +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
> @@ -87,7 +87,7 @@
>  #define gpio_range_to_bank(chip) \
>  		container_of(chip, struct stm32_gpio_bank, range)
>  
> -#define HWSPNLCK_TIMEOUT	1000 /* usec */
> +#define HWSPNLCK_TIMEOUT_MS	1
>  
>  static const char * const stm32_gpio_functions[] = {
>  	"gpio", "af0", "af1",
> @@ -633,7 +633,7 @@ static int stm32_gpio_domain_alloc(struct irq_domain *d,
>  
>  	if (pctl->hwlock) {
>  		ret = hwspin_lock_timeout_in_atomic(pctl->hwlock,
> -						    HWSPNLCK_TIMEOUT);
> +						    HWSPNLCK_TIMEOUT_MS);

Please ignore this patch for now, since it has a dependency issue with this one:
https://lore.kernel.org/lkml/4dcb0fb67e12ec6e6aa812e6e93b435704c6105b.camel@foss.st.com/

Thanks Antonio, I will think more about what you said.

Regards,
Ju Nan




More information about the linux-arm-kernel mailing list