pinctrl: rockchip: clear int status when driver probed
authorJianqun Xu <jay.xu@rock-chips.com>
Tue, 23 Feb 2021 10:19:37 +0000 (18:19 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 10 Mar 2021 13:41:12 +0000 (14:41 +0100)
Some devices may do gpio interrupt trigger and make an int status before
pinctrl driver probed, then the gpio handler will keep complain untill
the device driver works to stop trigger.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20210223101937.273085-1-jay.xu@rock-chips.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-rockchip.c

index aa1a1c8..ec4cb88 100644 (file)
@@ -3433,6 +3433,7 @@ static int rockchip_interrupts_register(struct platform_device *pdev,
                 * things enabled, so for us that's all masked and all enabled.
                 */
                writel_relaxed(0xffffffff, bank->reg_base + GPIO_INTMASK);
+               writel_relaxed(0xffffffff, bank->reg_base + GPIO_PORTS_EOI);
                writel_relaxed(0xffffffff, bank->reg_base + GPIO_INTEN);
                gc->mask_cache = 0xffffffff;