From: Jonathan Cameron <jic23@kernel.org>
To: Nuno Sa <nuno.sa@analog.com>
Cc: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
"Rob Herring" <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>
Subject: Re: [PATCH 3/5] iio: adc: ad9467: don't allow reading vref if not available
Date: Sat, 6 Jul 2024 12:20:45 +0100 [thread overview]
Message-ID: <20240706122045.54344d21@jic23-huawei> (raw)
In-Reply-To: <20240704-dev-iio-ad9467-new-devs-v1-3-f1adfee921f7@analog.com>
On Thu, 4 Jul 2024 11:25:23 +0200
Nuno Sa <nuno.sa@analog.com> wrote:
> If there's only one possible scale, there's no way to change the Vref
> select in the device so avoid reading the register in ad9467_get_scale().
> In this case, it makes no sense to provide the .read_available()
> callback nor allowing for writing the scale attribute.
>
> Note this is in preparation for supporting a new device that only has
> one possible scale.
>
> Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Trivial comment inline. If nothing else comes up I might just tweak it
whilst applying.
>
> static const struct ad9467_chip_info ad9467_chip_tbl = {
> @@ -301,9 +301,13 @@ static const struct ad9467_chip_info ad9265_chip_tbl = {
> static int ad9467_get_scale(struct ad9467_state *st, int *val, int *val2)
> {
> const struct ad9467_chip_info *info = st->info;
> - unsigned int i, vref_val;
> + unsigned int i = 0, vref_val;
This time it's in new code.
unsigned int vref_val;
unsigned int i = 0;
preferred so the assignment isn't burried.
> int ret;
>
next prev parent reply other threads:[~2024-07-06 11:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 9:25 [PATCH 0/5] iio: adc: ad9467: support new devices Nuno Sa
2024-07-04 9:25 ` [PATCH 1/5] iio: adc: ad9467: support multiple channels calibration Nuno Sa
2024-07-06 11:16 ` Jonathan Cameron
2024-07-04 9:25 ` [PATCH 2/5] iio: adc: ad9467: add new chip_info variables Nuno Sa
2024-07-04 9:25 ` [PATCH 3/5] iio: adc: ad9467: don't allow reading vref if not available Nuno Sa
2024-07-06 11:20 ` Jonathan Cameron [this message]
2024-07-04 9:25 ` [PATCH 4/5] dt-bindings: adc: ad9467: support new parts Nuno Sa
2024-07-04 14:23 ` Krzysztof Kozlowski
2024-07-04 9:25 ` [PATCH 5/5] iio: " Nuno Sa
2024-07-06 11:30 ` [PATCH 0/5] iio: adc: ad9467: support new devices Jonathan Cameron
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=20240706122045.54344d21@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
--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