linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Marc Zyngier <marc.zyngier@arm.com>,
	"open list:ARM/Amlogic Meson..."
	<linux-amlogic@lists.infradead.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] gpio: about the need to manage irq mapping dynamically.
Date: Fri, 30 Jun 2017 14:54:37 -0500	[thread overview]
Message-ID: <f8495533-b53f-8999-9320-38f18ca7691b@ti.com> (raw)
In-Reply-To: <CACRpkdar9YwnMgLb1y1sP1Vbg-1MgPAOcRPcfNCtmpKuf+g+kQ@mail.gmail.com>



On 06/29/2017 09:16 AM, Linus Walleij wrote:
> On Tue, Jun 27, 2017 at 10:43 PM, Grygorii Strashko
> <grygorii.strashko@ti.com> wrote:
> 
>> And my opinion is still the same here - It should be perfectly valid to create
>> mappings from gpio_to_irq() to handle properly orthogonality of gpiochip and
>> gpio-irqchip functionality and satisfy SPARSE_IRQ goal (allocate Linux virq and
>> irq descriptors on demand).
> 
> You are right.
> 
> I would rather say: GPIO drivers that have a 1-to-1 mapping between GPIO
> lines and IRQs should not do it, they should map up them all at probe().
> 

Sry, can't completely agree here :( There could be 300 (or even thousands)
of gpios and only dozen of them will be used as GPIO IRQ, so statical mapping will
just waste system resources. So, better not define such kind of restrictions -
it seems platform/system specific.

> Drivers that actually have fewer IRQs than GPIO lines should be able to
> create the mappings in gpio_to_irq().

-- 
regards,
-grygorii

  reply	other threads:[~2017-06-30 19:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-15 16:20 [RFC] gpio: about the need to manage irq mapping dynamically Jerome Brunet
2017-06-20  8:39 ` Linus Walleij
2017-06-20 10:26   ` Jerome Brunet
2017-06-20 16:37     ` Linus Walleij
2017-06-20 17:23       ` Jerome Brunet
2017-06-21 20:50         ` Linus Walleij
2017-06-22 14:25           ` Jerome Brunet
2017-06-27 17:49             ` Grygorii Strashko
2017-06-27 18:25               ` Jerome Brunet
2017-06-27 20:43                 ` Grygorii Strashko
2017-06-29 14:16                   ` Linus Walleij
2017-06-30 19:54                     ` Grygorii Strashko [this message]
2017-07-02 15:01                       ` Linus Walleij
2017-06-29 14:14                 ` Linus Walleij
2017-06-29 14:57                   ` Jerome Brunet
2017-06-29 16:53                     ` Marc Zyngier
2017-06-29 18:33                       ` Jerome Brunet
2017-06-29 22:16                     ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f8495533-b53f-8999-9320-38f18ca7691b@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).