summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-05 16:10:15 +0000
committerLokesh Pathak <lpathak@nvidia.com>2012-03-05 07:56:17 -0800
commit5cbf2fb24232034d211dbcd1c6719bea3930d38f (patch)
treefbd1f6772019520f2a7ea2611f9a7bc4fd5d59fd /drivers
parentfd572265f6e4d795bff9e059fe6fdbf007f1e705 (diff)
regmap: Add irq_base accessor to regmap_irq
Allows devices to discover their own interrupt without having to remember it themselves. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 209a600623cf13a8168b2f6b83643db7825abb9a) Change-Id: I3f70623a25a7f67cf121e3bba764c27f18d4c3dd Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/87574
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/regmap/regmap-irq.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 6b8a74c3ed18..428836fc5835 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -287,3 +287,16 @@ void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
kfree(d);
}
EXPORT_SYMBOL_GPL(regmap_del_irq_chip);
+
+/**
+ * regmap_irq_chip_get_base(): Retrieve interrupt base for a regmap IRQ chip
+ *
+ * Useful for drivers to request their own IRQs.
+ *
+ * @data: regmap_irq controller to operate on.
+ */
+int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data)
+{
+ return data->irq_base;
+}
+EXPORT_SYMBOL_GPL(regmap_irq_chip_get_base);