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

Bui Duc Phuc phucduc.bui at gmail.com
Mon Aug 10 19:48:01 PDT 2026


Hi Andy,
Thank you for your review .

>
> 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 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.

Best regards,
Phuc



More information about the linux-arm-kernel mailing list