summaryrefslogtreecommitdiff
path: root/include/linux/irq_sim.h
diff options
context:
space:
mode:
authorBartosz Golaszewski <brgl@bgdev.pl>2017-08-14 16:53:17 +0200
committerThomas Gleixner <tglx@linutronix.de>2017-08-16 16:40:02 +0200
commit44e72c7ebf294043cfe276f7328b8c0e6a3e50e9 (patch)
tree3e481d86d3c8c42c5ac5485b5dfe3ade12339c64 /include/linux/irq_sim.h
parentb19af510e67e6ca696b8721f45c148119437307c (diff)
genirq/irq_sim: Add a devres variant of irq_sim_init()
Add a resource managed version of irq_sim_init(). This can be conveniently used in device drivers. Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: linux-doc@vger.kernel.org Cc: linux-gpio@vger.kernel.org Cc: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> Cc: Jonathan Cameron <jic23@kernel.org> Link: http://lkml.kernel.org/r/20170814145318.6495-3-brgl@bgdev.pl Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irq_sim.h')
-rw-r--r--include/linux/irq_sim.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/irq_sim.h b/include/linux/irq_sim.h
index 39ce57bfa995..0380d899b955 100644
--- a/include/linux/irq_sim.h
+++ b/include/linux/irq_sim.h
@@ -10,6 +10,7 @@
*/
#include <linux/irq_work.h>
+#include <linux/device.h>
/*
* Provides a framework for allocating simulated interrupts which can be
@@ -34,6 +35,8 @@ struct irq_sim {
};
int irq_sim_init(struct irq_sim *sim, unsigned int num_irqs);
+int devm_irq_sim_init(struct device *dev, struct irq_sim *sim,
+ unsigned int num_irqs);
void irq_sim_fini(struct irq_sim *sim);
void irq_sim_fire(struct irq_sim *sim, unsigned int offset);
int irq_sim_irqnum(struct irq_sim *sim, unsigned int offset);