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

From: Ju Nan

Date: Sat Aug 29 2026 - 07:21:06 EST



> 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@xxxxxxxxxxx/

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

Regards,
Ju Nan