From: Scott Wood <scottwood@freescale.com>
To: Kenny Ho <kho@belairnetworks.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: Question on setting up external interrupt for P1020 (MPC8xxx) with device tree
Date: Fri, 11 Feb 2011 15:56:44 -0600 [thread overview]
Message-ID: <20110211155644.6799f6b6@udp111988uds> (raw)
In-Reply-To: <92C536451C241244A14F3001819BF6688A503B@bnott05.belairnetworks.com>
On Fri, 11 Feb 2011 14:07:26 -0500
Kenny Ho <kho@belairnetworks.com> wrote:
> Hi,
>
>
>
> I am trying to write a device driver that uses an external interrupt
> (one of the 16 irq lines) for the Freescale P1020 processor and I hope
> some of you can help. Am I suppose to setup a separate node in the dts
> and look for that node in my driver to setup the interrupt?
Ideally, yes. It's good to describe your device with a node even if it
doesn't have interrupts.
> Or does the > dts interrupt declaration belong to the interrupt-controller
> declaration? I noticed the mpc8xxx_gpio driver defined its own irq_chip
> but I thought that may be because each gpio pin can trigger an
> interrupt.
Right, it's because gpio is an interrupt controller, not just a user of one.
> Do I need to define my own irq_chip structure for my device
> even if I am using one of the hard irq lines?
No. If the device's node describes the interrupt correctly, you can use
irq_of_parse_and_map() on the device node to get a virtual irq that you can
pass to request_irq().
-Scott
next prev parent reply other threads:[~2011-02-11 21:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 19:07 Question on setting up external interrupt for P1020 (MPC8xxx) with device tree Kenny Ho
2011-02-11 21:56 ` Scott Wood [this message]
2011-02-11 22:15 ` Kenny Ho
2011-02-11 22:19 ` Scott Wood
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=20110211155644.6799f6b6@udp111988uds \
--to=scottwood@freescale.com \
--cc=kho@belairnetworks.com \
--cc=linuxppc-dev@lists.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