Re: [PATCH] iio: adc: ti-adc12138: fail init on calibration timeout
From: John Ogness
Date: Mon Jun 15 2026 - 08:12:40 EST
On 2026-06-15, Prashant Rahul <prashantrahul23@xxxxxxxxx> wrote:
> adc12138_init() starts device calibration and waits for the EOC
> interrupt before checking the calibration status. The wait helper
> returns -ETIMEDOUT if the interrupt does not arrive in time, but the
> init path ignores the error and continues probing the device. This could
> lead to registering the device even tho it may not be properly
> initialized.
>
> Return the wait error so probe fails cleanly when calibration does not
> complete.
After the timeout, the driver checks the status. If the calibration is
not complete, it already returns an error with the appropriate
information. I would expect that error is preferrable to a context-less
"wait eoc timeout".
John Ogness