lkml.org 
[lkml]   [2021]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] irqchip/renesas-irqc: Use platform_get_irq_optional() to get the interrupt
Hi Andy,

Thank you for the review.

On Sat, Dec 25, 2021 at 4:46 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Thu, Dec 16, 2021 at 9:52 AM Lad Prabhakar
> <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> >
> > platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> > allocation of IRQ resources in DT core code, this causes an issue
> > when using hierarchical interrupt domains using "interrupts" property
> > in the node as this bypassed the hierarchical setup and messed up the
> > irq chaining.
> >
> > In preparation for removal of static setup of IRQ resource from DT core
> > code use platform_get_irq_optional().
>
>
> > + ret = platform_get_irq_optional(pdev, k);
> > + if (ret == -EPROBE_DEFER)
> > + goto err_runtime_pm_disable;
> > + if (ret < 0)
> > break;
>
> The best approach is
>
> ret = platform_get_irq_optional(...);
> if (ret < 0 && ret != -ENXIO)
> return ret;
> if (ret > 0)
> ...we got it...
>
> It will allow the future API fix of platform_get_irq_optional() to be
> really optional.
>
Later patch [0] (merged into -next) does check for -ENXIO first.

[0] https://lore.kernel.org/lkml/20211216182121.5323-1-prabhakar.mahadev-lad.rj@bp.renesas.com/t/

Cheers,
Prabhakar

\
 
 \ /
  Last update: 2021-12-25 18:28    [W:0.097 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site