diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-11 04:39:29 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-11 04:39:29 +0100 |
commit | 4d348e6e0a35cd1b40196a463f1159ae5d582770 (patch) | |
tree | 914c629a0f0ff6c3015c7afb0a4317df465c9246 /drivers/base | |
parent | Merge remote-tracking branch 'regmap/topic/debugfs' into regmap-next (diff) | |
parent | regmap: irq: Allow users to retrieve the irq_domain (diff) | |
download | linux-4d348e6e0a35cd1b40196a463f1159ae5d582770.tar.xz linux-4d348e6e0a35cd1b40196a463f1159ae5d582770.zip |
Merge remote-tracking branch 'regmap/topic/domain' into regmap-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 5b6b1d8e6cc0..5972ad958544 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); |