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

From: Bui Duc Phuc

Date: Mon Aug 10 2026 - 22:48:24 EST


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