Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-10-09 Thread Grygorii Strashko
On 10/09/2017 02:57 PM, Linus Walleij wrote: On Mon, Oct 9, 2017 at 8:10 PM, Grygorii Strashko wrote: At the moment it was merged there were no user of irq_base except gpio-mockup.c. OK I feel calmer. And actually there are shouldn't as calling

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-10-09 Thread Grygorii Strashko
On 10/09/2017 02:57 PM, Linus Walleij wrote: On Mon, Oct 9, 2017 at 8:10 PM, Grygorii Strashko wrote: At the moment it was merged there were no user of irq_base except gpio-mockup.c. OK I feel calmer. And actually there are shouldn't as calling irq_create_mapping() in cycle will not

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-10-09 Thread Linus Walleij
On Mon, Oct 9, 2017 at 8:10 PM, Grygorii Strashko wrote: > At the moment it was merged there were no user of irq_base except > gpio-mockup.c. OK I feel calmer. > And actually there are shouldn't as calling irq_create_mapping() in cycle > will not guarantee sequential

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-10-09 Thread Linus Walleij
On Mon, Oct 9, 2017 at 8:10 PM, Grygorii Strashko wrote: > At the moment it was merged there were no user of irq_base except > gpio-mockup.c. OK I feel calmer. > And actually there are shouldn't as calling irq_create_mapping() in cycle > will not guarantee sequential Linux IRQ numbers

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-10-09 Thread Grygorii Strashko
On 10/07/2017 07:27 PM, Linus Walleij wrote: > On Thu, Sep 28, 2017 at 10:33 AM, Mika Westerberg > wrote: >> On Fri, Jul 21, 2017 at 11:49:00AM -0500, Grygorii Strashko wrote: >>> Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in >>>

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-10-09 Thread Grygorii Strashko
On 10/07/2017 07:27 PM, Linus Walleij wrote: > On Thu, Sep 28, 2017 at 10:33 AM, Mika Westerberg > wrote: >> On Fri, Jul 21, 2017 at 11:49:00AM -0500, Grygorii Strashko wrote: >>> Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in >>> gpiochip_irqchip_add_key() which

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-10-07 Thread Linus Walleij
On Thu, Sep 28, 2017 at 10:33 AM, Mika Westerberg wrote: > On Fri, Jul 21, 2017 at 11:49:00AM -0500, Grygorii Strashko wrote: >> Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in >> gpiochip_irqchip_add_key() which goes against the idea of

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-10-07 Thread Linus Walleij
On Thu, Sep 28, 2017 at 10:33 AM, Mika Westerberg wrote: > On Fri, Jul 21, 2017 at 11:49:00AM -0500, Grygorii Strashko wrote: >> Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in >> gpiochip_irqchip_add_key() which goes against the idea of SPARSE_IRQ and, >> as result,

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-10-05 Thread Marc Zyngier
On 21/09/17 12:41, Linus Walleij wrote: > On Fri, Sep 15, 2017 at 10:26 AM, Jerome Brunet wrote: > >> I initially planned to do some refcounting in the gpio layer but that would >> make >> no sense, as you pointed out, the irq could be shared. This refcounting would >>

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-10-05 Thread Marc Zyngier
On 21/09/17 12:41, Linus Walleij wrote: > On Fri, Sep 15, 2017 at 10:26 AM, Jerome Brunet wrote: > >> I initially planned to do some refcounting in the gpio layer but that would >> make >> no sense, as you pointed out, the irq could be shared. This refcounting would >> only make sense at the

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-09-28 Thread Mika Westerberg
On Thu, Sep 28, 2017 at 09:02:12AM -0500, Grygorii Strashko wrote: > > > On 09/28/2017 03:33 AM, Mika Westerberg wrote: > > On Fri, Jul 21, 2017 at 11:49:00AM -0500, Grygorii Strashko wrote: > >> Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in > >>

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-09-28 Thread Mika Westerberg
On Thu, Sep 28, 2017 at 09:02:12AM -0500, Grygorii Strashko wrote: > > > On 09/28/2017 03:33 AM, Mika Westerberg wrote: > > On Fri, Jul 21, 2017 at 11:49:00AM -0500, Grygorii Strashko wrote: > >> Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in > >>

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-09-28 Thread Grygorii Strashko
On 09/28/2017 03:33 AM, Mika Westerberg wrote: > On Fri, Jul 21, 2017 at 11:49:00AM -0500, Grygorii Strashko wrote: >> Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in >> gpiochip_irqchip_add_key() which goes against the idea of SPARSE_IRQ and, >> as result, leads to:

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-09-28 Thread Grygorii Strashko
On 09/28/2017 03:33 AM, Mika Westerberg wrote: > On Fri, Jul 21, 2017 at 11:49:00AM -0500, Grygorii Strashko wrote: >> Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in >> gpiochip_irqchip_add_key() which goes against the idea of SPARSE_IRQ and, >> as result, leads to:

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-09-28 Thread Mika Westerberg
On Fri, Jul 21, 2017 at 11:49:00AM -0500, Grygorii Strashko wrote: > Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in > gpiochip_irqchip_add_key() which goes against the idea of SPARSE_IRQ and, > as result, leads to: > - increasing of memory consumption for IRQ

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-09-28 Thread Mika Westerberg
On Fri, Jul 21, 2017 at 11:49:00AM -0500, Grygorii Strashko wrote: > Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in > gpiochip_irqchip_add_key() which goes against the idea of SPARSE_IRQ and, > as result, leads to: > - increasing of memory consumption for IRQ

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-09-21 Thread Linus Walleij
On Fri, Sep 15, 2017 at 10:26 AM, Jerome Brunet wrote: > I initially planned to do some refcounting in the gpio layer but that would > make > no sense, as you pointed out, the irq could be shared. This refcounting would > only make sense at the irq level. > > On a more

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-09-21 Thread Linus Walleij
On Fri, Sep 15, 2017 at 10:26 AM, Jerome Brunet wrote: > I initially planned to do some refcounting in the gpio layer but that would > make > no sense, as you pointed out, the irq could be shared. This refcounting would > only make sense at the irq level. > > On a more general note, I wonder

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-09-15 Thread Jerome Brunet
On Tue, 2017-08-01 at 13:27 -0500, Grygorii Strashko wrote: > > On 08/01/2017 03:03 AM, Jerome Brunet wrote: > > On Tue, 2017-08-01 at 09:52 +0200, Linus Walleij wrote: > > > On Fri, Jul 21, 2017 at 6:49 PM, Grygorii Strashko > > > wrote: > > > > > > > Now IRQ mappings

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-09-15 Thread Jerome Brunet
On Tue, 2017-08-01 at 13:27 -0500, Grygorii Strashko wrote: > > On 08/01/2017 03:03 AM, Jerome Brunet wrote: > > On Tue, 2017-08-01 at 09:52 +0200, Linus Walleij wrote: > > > On Fri, Jul 21, 2017 at 6:49 PM, Grygorii Strashko > > > wrote: > > > > > > > Now IRQ mappings are always created for

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-08-01 Thread Grygorii Strashko
On 08/01/2017 03:03 AM, Jerome Brunet wrote: > On Tue, 2017-08-01 at 09:52 +0200, Linus Walleij wrote: >> On Fri, Jul 21, 2017 at 6:49 PM, Grygorii Strashko >> wrote: >> >>> Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in >>>

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-08-01 Thread Grygorii Strashko
On 08/01/2017 03:03 AM, Jerome Brunet wrote: > On Tue, 2017-08-01 at 09:52 +0200, Linus Walleij wrote: >> On Fri, Jul 21, 2017 at 6:49 PM, Grygorii Strashko >> wrote: >> >>> Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in >>> gpiochip_irqchip_add_key() which goes

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-08-01 Thread Bartosz Golaszewski
2017-08-01 9:52 GMT+02:00 Linus Walleij : > > Applied this rather than v1. > > But maybe we should get rid of ->irq_base from gpio-mockup.c > and delete it, as the base is irqchip-internal. > > Bartosz what do you say? Do we need this in the mockup? > > Yours, > Linus

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-08-01 Thread Bartosz Golaszewski
2017-08-01 9:52 GMT+02:00 Linus Walleij : > > Applied this rather than v1. > > But maybe we should get rid of ->irq_base from gpio-mockup.c > and delete it, as the base is irqchip-internal. > > Bartosz what do you say? Do we need this in the mockup? > > Yours, > Linus Walleij Hi Linus, a while

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-08-01 Thread Jerome Brunet
On Tue, 2017-08-01 at 09:52 +0200, Linus Walleij wrote: > On Fri, Jul 21, 2017 at 6:49 PM, Grygorii Strashko > wrote: > > > Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in > > gpiochip_irqchip_add_key() which goes against the idea of

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-08-01 Thread Jerome Brunet
On Tue, 2017-08-01 at 09:52 +0200, Linus Walleij wrote: > On Fri, Jul 21, 2017 at 6:49 PM, Grygorii Strashko > wrote: > > > Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in > > gpiochip_irqchip_add_key() which goes against the idea of SPARSE_IRQ and, > > as result,

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-08-01 Thread Linus Walleij
On Fri, Jul 21, 2017 at 6:49 PM, Grygorii Strashko wrote: > Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in > gpiochip_irqchip_add_key() which goes against the idea of SPARSE_IRQ and, > as result, leads to: > - increasing of memory

Re: [RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-08-01 Thread Linus Walleij
On Fri, Jul 21, 2017 at 6:49 PM, Grygorii Strashko wrote: > Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in > gpiochip_irqchip_add_key() which goes against the idea of SPARSE_IRQ and, > as result, leads to: > - increasing of memory consumption for IRQ descriptors most

[RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-07-21 Thread Grygorii Strashko
Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in gpiochip_irqchip_add_key() which goes against the idea of SPARSE_IRQ and, as result, leads to: - increasing of memory consumption for IRQ descriptors most of which will never ever be used (espessially on platform with a

[RFT PATCH v2] gpiolib: allow gpio irqchip to map irqs dynamically

2017-07-21 Thread Grygorii Strashko
Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in gpiochip_irqchip_add_key() which goes against the idea of SPARSE_IRQ and, as result, leads to: - increasing of memory consumption for IRQ descriptors most of which will never ever be used (espessially on platform with a