Re: [PATCH] iio: adc: ti-ads124s08: Return reset failures

From: Joshua Crofts

Date: Wed Jun 24 2026 - 02:57:54 EST


On Wed, 24 Jun 2026 13:53:25 +0800
Pengpeng Hou <pengpeng@xxxxxxxxxxx> wrote:

> devm_gpiod_get_optional() returns NULL when the optional GPIO is absent,
> but returns an ERR_PTR when the provider lookup fails. Probe currently
> logs the ERR_PTR case and keeps the error pointer in reset_gpio.
>
> Later ads124s_reset() treats any non-NULL reset_gpio as valid and passes
> it to gpiod_set_value_cansleep(). Return the lookup error instead of
> retaining the ERR_PTR.
>
> Also return ads124s_reset() failures so probe does not register the IIO
> device after either the GPIO reset path or the software reset command
> failed.
>
> Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
> ---

Hmm, perhaps it's trivial, but not sure if these changes should be separated
into two patches. If so, feel free to carry over my tag.

Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>

--
Kind regards

CJD