Re: [PATCH v2] staging: iio: adc: ad7816: use dev_err_probe() for GPIO lookups
From: Joshua Crofts
Date: Wed Nov 18 2026 - 05:10:49 EST
On Tue, 17 Nov 2026 16:06:03 -0800
Maximo Manriquez Lizarraga via B4 Relay <devnull+DelaySystem.tubot.lat@xxxxxxxxxx> wrote:
> From: Maximo Manriquez Lizarraga <DelaySystem@xxxxxxxxx>
>
> GPIO lookups can return -EPROBE_DEFER. Convert the rdwr and convert
> GPIO lookup failures in ad7816_probe() to dev_err_probe(), which
> suppresses the error message on deferral and records the deferral
> reason. The busy-GPIO path is left untouched: its optionality is the
> subject of a separate proposed change.
>
> No functional change other than defer handling.
>
> Signed-off-by: Maximo Manriquez Lizarraga <DelaySystem@xxxxxxxxx>
> ---
> Changes in v2:
> - Resend under my real name (From/Signed-off-by: Maximo Manriquez Lizarraga).
> - Apologies for the improper sign-off on v1; no code change.
> - Link to v1: https://patch.msgid.link/20261107-batch1-s3-warn-v1-1-4fc38341ca38@xxxxxxxxx
> ---
You've missed the following segment starting line 398:
if (chip->id == ID_AD7816 || chip->id == ID_AD7817) {
chip->busy_pin = devm_gpiod_get(&spi_dev->dev, "busy",
GPIOD_IN);
if (IS_ERR(chip->busy_pin)) {
ret = PTR_ERR(chip->busy_pin);
dev_err(&spi_dev->dev, "Failed to request busy GPIO: %d\n",
ret);
return ret;
Otherwise the existing changes are fine.
--
Kind regards,
Joshua Crofts