pinctrl: amd: Correct irq-enable readback poll timeout
Subsystems (3)
PATCH 1/1 pinctrl: amd: Correct irq-enable readback poll timeout
On Thinkpad T14s Gen6, I can't wake up from suspend via the power button any longer, and the git bisect pointed to the commit 44c232e80adc ("pinctrl: amd: add timeout to irq-enable readback"). At a short glance this commit looked harmless, but the problem was its timeout value 1000: supposedly it's meant for 1 second, but read_poll_timeout_atomic() takes the argument as usecs, so it's 1 msec -- which is way too short.
Correct the poll timeout to 1 second to fix the regression.
Fixes 44c232e80adc ("pinctrl: amd: add timeout to irq-enable readback")
Signed-off-by Takashi Iwai <[email protected]>
--- drivers/pinctrl/pinctrl-amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-amd.c +1 -1
@@ -581,7 +581,7 @@ static int amd_gpio_irq_set_type(struct irq_data *d, unsigned int type) pin_reg_irq_en &= ~BIT (INTERRUPT_MASK_OFF );writel (pin_reg_irq_en,amd_gpio_pin_reg (gpio_dev, hwirq));if (readl_poll_timeout_atomic (amd_gpio_pin_reg (gpio_dev, hwirq), reg, - (reg & mask) == mask,1 ,1000 )) + (reg & mask) == mask,1 ,1000000 )) ret = -ETIMEDOUT ;writel (pin_reg,amd_gpio_pin_reg (gpio_dev, hwirq));raw_spin_unlock_irqrestore (&gpio_dev->lock, flags);
Signature · 1 line
2.53.0