Re: [PATCH v2] staging: iio: adc: ad7816: Use devm_gpiod_get_optional() for busy GPIO

From: Joshua Crofts

Date: Wed Jun 03 2026 - 05:17:14 EST


On Wed, 3 Jun 2026 at 11:07, Taha Narimani <tahanarimani3443@xxxxxxxxx> wrote:
> ---
> + chip->busy_pin = devm_gpiod_get_optional(&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);

Looking at this, you could eventually move all of the dev_err() calls in the
probe() function to use dev_err_probe(). (For another patch though).

--
Kind regards

CJD