[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dv72cvn7rihavqxg6wnybhedhunabo7bremwb5pkutqljwarcf@eo6zc7vi7fbu>
Date: Fri, 30 May 2025 09:39:10 +0200
From: Angelo Dureghello <adureghello@...libre.com>
To: 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 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..21e63260965c32988d0ab3b8bb1201aa2396f1ba 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 ?
> > + return dev_err_probe(dev, ret, "failed to get refin voltage\n");
>
> We aren't reading the voltage, so the message doesn't make sense.
>
Is it better a
"failed to get refin-supply\n" or
"failed to enable refin voltage\n"
?
> > +
> > st->chip_info = chip_info;
> >
> > if (st->chip_info->oversampling_num) {
> >
>
Regards,
angelo
Powered by blists - more mailing lists