diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2012-11-20 12:20:47 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-11-20 12:20:47 +0100 |
commit | ea2590e24364a5d153464d443aa25347e5d17695 (patch) | |
tree | 45d9b828954f3e27e5416d12d8405485c4bf4671 /drivers/base | |
parent | fe39f2f4dc8481d3aa4561ba649b0c0a4429a49e (diff) | |
parent | 90f790d2dc96f5a61855ae65b90e30c40c893a20 (diff) |
Merge tag 'topic/domain' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into for-next
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap-irq.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index 5b6b1d8e6cc..5972ad95854 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -458,3 +458,22 @@ int regmap_irq_get_virq(struct regmap_irq_chip_data *data, int irq) return irq_create_mapping(data->domain, irq); } EXPORT_SYMBOL_GPL(regmap_irq_get_virq); + +/** + * regmap_irq_get_domain(): Retrieve the irq_domain for the chip + * + * Useful for drivers to request their own IRQs and for integration + * with subsystems. For ease of integration NULL is accepted as a + * domain, allowing devices to just call this even if no domain is + * allocated. + * + * @data: regmap_irq controller to operate on. + */ +struct irq_domain *regmap_irq_get_domain(struct regmap_irq_chip_data *data) +{ + if (data) + return data->domain; + else + return NULL; +} +EXPORT_SYMBOL_GPL(regmap_irq_get_domain); |