linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: rockchip: clear int status when driver probed
@ 2021-02-23 10:19 Jianqun Xu
  2021-02-23 10:24 ` Heiko Stübner
  2021-03-02 13:28 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Jianqun Xu @ 2021-02-23 10:19 UTC (permalink / raw)
  To: linus.walleij, heiko; +Cc: linux-gpio, linux-rockchip, Jianqun Xu, Ziyuan Xu

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>
---
 drivers/pinctrl/pinctrl-rockchip.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index aa1a1c850d05..ec4cb88572cf 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -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;
 
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: rockchip: clear int status when driver probed
  2021-02-23 10:19 [PATCH] pinctrl: rockchip: clear int status when driver probed Jianqun Xu
@ 2021-02-23 10:24 ` Heiko Stübner
  2021-03-02 13:28 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stübner @ 2021-02-23 10:24 UTC (permalink / raw)
  To: linus.walleij, Jianqun Xu
  Cc: linux-gpio, linux-rockchip, Jianqun Xu, Ziyuan Xu

Am Dienstag, 23. Februar 2021, 11:19:37 CET schrieb Jianqun Xu:
> 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>

> ---
>  drivers/pinctrl/pinctrl-rockchip.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
> index aa1a1c850d05..ec4cb88572cf 100644
> --- a/drivers/pinctrl/pinctrl-rockchip.c
> +++ b/drivers/pinctrl/pinctrl-rockchip.c
> @@ -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;
>  
> 





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: rockchip: clear int status when driver probed
  2021-02-23 10:19 [PATCH] pinctrl: rockchip: clear int status when driver probed Jianqun Xu
  2021-02-23 10:24 ` Heiko Stübner
@ 2021-03-02 13:28 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2021-03-02 13:28 UTC (permalink / raw)
  To: Jianqun Xu
  Cc: Heiko Stübner, open list:GPIO SUBSYSTEM,
	open list:ARM/Rockchip SoC...,
	Ziyuan Xu

On Tue, Feb 23, 2021 at 11:20 AM Jianqun Xu <jay.xu@rock-chips.com> wrote:

> 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>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-02 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 10:19 [PATCH] pinctrl: rockchip: clear int status when driver probed Jianqun Xu
2021-02-23 10:24 ` Heiko Stübner
2021-03-02 13:28 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).