From: marc.zyngier@arm•com (Marc Zyngier)
To: linux-arm-kernel@lists•infradead.org
Subject: when to use devm_request_irq and irq_set_chained_handler_and_data
Date: Wed, 07 Oct 2015 16:43:54 +0100 [thread overview]
Message-ID: <56153DBA.9070700@arm.com> (raw)
In-Reply-To: <loom.20151007T172212-792@post.gmane.org>
On 07/10/15 16:29, bharat kumar gogada wrote:
> when to use devm_request_irq and when to use irq_set_chained_handler_and_data.
> I see that some drivers are not using devm_request_irq instead using
> irq_set_chained_handler_and_data for setting up irq handling.
If you're writing code for a driver that is not consuming the interrupt
itself, but demultiplexing and forwarding it to another subsystem by
calling generic_handle_irq() (or something similar), then you must
implement a chained irqchip (as I mentioned yesterday while reviewing
your PCIe controler driver).
> If we use irq_set_chained_handler_and_data will it show up in cat
> /proc/interrupts
No. Because this intermediate irqchip doesn't handle the interrupt, the
final handler is. Otherwise, you'd end up with twice the number of
interrupts...
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2015-10-07 15:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 15:29 when to use devm_request_irq and irq_set_chained_handler_and_data bharat kumar gogada
2015-10-07 15:43 ` Marc Zyngier [this message]
2015-10-07 16:07 ` Bharat Kumar Gogada
2015-10-07 16:27 ` Marc Zyngier
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=56153DBA.9070700@arm.com \
--to=marc.zyngier@arm$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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