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

From: Andy Shevchenko

Date: Wed Jun 03 2026 - 05:32:06 EST


On Wed, Jun 03, 2026 at 11:13:17AM +0200, Joshua Crofts wrote:
> 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).

No, it must be in this patch, otherwise it might regress quite badly (from
the user, who wants to see a bootlog nice and clean, perspective).

--
With Best Regards,
Andy Shevchenko