Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

2020-08-18 Thread Thomas Gleixner
Maulik, On Tue, Aug 18 2020 at 10:05, Maulik Shah wrote: > On 8/14/2020 4:28 AM, Doug Anderson wrote: >> On Thu, Aug 13, 2020 at 3:09 PM Thomas Gleixner wrote: > > + if (chip->flags & IRQCHIP_UNMASK_WAKEUP_ON_SUSPEND) > + unmask_irq(desc); > > I tried this patc

Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

2020-08-17 Thread Maulik Shah
Hi, On 8/14/2020 4:28 AM, Doug Anderson wrote: Hi, On Thu, Aug 13, 2020 at 3:09 PM Thomas Gleixner wrote: Specifically the problem we're trying to address is when an IRQ is marked as "disabled" (driver called disable_irq()) but also marked as "wakeup" (driver called enable_irq_wake()). As pe

Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

2020-08-14 Thread Thomas Gleixner
Doug, On Thu, Aug 13 2020 at 20:04, Doug Anderson wrote: > On Thu, Aug 13, 2020 at 7:07 PM Thomas Gleixner wrote: >>Having a quick and dirty POC for illustration is fine and usually >>useful. > > OK, I will try to remember that, in the future, I should send > questions rather than patches

Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

2020-08-13 Thread Doug Anderson
Hi, On Thu, Aug 13, 2020 at 7:07 PM Thomas Gleixner wrote: > > Doug, > > On Thu, Aug 13 2020 at 15:58, Doug Anderson wrote: > > On Thu, Aug 13, 2020 at 3:09 PM Thomas Gleixner wrote: > >> > * If this interrupt fires while the system is suspended then please > >> > wake the system up. > >> > >> W

Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

2020-08-13 Thread Thomas Gleixner
Doug, On Thu, Aug 13 2020 at 15:58, Doug Anderson wrote: > On Thu, Aug 13, 2020 at 3:09 PM Thomas Gleixner wrote: >> > * If this interrupt fires while the system is suspended then please >> > wake the system up. >> >> Well, that's kinda contradicting itself. If the interrupt is masked then >> wha

Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

2020-08-13 Thread Doug Anderson
Hi, On Thu, Aug 13, 2020 at 3:09 PM Thomas Gleixner wrote: > > > Specifically the problem we're trying to address is when an IRQ is > > marked as "disabled" (driver called disable_irq()) but also marked as > > "wakeup" (driver called enable_irq_wake()). As per my understanding, > > this means: >

Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

2020-08-13 Thread Thomas Gleixner
Doug, On Thu, Aug 13 2020 at 09:09, Doug Anderson wrote: > On Thu, Aug 13, 2020 at 2:29 AM Thomas Gleixner wrote: >> The main point is that these callbacks are specific to generic chip and >> not used anywhere else. > > I'm not sure I understand. This callback is used by drivers that use > gener

Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

2020-08-13 Thread Doug Anderson
Hi, On Thu, Aug 13, 2020 at 2:29 AM Thomas Gleixner wrote: > > Maulik Shah writes: > > From: Douglas Anderson > > > > The "struct irq_chip" has two callbacks in it: irq_suspend() and > > irq_resume(). These two callbacks are interesting because sometimes > > an irq chip needs to know about sus

Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

2020-08-13 Thread Thomas Gleixner
Maulik Shah writes: > From: Douglas Anderson > > The "struct irq_chip" has two callbacks in it: irq_suspend() and > irq_resume(). These two callbacks are interesting because sometimes > an irq chip needs to know about suspend/resume, but they are a bit > awkward because: > 1. They are called onc

Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

2020-08-13 Thread Maulik Shah
Hi, Sure, i will take care these comments in v5. Thanks, Maulik On 8/12/2020 1:39 AM, Doug Anderson wrote: Hi, On Mon, Aug 10, 2020 at 4:21 AM Maulik Shah wrote: From: Douglas Anderson The "struct irq_chip" has two callbacks in it: irq_suspend() and irq_resume(). These two callbacks are

Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

2020-08-11 Thread Doug Anderson
Hi, On Mon, Aug 10, 2020 at 4:21 AM Maulik Shah wrote: > > From: Douglas Anderson > > The "struct irq_chip" has two callbacks in it: irq_suspend() and > irq_resume(). These two callbacks are interesting because sometimes > an irq chip needs to know about suspend/resume, but they are a bit > awk

[PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

2020-08-10 Thread Maulik Shah
From: Douglas Anderson The "struct irq_chip" has two callbacks in it: irq_suspend() and irq_resume(). These two callbacks are interesting because sometimes an irq chip needs to know about suspend/resume, but they are a bit awkward because: 1. They are called once for the whole irq_chip, not once