]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commitdiff
Merge remote-tracking branch 'regmap/topic/domain' into regmap-next
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 11 Dec 2012 03:39:29 +0000 (12:39 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 11 Dec 2012 03:39:29 +0000 (12:39 +0900)
drivers/base/regmap/regmap-irq.c
include/linux/regmap.h

index 5b6b1d8e6cc028f7bf5233741e4f396ce00a03c5..5972ad958544e3c875a2196294d83c74d7e44cc9 100644 (file)
@@ -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);
index 9f228d7f7ac48da7e8875a816a73b505686a586c..41e9e4e17657c85aa960d3d45851727a0b855b44 100644 (file)
@@ -19,6 +19,7 @@
 struct module;
 struct device;
 struct i2c_client;
+struct irq_domain;
 struct spi_device;
 struct regmap;
 struct regmap_range_cfg;
@@ -321,6 +322,7 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
 void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *data);
 int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data);
 int regmap_irq_get_virq(struct regmap_irq_chip_data *data, int irq);
+struct irq_domain *regmap_irq_get_domain(struct regmap_irq_chip_data *data);
 
 #else