Re: [PATCH v2 4/7] iio: temperature: ltc2983: Use fwnode_property_present() for optional properties

From: Liviu Stan

Date: Mon May 18 2026 - 04:56:25 EST


On Sat, 16 May 2026 17:53:14 +0100 Jonathan Cameron <jic23@xxxxxxxxxx> wrote:

> On Thu, 14 May 2026 17:46:51 +0300
> Liviu Stan <liviu.stan@xxxxxxxxxx> wrote:
>
> > Checking fwnode_property_read_u32() return value with if (!ret)
> > silently swallows meaningful error codes when a property is present
> > but malformed. Use fwnode_property_present() first so that absence
> > uses the default while a present but unreadable property returns
> > a proper error.
> >
> Fixes: f110f3188e5639c81c457b2b831d40dfe3891bdb ("iio: temperature: Add support for LTC2983")
> Same again. Not a fix. It's hardening against unexpected errors.
>
> Also, sashiko calls out an issue with n_wires and default value of 0.
> The binding says default is 2.
>
>
> that was always present but is worth a fix potentially:
> https://sashiko.dev/#/patchset/20260514144712.64374-1-liviu.stan%40analog.com
>

Understood. I'll drop the fixes tag and initialize n_wires to 2 to
correspond to the binding.

Thanks,
Liviu