linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Mark Brown <broonie@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>, <lee.jones@linaro.org>,
	<alexandre.belloni@free-electrons.com>, <k.kozlowski@samsung.com>,
	<javier@osg.samsung.com>, <gregkh@linuxfoundation.org>,
	<a.zummo@towertech.it>, <cw00.choi@samsung.com>,
	<linux-kernel@vger.kernel.org>, <rtc-linux@googlegroups.com>
Subject: Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq
Date: Tue, 9 Feb 2016 14:38:28 +0530	[thread overview]
Message-ID: <56B9AC8C.2020209@nvidia.com> (raw)
In-Reply-To: <56B97632.1000208@nvidia.com>


On Tuesday 09 February 2016 10:46 AM, Laxman Dewangan wrote:
>
> On Monday 08 February 2016 11:49 PM, Mark Brown wrote:
>> * PGP Signed by an unknown key
>>
>> On Mon, Feb 08, 2016 at 10:26:20PM +0530, Laxman Dewangan wrote:
>>
>>> So fix need to go in the irq_domain_remove() to unamp before actually
>>> destroying the irq domain?
>> That's one option, but you could also do this at the regmap-irq level.
>>
>
> Do we need to dispose all virtual irq in regmap_del_irq_chip() before 
> actually removing domain?
> This means we need to store the created virq  in regmap_irq_chip_data 
> for disposing it when removing the irq domain.

It is easy for me to communicate through code to avoid any confusion. So 
do you want to say as follows? In this case, there is no need of any new 
API.

  void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
  {
+       unsigned int virq;
+       int hwirq;
+
         if (!d)
                 return;

         free_irq(irq, d);
+
+       /* Unmap all virtual irq from this domain */
+       for (hwirq = 0; hwirq < d->chip->num_irqs; hwirq++) {
+               if (!d->chip->irqs[irq].mask)
+                       continue;
+
+               /* Get virtual irq of hwirq on chip if already mapped */
+               virq = irq_find_mapping(d->domain, hwirq);
+               if (virq)
+                       irq_dispose_mapping(virq);
+       }
+

  reply	other threads:[~2016-02-09  9:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-06 14:37 [PATCH V4 0/6] rtc: max77686: make max77686 rtc driver as IP driver Laxman Dewangan
2016-02-06 14:37 ` [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Laxman Dewangan
2016-02-08 14:55   ` 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 [this message]
2016-02-09 11:27                 ` Mark Brown
2016-02-09 11:21                   ` Laxman Dewangan
2016-02-06 14:37 ` [PATCH V4 2/6] rtc: max77686: fix checkpatch error Laxman Dewangan
2016-02-06 14:37 ` [PATCH V4 3/6] rtc: max77686: use rtc regmap to access RTC registers Laxman Dewangan
2016-02-06 14:37 ` [PATCH V4 4/6] rtc: max77686: avoid reference of parent device info multiple places Laxman Dewangan
2016-02-06 14:37 ` [PATCH V4 5/6] mfd: max77686: do not set i2c client data for rtc i2c client Laxman Dewangan
2016-02-06 14:37 ` [PATCH V4 6/6] rtc: max77686: move initialisation of rtc regmap, irq chip locally Laxman Dewangan
2016-02-08 10:20   ` 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=56B9AC8C.2020209@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 \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).