From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Paller, Kim Seer" <KimSeer.Paller@analog.com>,
"lars@metafoo.de" <lars@metafoo.de>,
"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"broonie@kernel.org" <broonie@kernel.org>,
"Hennerich, Michael" <Michael.Hennerich@analog.com>,
"robh@kernel.org" <robh@kernel.org>,
"krzysztof.kozlowski@linaro.org" <krzysztof.kozlowski@linaro.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v6 2/2] iio: adc: max14001: New driver
Date: Sat, 17 Jun 2023 19:37:15 +0100 [thread overview]
Message-ID: <20230617193715.20d0c048@jic23-huawei> (raw)
In-Reply-To: <20230617193423.42a4d66c@jic23-huawei>
On Sat, 17 Jun 2023 19:34:23 +0100
Jonathan Cameron <jic23@kernel.org> wrote:
> On Wed, 14 Jun 2023 14:53:12 +0300
> Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>
> > On Wed, Jun 14, 2023 at 1:43 PM Paller, Kim Seer
> > <KimSeer.Paller@analog.com> wrote:
> > > > From: Andy Shevchenko <andy.shevchenko@gmail.com>
> > > > Sent: Wednesday, June 14, 2023 5:12 PM
> >
> > ...
> >
> > > > > + /* select external voltage reference source for the ADC */
> > > > > + ret = max14001_reg_update(st, MAX14001_CFG,
> > > > > + MAX14001_CFG_EXRF, 1);
> > > > > +
> > > > > + ret = regulator_get_voltage(vref);
> > > > > + if (ret < 0)
> > > > > + return dev_err_probe(dev, ret,
> > > > > + "Failed to get vref\n");
> > > >
> > > > Is it important to choose the external reference source _before_ getting the
> > > > voltage of the regulator? If not, I would swap these calls, otherwise the
> > > > comment is needed to explain why the sequence is important in the way it's
> > > > written.
> > >
> > > It is not important. These calls can be swap without any issues.
> >
> > If you send a new version, please swap, otherwise I hope Jonathan can
> > do it when applying.
> >
>
> I made these changes whilst applying...
>
> --- a/drivers/iio/adc/max14001.c
> +++ b/drivers/iio/adc/max14001.c
> @@ -290,16 +290,19 @@ static int max14001_probe(struct spi_device *spi)
> if (ret)
> return ret;
>
> - /* select external voltage reference source for the ADC */
> - ret = max14001_reg_update(st, MAX14001_CFG,
> - MAX14001_CFG_EXRF, 1);
> -
> ret = regulator_get_voltage(vref);
> if (ret < 0)
> return dev_err_probe(dev, ret,
> "Failed to get vref\n");
>
> st->vref_mv = ret / 1000;
> +
> + /* select external voltage reference source for the ADC */
> + ret = max14001_reg_update(st, MAX14001_CFG,
> + MAX14001_CFG_EXRF, 1);
> +
> + if (ret < 0)
> + return ret;
> }
>
> mutex_init(&st->lock);
>
>
> Note that whilst I've applied this to the togreg branch of iio.git - it is just
> a tiny bit too late to make the merge window that starts in about a week.
> As such I'll only push this out as testing until I can rebase the tree
> on rc1 once available.
Actually nope. Dropped it again because a question came up in my build tests.
I'll address that in a separate reply.
Jonathan
>
> Thanks,
>
> Jonathan
next prev parent reply other threads:[~2023-06-17 18:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-14 0:48 [PATCH v6 1/2] dt-bindings: iio: adc: add max14001 Kim Seer Paller
2023-06-14 0:48 ` [PATCH v6 2/2] iio: adc: max14001: New driver Kim Seer Paller
2023-06-14 9:11 ` Andy Shevchenko
2023-06-14 10:43 ` Paller, Kim Seer
2023-06-14 11:53 ` Andy Shevchenko
2023-06-17 18:34 ` Jonathan Cameron
2023-06-17 18:37 ` Jonathan Cameron [this message]
2023-06-17 18:30 ` Jonathan Cameron
2023-06-17 18:43 ` Jonathan Cameron
2023-06-14 6:30 ` [PATCH v6 1/2] dt-bindings: iio: adc: add max14001 Krzysztof Kozlowski
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=20230617193715.20d0c048@jic23-huawei \
--to=jic23@kernel.org \
--cc=KimSeer.Paller@analog.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/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