Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-03-19 Thread Grygorii Strashko
On 02/05/2016 04:37 PM, Linus Walleij wrote: > On Thu, Jan 21, 2016 at 8:51 PM, Thomas Gleixner wrote: > >> So as long as an interrupt handler is installed, there is no sane way that we >> can decide to power down the irq chip, unless that chip has the magic ability >> to

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-03-19 Thread Grygorii Strashko
On 02/05/2016 04:37 PM, Linus Walleij wrote: > On Thu, Jan 21, 2016 at 8:51 PM, Thomas Gleixner wrote: > >> So as long as an interrupt handler is installed, there is no sane way that we >> can decide to power down the irq chip, unless that chip has the magic ability >> to relay incoming

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-02-05 Thread Linus Walleij
On Thu, Jan 21, 2016 at 8:51 PM, Thomas Gleixner wrote: > So as long as an interrupt handler is installed, there is no sane way that we > can decide to power down the irq chip, unless that chip has the magic ability > to relay incoming interrupts while powered down :) Actually isn't that

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-02-05 Thread Linus Walleij
On Thu, Jan 21, 2016 at 8:51 PM, Thomas Gleixner wrote: > So as long as an interrupt handler is installed, there is no sane way that we > can decide to power down the irq chip, unless that chip has the magic ability > to relay incoming interrupts while powered down :)

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-01-26 Thread Thomas Gleixner
On Fri, 22 Jan 2016, Ulf Hansson wrote: > Here's a small collection of drivers that I easily picked up as > candidates for using these new APIs. > In principle, they would invoke these new APIs from their runtime PM > callbacks. > > drivers/spi/spi-atmel.c > drivers/spi/spi-pl022.c >

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-01-26 Thread Thomas Gleixner
On Fri, 22 Jan 2016, Ulf Hansson wrote: > Here's a small collection of drivers that I easily picked up as > candidates for using these new APIs. > In principle, they would invoke these new APIs from their runtime PM > callbacks. > > drivers/spi/spi-atmel.c > drivers/spi/spi-pl022.c >

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-01-22 Thread Ulf Hansson
On 21 January 2016 at 20:51, Thomas Gleixner wrote: > On Thu, 21 Jan 2016, Ulf Hansson wrote: >> >> > I don't think using __free_irq() is the correct place to decrease the >> >> > runtime PM usage count. It will keep the irqchip runtime resumed even >> >> > if there are no irqs enabled for it. >>

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-01-22 Thread Ulf Hansson
On 21 January 2016 at 20:51, Thomas Gleixner wrote: > On Thu, 21 Jan 2016, Ulf Hansson wrote: >> >> > I don't think using __free_irq() is the correct place to decrease the >> >> > runtime PM usage count. It will keep the irqchip runtime resumed even >> >> > if there are no

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-01-21 Thread Thomas Gleixner
On Thu, 21 Jan 2016, Ulf Hansson wrote: > >> > I don't think using __free_irq() is the correct place to decrease the > >> > runtime PM usage count. It will keep the irqchip runtime resumed even > >> > if there are no irqs enabled for it. > >> > > >> > Instead I would rather allow the irqchip to be

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-01-21 Thread Ulf Hansson
[...] >> > I don't think using __free_irq() is the correct place to decrease the >> > runtime PM usage count. It will keep the irqchip runtime resumed even >> > if there are no irqs enabled for it. >> > >> > Instead I would rather allow the irqchip to be runtime suspended, when >> > there are no

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-01-21 Thread Jon Hunter
On 20/01/16 15:30, Thomas Gleixner wrote: > On Tue, 19 Jan 2016, Jon Hunter wrote: >> On 18/01/16 14:47, Ulf Hansson wrote: +/* Inline functions for support of irq chips that require runtime pm */ +static inline int chip_pm_get(struct irq_desc *desc) >>> >>> Why does these new get/put

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-01-21 Thread Ulf Hansson
[...] >> > I don't think using __free_irq() is the correct place to decrease the >> > runtime PM usage count. It will keep the irqchip runtime resumed even >> > if there are no irqs enabled for it. >> > >> > Instead I would rather allow the irqchip to be runtime suspended, when >> > there are no

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-01-21 Thread Jon Hunter
On 20/01/16 15:30, Thomas Gleixner wrote: > On Tue, 19 Jan 2016, Jon Hunter wrote: >> On 18/01/16 14:47, Ulf Hansson wrote: +/* Inline functions for support of irq chips that require runtime pm */ +static inline int chip_pm_get(struct irq_desc *desc) >>> >>> Why does these new get/put

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-01-21 Thread Thomas Gleixner
On Thu, 21 Jan 2016, Ulf Hansson wrote: > >> > I don't think using __free_irq() is the correct place to decrease the > >> > runtime PM usage count. It will keep the irqchip runtime resumed even > >> > if there are no irqs enabled for it. > >> > > >> > Instead I would rather allow the irqchip to be

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-01-20 Thread Thomas Gleixner
On Tue, 19 Jan 2016, Jon Hunter wrote: > On 18/01/16 14:47, Ulf Hansson wrote: > >> +/* Inline functions for support of irq chips that require runtime pm */ > >> +static inline int chip_pm_get(struct irq_desc *desc) > > > > Why does these new get/put functions need to be inline functions and > >

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2016-01-20 Thread Thomas Gleixner
On Tue, 19 Jan 2016, Jon Hunter wrote: > On 18/01/16 14:47, Ulf Hansson wrote: > >> +/* Inline functions for support of irq chips that require runtime pm */ > >> +static inline int chip_pm_get(struct irq_desc *desc) > > > > Why does these new get/put functions need to be inline functions and > >

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2015-12-18 Thread Jon Hunter
On 17/12/15 13:19, Linus Walleij wrote: > On Thu, Dec 17, 2015 at 11:48 AM, Jon Hunter wrote: > > (Adding Rafael and linux-pm to To: list) > >> Some IRQ chips may be located in a power domain outside of the CPU >> subsystem and hence will require device specific runtime power management. >>

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2015-12-18 Thread Jon Hunter
On 17/12/15 13:19, Linus Walleij wrote: > On Thu, Dec 17, 2015 at 11:48 AM, Jon Hunter wrote: > > (Adding Rafael and linux-pm to To: list) > >> Some IRQ chips may be located in a power domain outside of the CPU >> subsystem and hence will require device specific runtime

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2015-12-17 Thread Linus Walleij
On Thu, Dec 17, 2015 at 11:48 AM, Jon Hunter wrote: (Adding Rafael and linux-pm to To: list) > Some IRQ chips may be located in a power domain outside of the CPU > subsystem and hence will require device specific runtime power management. > In order to support such IRQ chips, add a pointer for

[RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2015-12-17 Thread Jon Hunter
Some IRQ chips may be located in a power domain outside of the CPU subsystem and hence will require device specific runtime power management. In order to support such IRQ chips, add a pointer for a device structure to the irq_chip structure, and if this pointer is populated by the IRQ chip driver

Re: [RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2015-12-17 Thread Linus Walleij
On Thu, Dec 17, 2015 at 11:48 AM, Jon Hunter wrote: (Adding Rafael and linux-pm to To: list) > Some IRQ chips may be located in a power domain outside of the CPU > subsystem and hence will require device specific runtime power management. > In order to support such IRQ

[RFC PATCH V2 3/8] genirq: Add runtime power management support for IRQ chips

2015-12-17 Thread Jon Hunter
Some IRQ chips may be located in a power domain outside of the CPU subsystem and hence will require device specific runtime power management. In order to support such IRQ chips, add a pointer for a device structure to the irq_chip structure, and if this pointer is populated by the IRQ chip driver