Linux RTC
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: <lee.jones@linaro.org>, <alexandre.belloni@free-electrons.com>,
	<k.kozlowski@samsung.com>, <javier@osg.samsung.com>,
	<broonie@kernel.org>, <gregkh@linuxfoundation.org>,
	<a.zummo@towertech.it>
Cc: <cw00.choi@samsung.com>, <linux-kernel@vger.kernel.org>,
	<rtc-linux@googlegroups.com>,
	Laxman Dewangan <ldewangan@nvidia.com>
Subject: [rtc-linux] [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq
Date: Sat, 6 Feb 2016 20:07:22 +0530	[thread overview]
Message-ID: <1454769447-785-2-git-send-email-ldewangan@nvidia.com> (raw)
In-Reply-To: <1454769447-785-1-git-send-email-ldewangan@nvidia.com>

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

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  reply	other threads:[~2016-02-06 14:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-06 14:37 [rtc-linux] [PATCH V4 0/6] rtc: max77686: make max77686 rtc driver as IP driver Laxman Dewangan
2016-02-06 14:37 ` Laxman Dewangan [this message]
2016-02-08 14:55   ` [rtc-linux] Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Mark Brown
2016-02-08 16:38     ` Laxman Dewangan
2016-02-08 16:59       ` Mark Brown
2016-02-08 16:56         ` Laxman Dewangan
2016-02-08 18:19           ` Mark Brown
2016-02-09  5:16             ` Laxman Dewangan
2016-02-09  9:08               ` Laxman Dewangan
2016-02-09 11:27                 ` Mark Brown
2016-02-09 11:21                   ` Laxman Dewangan
2016-02-06 14:37 ` [rtc-linux] [PATCH V4 2/6] rtc: max77686: fix checkpatch error Laxman Dewangan
2016-02-06 14:37 ` [rtc-linux] [PATCH V4 3/6] rtc: max77686: use rtc regmap to access RTC registers Laxman Dewangan
2016-02-06 14:37 ` [rtc-linux] [PATCH V4 4/6] rtc: max77686: avoid reference of parent device info multiple places Laxman Dewangan
2016-02-06 14:37 ` [rtc-linux] [PATCH V4 5/6] mfd: max77686: do not set i2c client data for rtc i2c client Laxman Dewangan
2016-02-06 14:37 ` [rtc-linux] [PATCH V4 6/6] rtc: max77686: move initialisation of rtc regmap, irq chip locally Laxman Dewangan
2016-02-08 10:20   ` [rtc-linux] " Laxman Dewangan
2016-02-08 10:42     ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454769447-785-2-git-send-email-ldewangan@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=broonie@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=javier@osg.samsung.com \
    --cc=k.kozlowski@samsung.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox