[PATCH 2/5] pinctrl: keembay: Propagate errors from optional IRQ lookup

Andy Shevchenko andriy.shevchenko at intel.com
Wed Aug 12 01:20:37 PDT 2026


On Tue, Aug 11, 2026 at 09:48:01AM +0700, Bui Duc Phuc wrote:

> > While this looks okay, have you considered actually having the
> > platform_get_irq_optional() to be optional in this sense?
> 
> As I understand it, if we decide to use platform_get_irq_optional(),
> then -ENXIO should be handled as the expected case where the IRQ is
> not available.

If platform_get_irq_optional() was optional, it would return 0 instead of ENXIO
(and avoid printing any message in such a case).

> If we do not want to handle -ENXIO as an optional IRQ,
> then I think we should use platform_get_irq() instead,
> which matches its intended semantics:

> https://elixir.bootlin.com/linux/v7.2-rc6/source/drivers/base/platform.c#L301

> -------------------------------
> ret = platform_get_irq_optional(dev, num);
> if (ret < 0)
>         return dev_err_probe(&dev->dev, ret,
>                                             "IRQ index %u not found\n", num);
> -------------------------------
> 
> In my opinion, we should not use an optional API if the IRQ is not
> actually intended to be optional.

Right. But does it suit for this driver?

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list