Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1328316

[PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq

From Laxman Dewangan <ldewangan@nvidia.com>
Newsgroups linux.kernel
Subject [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq
Date 2016-02-06 15:50 +0100
Message-ID <qZclt-bk-41@gated-at.bofh.it> (permalink)
References <qZclr-bk-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Before removing irq domains, it is require to unmap all
mapped interrupt from that domain. Currently there is API
to map the interrupt on chip as regmap_irq_get_virq() for
creating mapping. Add equivalent API to dispose the mapped
irq in irq domains.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
CC: Krzysztof Kozlowski <k.kozlowski@samsung.com>
CC: Javier Martinez Canillas <javier@osg.samsung.com>

---
This is new in the series which was identified when testing V3
series that it is require to unmap virq before deleting irq chip
domain. Adding this APIs in regmap irq framework.

 drivers/base/regmap/regmap-irq.c | 14 ++++++++++++++
 include/linux/regmap.h           |  1 +
 2 files changed, 15 insertions(+)

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 9b0d202..9b36fc8 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -707,6 +707,20 @@ int regmap_irq_get_virq(struct regmap_irq_chip_data *data, int irq)
 EXPORT_SYMBOL_GPL(regmap_irq_get_virq);
 
 /**
+ * regmap_irq_put_virq(): Unmap mapped interrupt of a chip in irq-domain.
+ *
+ * This routine is used to dispose the created mapping from irq domain
+ * which must be call before removing irq domain.
+ *
+ * @irq: virtual irq number which was mapped with irq domains.
+ */
+void regmap_irq_put_virq(int virq)
+{
+	irq_dispose_mapping(virq);
+}
+EXPORT_SYMBOL_GPL(regmap_irq_put_virq);
+
+/**
  * regmap_irq_get_domain(): Retrieve the irq_domain for the chip
  *
  * Useful for drivers to request their own IRQs and for integration
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 27aaac9..546eab5 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -870,6 +870,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);
+void regmap_irq_put_virq(int virq);
 struct irq_domain *regmap_irq_get_domain(struct regmap_irq_chip_data *data);
 
 #else
-- 
2.1.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V4 0/6] rtc: max77686: make max77686 rtc driver as IP driver Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 15:50 +0100
  [PATCH V4 6/6] rtc: max77686: move initialisation of rtc regmap, irq chip locally Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 15:50 +0100
    Re: [PATCH V4 6/6] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-08 11:40 +0100
      Re: [PATCH V4 6/6] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-02-08 11:50 +0100
  [PATCH V4 4/6] rtc: max77686: avoid reference of parent device info multiple places Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 15:50 +0100
  [PATCH V4 5/6] mfd: max77686: do not set i2c client data for rtc i2c client Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 15:50 +0100
  [PATCH V4 3/6] rtc: max77686: use rtc regmap to access RTC registers Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 15:50 +0100
  [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 15:50 +0100
    Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Mark Brown <broonie@kernel.org> - 2016-02-08 16:00 +0100
      Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Mark Brown <broonie@kernel.org> - 2016-02-08 18:00 +0100
        Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-08 18:10 +0100
          Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Mark Brown <broonie@kernel.org> - 2016-02-08 19:20 +0100
            Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-09 06:30 +0100
              Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-09 10:30 +0100
      Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-08 18:00 +0100
  [PATCH V4 2/6] rtc: max77686: fix checkpatch error Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 16:00 +0100

csiph-web