[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9e6d503cc7715e14c5fd6b219c123166d1cf2342.camel@gmail.com>
Date: Fri, 30 May 2025 12:35:05 +0100
From: Nuno Sá <noname.nuno@...il.com>
To: Angelo Dureghello <adureghello@...libre.com>, David Lechner
<dlechner@...libre.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>, Michael Hennerich
<Michael.Hennerich@...log.com>, Jonathan Cameron <jic23@...nel.org>, Nuno
Sá
<nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] iio: adc: ad7606: add enabling of optional Vrefin
voltage
On Fri, 2025-05-30 at 09:39 +0200, Angelo Dureghello wrote:
> On 29.05.2025 12:52, David Lechner wrote:
> > On 5/29/25 4:13 AM, Angelo Dureghello wrote:
> > > From: Angelo Dureghello <adureghello@...libre.com>
> > >
> > > Add optional refin voltage enabling. The property "refin-supply" is
> > > already available and optional in the current fdt dt_schema.
> > >
> > > Signed-off-by: Angelo Dureghello <adureghello@...libre.com>
> > > ---
> > > drivers/iio/adc/ad7606.c | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> > > diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c
> > > index
> > > 3bbe9c05b5edbc11e8016c995c6ab64104836e7b..21e63260965c32988d0ab3b8bb1201aa
> > > 2396f1ba 100644
> > > --- a/drivers/iio/adc/ad7606.c
> > > +++ b/drivers/iio/adc/ad7606.c
> > > @@ -1335,6 +1335,10 @@ int ad7606_probe(struct device *dev, int irq, void
> > > __iomem *base_address,
> > > return dev_err_probe(dev, ret,
> > > "Failed to enable Vdrive supply\n");
> > >
> > > + ret = devm_regulator_get_enable_optional(dev, "refin");
> > > + if (ret < 0 && ret != -ENODEV)
> >
> > < 0 is probably not needed.
> >
> The above code looks correct to me. What is the issue ?
>
Not that there's an issue with the code. I think David means that ret > 0 has no
meaning (function on return values <= 0) which means that if (ret) is enough.
- Nuno Sá
Powered by blists - more mailing lists