Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-10 Thread Brian Norris
+ irqchip maintainers [ irqchip is weird -- it's all over drivers/{pinctrl,gpio,irqchip}/ :D ] Hi Doug, On Tue, May 08, 2018 at 10:18:18PM -0700, Doug Anderson wrote: > On Tue, May 8, 2018 at 7:21 PM, JeffyChen wrote: > > On 05/09/2018 03:46 AM, Doug Anderson wrote:

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-10 Thread Brian Norris
+ irqchip maintainers [ irqchip is weird -- it's all over drivers/{pinctrl,gpio,irqchip}/ :D ] Hi Doug, On Tue, May 08, 2018 at 10:18:18PM -0700, Doug Anderson wrote: > On Tue, May 8, 2018 at 7:21 PM, JeffyChen wrote: > > On 05/09/2018 03:46 AM, Doug Anderson wrote: > >> One note is that in

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-09 Thread JeffyChen
Hi Doug, Thanks for your reply :) On 05/09/2018 01:18 PM, Doug Anderson wrote: > > >right, so we now have 2 cases: rockchip_irq_demux/ rockchip_irq_set_type > >if i'm right about the spurious irq(only happen when set rising for a high >gpio, or set falling for a low gpio), then: > >1/

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-09 Thread JeffyChen
Hi Doug, Thanks for your reply :) On 05/09/2018 01:18 PM, Doug Anderson wrote: > > >right, so we now have 2 cases: rockchip_irq_demux/ rockchip_irq_set_type > >if i'm right about the spurious irq(only happen when set rising for a high >gpio, or set falling for a low gpio), then: > >1/

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-08 Thread Doug Anderson
Hi, On Tue, May 8, 2018 at 7:21 PM, JeffyChen wrote: > Hi Doug, > > On 05/09/2018 03:46 AM, Doug Anderson wrote: >> >> One note is that in the case Brian points at (where we need to >> simulate EDGE_BOTH by swapping edges) we purposely ignored the TRM and >> we needed

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-08 Thread Doug Anderson
Hi, On Tue, May 8, 2018 at 7:21 PM, JeffyChen wrote: > Hi Doug, > > On 05/09/2018 03:46 AM, Doug Anderson wrote: >> >> One note is that in the case Brian points at (where we need to >> simulate EDGE_BOTH by swapping edges) we purposely ignored the TRM and >> we needed to do that to avoid losing

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-08 Thread JeffyChen
Hi Doug, On 05/09/2018 03:46 AM, Doug Anderson wrote: One note is that in the case Brian points at (where we need to simulate EDGE_BOTH by swapping edges) we purposely ignored the TRM and we needed to do that to avoid losing interrupts. For details, see commit 53b1bfc76df2 ("pinctrl: rockchip:

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-08 Thread JeffyChen
Hi Doug, On 05/09/2018 03:46 AM, Doug Anderson wrote: One note is that in the case Brian points at (where we need to simulate EDGE_BOTH by swapping edges) we purposely ignored the TRM and we needed to do that to avoid losing interrupts. For details, see commit 53b1bfc76df2 ("pinctrl: rockchip:

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-08 Thread Doug Anderson
Hi, On Mon, May 7, 2018 at 6:56 PM, Brian Norris wrote: > On Tue, May 08, 2018 at 09:36:24AM +0800, Jeffy Chen wrote: >> On 05/08/2018 06:15 AM, Brian Norris wrote: >> > On the other hand...this also implies there may be a race condition >> > there, where we might lose

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-08 Thread Doug Anderson
Hi, On Mon, May 7, 2018 at 6:56 PM, Brian Norris wrote: > On Tue, May 08, 2018 at 09:36:24AM +0800, Jeffy Chen wrote: >> On 05/08/2018 06:15 AM, Brian Norris wrote: >> > On the other hand...this also implies there may be a race condition >> > there, where we might lose an interrupt if there is

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-07 Thread JeffyChen
Hi Brian, On 05/08/2018 10:31 AM, JeffyChen wrote: Hi Brian, On 05/08/2018 09:56 AM, Brian Norris wrote: On Tue, May 08, 2018 at 09:36:24AM +0800, Jeffy Chen wrote: On 05/08/2018 06:15 AM, Brian Norris wrote: On the other hand...this also implies there may be a race condition there, where

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-07 Thread JeffyChen
Hi Brian, On 05/08/2018 10:31 AM, JeffyChen wrote: Hi Brian, On 05/08/2018 09:56 AM, Brian Norris wrote: On Tue, May 08, 2018 at 09:36:24AM +0800, Jeffy Chen wrote: On 05/08/2018 06:15 AM, Brian Norris wrote: On the other hand...this also implies there may be a race condition there, where

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-07 Thread JeffyChen
Hi Brian, On 05/08/2018 09:56 AM, Brian Norris wrote: On Tue, May 08, 2018 at 09:36:24AM +0800, Jeffy Chen wrote: On 05/08/2018 06:15 AM, Brian Norris wrote: On the other hand...this also implies there may be a race condition there, where we might lose an interrupt if there is an edge between

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-07 Thread JeffyChen
Hi Brian, On 05/08/2018 09:56 AM, Brian Norris wrote: On Tue, May 08, 2018 at 09:36:24AM +0800, Jeffy Chen wrote: On 05/08/2018 06:15 AM, Brian Norris wrote: On the other hand...this also implies there may be a race condition there, where we might lose an interrupt if there is an edge between

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-07 Thread Brian Norris
On Tue, May 08, 2018 at 09:36:24AM +0800, Jeffy Chen wrote: > On 05/08/2018 06:15 AM, Brian Norris wrote: > > On the other hand...this also implies there may be a race condition > > there, where we might lose an interrupt if there is an edge between the > > re-configuration of the polarity in

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-07 Thread Brian Norris
On Tue, May 08, 2018 at 09:36:24AM +0800, Jeffy Chen wrote: > On 05/08/2018 06:15 AM, Brian Norris wrote: > > On the other hand...this also implies there may be a race condition > > there, where we might lose an interrupt if there is an edge between the > > re-configuration of the polarity in

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-07 Thread JeffyChen
Hi Brian, On 05/08/2018 06:15 AM, Brian Norris wrote: + Doug Hi Jeffy, On Thu, May 03, 2018 at 02:55:53PM +0800, Jeffy Chen wrote: We saw spurious irq when changing irq's trigger type, for example setting gpio-keys's wakeup irq trigger type. And according to the TRM: "Programming the GPIO

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-07 Thread JeffyChen
Hi Brian, On 05/08/2018 06:15 AM, Brian Norris wrote: + Doug Hi Jeffy, On Thu, May 03, 2018 at 02:55:53PM +0800, Jeffy Chen wrote: We saw spurious irq when changing irq's trigger type, for example setting gpio-keys's wakeup irq trigger type. And according to the TRM: "Programming the GPIO

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-07 Thread Brian Norris
+ Doug Hi Jeffy, On Thu, May 03, 2018 at 02:55:53PM +0800, Jeffy Chen wrote: > We saw spurious irq when changing irq's trigger type, for example > setting gpio-keys's wakeup irq trigger type. > > And according to the TRM: > "Programming the GPIO registers for interrupt capability,

Re: [RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-07 Thread Brian Norris
+ Doug Hi Jeffy, On Thu, May 03, 2018 at 02:55:53PM +0800, Jeffy Chen wrote: > We saw spurious irq when changing irq's trigger type, for example > setting gpio-keys's wakeup irq trigger type. > > And according to the TRM: > "Programming the GPIO registers for interrupt capability,

[RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-03 Thread Jeffy Chen
We saw spurious irq when changing irq's trigger type, for example setting gpio-keys's wakeup irq trigger type. And according to the TRM: "Programming the GPIO registers for interrupt capability, edge-sensitive or level-sensitive interrupts, and interrupt polarity should be completed prior to

[RESEND PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-03 Thread Jeffy Chen
We saw spurious irq when changing irq's trigger type, for example setting gpio-keys's wakeup irq trigger type. And according to the TRM: "Programming the GPIO registers for interrupt capability, edge-sensitive or level-sensitive interrupts, and interrupt polarity should be completed prior to

[PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-03 Thread Jeffy Chen
We saw spurious irq when changing irq's trigger type, for example setting gpio-keys's wakeup irq trigger type. And according to the TRM: "Programming the GPIO registers for interrupt capability, edge-sensitive or level-sensitive interrupts, and interrupt polarity should be completed prior to

[PATCH] pinctrl: rockchip: Disable interrupt when changing it's capability

2018-05-03 Thread Jeffy Chen
We saw spurious irq when changing irq's trigger type, for example setting gpio-keys's wakeup irq trigger type. And according to the TRM: "Programming the GPIO registers for interrupt capability, edge-sensitive or level-sensitive interrupts, and interrupt polarity should be completed prior to