lkml.org 
[lkml]   [2016]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq

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

\
 
 \ /
  Last update: 2016-02-09 11:01    [W:0.070 / U:11.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site