public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Cc: linux-kernel@vger.kernel.org,
	"'Grant Likely'" <grant.likely@secretlab.ca>,
	toshiharu-linux@dsn.okisemi.com
Subject: Re: Question: GPIO driver how to get irq_base
Date: Thu, 21 Apr 2011 10:09:14 +0200	[thread overview]
Message-ID: <4DAFE62A.105@metafoo.de> (raw)
In-Reply-To: <F9B588C24C5F470494D57D4EFFB14C6B@hacdom.okisemi.com>

On 04/21/2011 09:32 AM, Tomoya MORINAGA wrote:
> Hi GPIO maintainer,
> 
> Need your help.
> I want to add interrupt function to gpio/pch_gpio.c
> 
> According to other upstreamed GPIO driver, (e.g. pl061, langwell, etc...)
> 2 IRQs(irq, irq_base) are used.
> 
> I can get "irq" from (struct pci_dev *)pdev->irq.
> However I can't understand where can I get the "irq_base".
> Let me know how to get.
> 
> Thanks,
> -----------------------------------------
> Tomoya MORINAGA
> OKI SEMICONDUCTOR CO., LTD.

In my opinion the best option for expander chips is to allocate a new irq_desc
range by calling irq_alloc_descs. It will return the first irq number in the
newly allocated range, which will be your irq_base.
But be aware that this will require SPARSE_IRQ to work.

- Lars

  reply	other threads:[~2011-04-21  8:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21  7:32 Question: GPIO driver how to get irq_base Tomoya MORINAGA
2011-04-21  8:09 ` Lars-Peter Clausen [this message]
2011-04-21 13:45   ` Grant Likely
2011-04-21 14:08     ` Lars-Peter Clausen
2011-04-21 14:24       ` Grant Likely
2011-04-22  0:33         ` Tomoya MORINAGA
2011-04-22  1:12         ` Tomoya MORINAGA
2011-04-23 10:14           ` Lars-Peter Clausen
2011-04-25  4:04             ` Tomoya MORINAGA
2011-05-10  5:54               ` Tomoya MORINAGA
2011-05-11 19:20                 ` Lars-Peter Clausen
2011-05-12 12:01                   ` Tomoya MORINAGA
2011-05-12 19:43                     ` Lars-Peter Clausen
2011-05-13  2:40                       ` Tomoya MORINAGA
2011-05-13  3:18                         ` Lars-Peter Clausen
2011-05-13  5:42                           ` Tomoya MORINAGA
2011-05-16 10:38                           ` Tomoya MORINAGA
2011-05-17  2:06                             ` Tomoya MORINAGA

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=4DAFE62A.105@metafoo.de \
    --to=lars@metafoo.de \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomoya-linux@dsn.okisemi.com \
    --cc=toshiharu-linux@dsn.okisemi.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