[PATCH] pinctrl: mediatek: Fix EINT pins input debounce time configuration

Linus Walleij linus.walleij at linaro.org
Mon Nov 14 05:22:54 PST 2022


On Fri, Nov 11, 2022 at 10:41 AM AngeloGioacchino Del Regno
<angelogioacchino.delregno at collabora.com> wrote:

> The External Interrupt Controller (EINTC) on all of the supported
> MediaTek SoCs does support input debouncing, but not all of them
> index the debounce time values (DBNC_SETTING registers) the same way.
>
> Before this change, in some cases, as an example, requesting a debounce
> time of 16 milliseconds would mistakenly set the relative DBNC_SETTING
> register to 0x2, resulting in a way shorter debounce time of 500uS.
>
> To fix the aforementioned issue, define three different debounce_time
> arrays, reflecting the correct register index for each value and for
> each register index variant, and make sure that each SoC pinctrl
> driver uses the right one.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>

Patch applied for v6.1 fixes.

> I know, this commit is a good candidate to get a Fixes tag, but I
> couldn't find a way to actually do that cleanly...

I don't super much care. If you need this backported to stable,
suggest it to linux-stable once it hits Torvalds' tree.

> The only way would be to split this in one commit for each pinctrl
> driver, but that would result in a series containing 21 commits, of
> which 20 are one-liners... and that didn't look right.

Ugh no this is way better.

Thanks for fixing this!

Yours,
Linus Walleij



More information about the Linux-mediatek mailing list