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


Groups > linux.kernel > #1329991

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

From Laxman Dewangan <ldewangan@nvidia.com>
Newsgroups linux.kernel
Subject Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq
Date 2016-02-09 10:30 +0100
Message-ID <r0cMq-25f-5@gated-at.bofh.it> (permalink)
References (3 earlier) <qZXkm-7Uw-11@gated-at.bofh.it> <qZXkm-7Uw-9@gated-at.bofh.it> <qZXu2-8en-21@gated-at.bofh.it> <qZYzM-v9-3@gated-at.bofh.it> <r092b-81n-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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);
+       }
+

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 Mark Brown <broonie@kernel.org> - 2016-02-09 12:30 +0100
                Re: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-09 12:40 +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