Re: [PATCH v6 2/3] counter: microchip-tcb-capture: Add IRQ handling

From
William Breathitt Gray <wbg@kernel.org>
Date
2025-03-04 10:18:54
Also in
linux-iio, lkml
Reply to
Csókás Bence, 2025-03-04
On Tue, Mar 04, 2025 at 10:57:05AM +0100, Csókás Bence wrote:
On 2025. 03. 04. 8:02, William Breathitt Gray wrote:
quoted
In theory, the error code could be something else if of_irq_get() failed
for any other reason. Handle all those error cases at once by checking
IS_ERR(priv->irq) rather than just -EPROBE_DEFER. Then you can just
return dev_err_probe() with priv->irq for the error code.
Yes, `of_irq_get()` can return an error, for example if the IRQ is not
defined in the DT. In these cases, we just don't do IRQ, but still allow the
device to probe. -EPROBE_DEFER is special in this case, because it signifies
that there *is* an IRQ to set up, just not now.
You're right, that makes sense. Thank you for explaining.

William Breathitt Gray

Attachments

Thread (13 messages) 13 messages, 2 authors, last reply 2025-03-04
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help