Re: [PATCH v1 1/5] pinctrl: intel: Move debounce validation out of the lock
From: Andy Shevchenko
Date: Wed Aug 28 2024 - 15:21:27 EST
On Wed, Aug 28, 2024 at 09:38:34PM +0300, Andy Shevchenko wrote:
> There is no need to validate debounce value under the lock.
> Move it outside.
...
> + if (v) {
> /* Enable glitch filter and debouncer */
> value0 |= PADCFG0_PREGFRXSEL;
> value2 |= v << PADCFG2_DEBOUNCE_SHIFT;
> value2 |= PADCFG2_DEBEN;
This has a bug, I fix it locally for now and will wait for the comments for
the rest of the series.
> + } else {
> + /* Disable glitch filter and debouncer */
> + value0 &= ~PADCFG0_PREGFRXSEL;
> + value2 &= ~(PADCFG2_DEBEN | PADCFG2_DEBOUNCE_MASK);
> }
--
With Best Regards,
Andy Shevchenko