linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: arieswar24b@yahoo.de
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Interrupt GPIOs with MPC5200b
Date: Fri, 6 Mar 2009 08:18:21 -0700	[thread overview]
Message-ID: <fa686aa40903060718q1197cdbfja1bb639af761daf4@mail.gmail.com> (raw)
In-Reply-To: <538696.45538.qm@web24106.mail.ird.yahoo.com>

On Fri, Mar 6, 2009 at 6:27 AM, Dave Best <arieswar24b@yahoo.de> wrote:
>
> Hi, I am working on a MPC5200B-tiny with 2.6.23.1 Linux (pcm030).
>
> I want to use an interrupt GPIO to act as the source for my ISR, but i can't find the IRQ numbers for the GPIOs so i can't call request_irq() to set my ISR up.
>
> For other platforms there seems to be the function gpio_to_irq() where enumerated GPIOs get an IRQ number for their request_irq calls.

Which GPIO line are you using?  Is it on the gpio_simple block?
gpio_wkup?  or one of the GPT lines?

There is support in Ben Herrenschmidt's -next tree to use the GPT as
an interrupt controller.  A similar patch for the mpc52xx_gpio driver
would be fairly easy to do.  That would allow you to simply specify
the GPIO controller as the interrupt controller in the device tree and
get your IRQ number with a single call to of_irq_parse_and_map().  It
also allows each GPIO line to be assigned an independent IRQ number
and be enabled/acked independently from the others and for the
enable/ack code to live with the mpc52xx-gpio driver where it belongs.

See here for the GPT patch.  You can use it as an example to do the
same for the gpio driver.

http://patchwork.ozlabs.org/patch/21914/

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

      reply	other threads:[~2009-03-06 15:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-06 13:27 Interrupt GPIOs with MPC5200b Dave Best
2009-03-06 15:18 ` Grant Likely [this message]

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=fa686aa40903060718q1197cdbfja1bb639af761daf4@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=arieswar24b@yahoo.de \
    --cc=linuxppc-dev@ozlabs.org \
    /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).