pinctrl: mediatek: Fix trigger type setting follow for unexpected interrupt
authorHailong Fan <hailong.fan@mediatek.com>
Mon, 25 Jan 2021 04:17:53 +0000 (12:17 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 15 Feb 2021 04:52:01 +0000 (05:52 +0100)
commitb40b760aa2a9587cdcde62759642b4e99c40dedc
tree834c9bf2dbfc93ab103fc378f6cc56a28c43771e
parent74f2dd447900256e8aa986be868bcd835d3c60d1
pinctrl: mediatek: Fix trigger type setting follow for unexpected interrupt

When flipping the polarity will be generated interrupt under certain
circumstances, but GPIO external signal has not changed.
Then, mask the interrupt before polarity setting, and clear the
unexpected interrupt after trigger type setting completed.

Remove mtk_eint_flip_edge: because mtk_eint_unmask already calls it.

Signed-off-by: Hailong Fan <hailong.fan@mediatek.com>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Link: https://lore.kernel.org/r/20210125041753.2214-1-hailong.fan@mediatek.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/mtk-eint.c