From: "Nuno Sá" <noname.nuno@gmail.com>
To: Angelo Dureghello <adureghello@baylibre.com>,
David Lechner <dlechner@baylibre.com>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: adc: ad7606: add enabling of optional Vrefin voltage
Date: Fri, 30 May 2025 12:35:05 +0100 [thread overview]
Message-ID: <9e6d503cc7715e14c5fd6b219c123166d1cf2342.camel@gmail.com> (raw)
In-Reply-To: <dv72cvn7rihavqxg6wnybhedhunabo7bremwb5pkutqljwarcf@eo6zc7vi7fbu>
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@baylibre.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@baylibre.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á
next prev parent reply other threads:[~2025-05-30 11:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-29 9:13 [PATCH 0/2] iio: adc: ad7606: enable Vdrive and Vrefin power supply voltages Angelo Dureghello
2025-05-29 9:13 ` [PATCH 1/2] iio: adc: ad7606: enable Vdrive power supply Angelo Dureghello
2025-05-29 9:13 ` [PATCH 2/2] iio: adc: ad7606: add enabling of optional Vrefin voltage Angelo Dureghello
2025-05-29 17:52 ` David Lechner
2025-05-30 7:39 ` Angelo Dureghello
2025-05-30 11:35 ` Nuno Sá [this message]
2025-05-30 13:49 ` David Lechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9e6d503cc7715e14c5fd6b219c123166d1cf2342.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=adureghello@baylibre.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®