Re: [PATCH v5 4/4] pinctrl: qcom: Don't clear pending interrupts when enabling

2021-01-15 Thread Doug Anderson
Hi, On Fri, Jan 8, 2021 at 4:36 PM Linus Walleij wrote: > > Hi Doug, > > this is an impressive patch. > > We definitely need to touch base with Bjorn on this, preferably also > Sboyd. > > On Fri, Jan 8, 2021 at 6:35 PM Douglas Anderson wrote: > > > Fixes: 4b7618fdc7e6 ("pinctrl: qcom: Add

Re: [PATCH v5 4/4] pinctrl: qcom: Don't clear pending interrupts when enabling

2021-01-14 Thread Stephen Boyd
Quoting Doug Anderson (2021-01-14 09:58:55) > Hi, > > On Wed, Jan 13, 2021 at 11:14 PM Stephen Boyd wrote: > > > > > @@ -195,6 +201,20 @@ static int msm_pinmux_set_mux(struct pinctrl_dev > > > *pctldev, > > > if (WARN_ON(i == g->nfuncs)) > > > return -EINVAL; > > > > > >

Re: [PATCH v5 4/4] pinctrl: qcom: Don't clear pending interrupts when enabling

2021-01-14 Thread Doug Anderson
Hi, On Wed, Jan 13, 2021 at 11:14 PM Stephen Boyd wrote: > > > @@ -195,6 +201,20 @@ static int msm_pinmux_set_mux(struct pinctrl_dev > > *pctldev, > > if (WARN_ON(i == g->nfuncs)) > > return -EINVAL; > > > > + /* > > +* If an GPIO interrupt is setup on this

Re: [PATCH v5 4/4] pinctrl: qcom: Don't clear pending interrupts when enabling

2021-01-14 Thread Doug Anderson
Hi, On Thu, Jan 14, 2021 at 9:15 AM Bjorn Andersson wrote: > > > > @@ -195,6 +201,20 @@ static int msm_pinmux_set_mux(struct pinctrl_dev > > > *pctldev, > > > if (WARN_ON(i == g->nfuncs)) > > > return -EINVAL; > > > > > > + /* > > > +* If an GPIO interrupt

Re: [PATCH v5 4/4] pinctrl: qcom: Don't clear pending interrupts when enabling

2021-01-14 Thread Bjorn Andersson
On Thu 14 Jan 01:14 CST 2021, Stephen Boyd wrote: > Quoting Douglas Anderson (2021-01-08 09:35:16) > > Let's deal with the problem like this: > > * When we mux away, we'll mask our interrupt. This isn't necessary in > > the above case since the client already masked us, but it's a good > >

Re: [PATCH v5 4/4] pinctrl: qcom: Don't clear pending interrupts when enabling

2021-01-14 Thread Bjorn Andersson
On Thu 14 Jan 01:14 CST 2021, Stephen Boyd wrote: > Quoting Douglas Anderson (2021-01-08 09:35:16) > > Let's deal with the problem like this: > > * When we mux away, we'll mask our interrupt. This isn't necessary in > > the above case since the client already masked us, but it's a good > >

Re: [PATCH v5 4/4] pinctrl: qcom: Don't clear pending interrupts when enabling

2021-01-13 Thread Stephen Boyd
Quoting Douglas Anderson (2021-01-08 09:35:16) > Let's deal with the problem like this: > * When we mux away, we'll mask our interrupt. This isn't necessary in > the above case since the client already masked us, but it's a good > idea in general. > * When we mux back will clear any

Re: [PATCH v5 4/4] pinctrl: qcom: Don't clear pending interrupts when enabling

2021-01-11 Thread Maulik Shah
Hi Doug, Thanks for the patch. Looks good to me and tested. Reviewed-by: Maulik Shah Tested-by: Maulik Shah Thanks, Maulik On 1/8/2021 11:05 PM, Douglas Anderson wrote: In Linux, if a driver does disable_irq() and later does enable_irq() on its interrupt, I believe it's expecting these

Re: [PATCH v5 4/4] pinctrl: qcom: Don't clear pending interrupts when enabling

2021-01-08 Thread Linus Walleij
Hi Doug, this is an impressive patch. We definitely need to touch base with Bjorn on this, preferably also Sboyd. On Fri, Jan 8, 2021 at 6:35 PM Douglas Anderson wrote: > Fixes: 4b7618fdc7e6 ("pinctrl: qcom: Add irq_enable callback for msm gpio") > Fixes: 71266d9d3936 ("pinctrl: qcom: Move

[PATCH v5 4/4] pinctrl: qcom: Don't clear pending interrupts when enabling

2021-01-08 Thread Douglas Anderson
In Linux, if a driver does disable_irq() and later does enable_irq() on its interrupt, I believe it's expecting these properties: * If an interrupt was pending when the driver disabled then it will still be pending after the driver re-enables. * If an edge-triggered interrupt comes in while an