All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Exporting a few bits of irq infrastructure.
Date: Sat, 19 Mar 2011 17:16:23 +0000	[thread overview]
Message-ID: <4D84E4E7.3080108@cam.ac.uk> (raw)

Hi Thomas,

Just a quick enquiry.  Is there a reason to not allow
exporting the symbols handle_simple_irq and irq_to_desc?
Or is it simply a case that there is not normally a reason
for having irq chips registered via modules?

My implementation of what I think you were suggesting the other
day for handling our IIO triggers registers a separate irq
chip for each trigger (currently with a compile time number
of irq's per trigger).  These are allocated from a pool set
up in a boards platform init code. The device drivers can then query to
get the next available irq for a given trigger and request
that.  Some trigggers are entirely instantiated based on
a request form userspace (or should be anyway - see Arnd's observations
on iio-trig-sysfs).  This could be done with a layer of indirection, but
that would be annoyingly fiddly!

Anyhow, right now the patch is dependent on (cut out of a larger patch)

iff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index baa5c4a..eb3d53b 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -487,6 +487,7 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc)
 out_unlock:
 	raw_spin_unlock(&desc->lock);
 }
+EXPORT_SYMBOL_GPL(handle_simple_irq);
 
 /**
  *	handle_level_irq - Level type irq handler
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 282f202..d3765e2 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -109,6 +109,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
 {
 	return radix_tree_lookup(&irq_desc_tree, irq);
 }
+EXPORT_SYMBOL(irq_to_desc);
 
 static void delete_irq_desc(unsigned int irq)
 {
-- 
1.7.3.4


We also need set_irq_flags in arch/arm/kernel/irq.c I think, but for
that I clearly need to also ask the arm guys so lets sort the two above
first.

Thanks,

Jonathan

             reply	other threads:[~2011-03-19 17:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-19 17:16 Jonathan Cameron [this message]
2011-03-25 11:57 ` Exporting a few bits of irq infrastructure Jonathan Cameron

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=4D84E4E7.3080108@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=linux-iio@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.