From: Jonathan Cameron <jic23@kernel.org>
To: Liviu Stan <liviu.stan@analog.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
"Francesco Lavra" <flavra@baylibre.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux@analog.com, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 5/8] iio: temperature: ltc2983: Fix n_wires default bypassing rotation check
Date: Fri, 22 May 2026 14:06:31 +0100 [thread overview]
Message-ID: <20260522140631.537875e4@jic23-huawei> (raw)
In-Reply-To: <20260521164323.770626-6-liviu.stan@analog.com>
On Thu, 21 May 2026 19:42:58 +0300
Liviu Stan <liviu.stan@analog.com> wrote:
> When adi,number-of-wires is absent, n_wires is left at 0. The binding
> documents a default of 2 wires, matching the hardware default. However
> the current-rotate validation checks n_wires == 2 || n_wires == 3, so
> with n_wires = 0 the guard is bypassed and adi,current-rotate is accepted
> for a 2-wire RTD.
>
> Initialize n_wires = 2 to match the binding default and ensure the
> rotation check fires correctly when the property is absent.
>
> Fixes: f110f3188e56 ("iio: temperature: Add support for LTC2983")
> Signed-off-by: Liviu Stan <liviu.stan@analog.com>
This should be the first patch in the series so it is obvious that it
is easily backported without the rest + I might pick up via the fixes-togreg
tree.
Jonathan
> ---
> Changes in v3:
> - New patch
>
> drivers/iio/temperature/ltc2983.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/temperature/ltc2983.c b/drivers/iio/temperature/ltc2983.c
> index 10f423fbe9cc..326f843f4271 100644
> --- a/drivers/iio/temperature/ltc2983.c
> +++ b/drivers/iio/temperature/ltc2983.c
> @@ -749,7 +749,7 @@ ltc2983_rtd_new(const struct fwnode_handle *child, struct ltc2983_data *st,
> struct ltc2983_rtd *rtd;
> int ret = 0;
> struct device *dev = &st->spi->dev;
> - u32 excitation_current = 0, n_wires = 0;
> + u32 excitation_current = 0, n_wires = 2;
>
> rtd = devm_kzalloc(dev, sizeof(*rtd), GFP_KERNEL);
> if (!rtd)
next prev parent reply other threads:[~2026-05-22 13:06 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 16:42 [PATCH v3 0/8] iio: temperature: ltc2983: Add support for ADT7604 Liviu Stan
2026-05-21 16:42 ` [PATCH v3 1/8] iio: temperature: ltc2983: Fix macro parenthesization and rename Liviu Stan
2026-05-22 9:11 ` Joshua Crofts
2026-05-22 12:56 ` Jonathan Cameron
2026-05-21 16:42 ` [PATCH v3 2/8] iio: temperature: ltc2983: Use local device pointer consistently Liviu Stan
2026-05-22 7:37 ` Joshua Crofts
2026-05-22 13:02 ` Jonathan Cameron
2026-05-22 13:56 ` Stan, Liviu
2026-06-02 23:19 ` Andy Shevchenko
2026-05-21 16:42 ` [PATCH v3 3/8] iio: temperature: ltc2983: Fix inconsistent channel wording in messages Liviu Stan
2026-05-22 7:07 ` Joshua Crofts
2026-06-02 23:21 ` Andy Shevchenko
2026-05-21 16:42 ` [PATCH v3 4/8] iio: temperature: ltc2983: Use fwnode_property_present() for optional properties Liviu Stan
2026-06-02 23:23 ` Andy Shevchenko
2026-05-21 16:42 ` [PATCH v3 5/8] iio: temperature: ltc2983: Fix n_wires default bypassing rotation check Liviu Stan
2026-05-22 13:06 ` Jonathan Cameron [this message]
2026-05-21 16:42 ` [PATCH v3 6/8] iio: core: Add IIO_COVERAGE channel type Liviu Stan
2026-05-21 18:10 ` sashiko-bot
2026-05-22 9:57 ` Stan, Liviu
2026-05-21 16:43 ` [PATCH v3 7/8] dt-bindings: iio: temperature: Add ADT7604 support to adi,ltc2983 Liviu Stan
2026-05-21 18:23 ` sashiko-bot
2026-05-22 11:42 ` Liviu Stan
2026-05-22 13:17 ` Jonathan Cameron
2026-05-21 16:43 ` [PATCH v3 8/8] iio: temperature: ltc2983: Add support for ADT7604 Liviu Stan
2026-05-21 19:18 ` sashiko-bot
2026-05-22 13:23 ` Liviu Stan
2026-05-22 14:09 ` David Lechner
2026-05-22 13:34 ` Jonathan Cameron
2026-05-22 14:24 ` Stan, Liviu
2026-05-22 17:31 ` 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=20260522140631.537875e4@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=flavra@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=liviu.stan@analog.com \
--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