[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <l6bq6yqq6iqac3jlnwhzpymbne5e2ulkupl544qlyot3po546g@5seccwwkxrns>
Date: Sun, 12 Oct 2025 14:47:13 +0200
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: David Lechner <dlechner@...libre.com>
Cc: Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>, Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
Marcelo Schmitt <marcelo.schmitt@...log.com>
Subject: Re: [PATCH v2] iio: adc: ad7124: fix temperature channel
Hello David,
On Fri, Oct 10, 2025 at 03:24:31PM -0500, David Lechner wrote:
> Fix temperature channel not working due to gain and offset not being
> initialized. For channels other than the voltage ones calibration is
> skipped (which is OK). However that results in the calibration register
> values tracked in st->channels[i].cfg all being zero. These zeros are
> later written to hardware before a measurement is made which caused the
> raw temperature readings to be always 8388608 (0x800000).
>
> To fix it, we just make sure the gain and offset values are set to the
> default values and still return early without doing an internal
> calibration.
>
> While here, add a comment explaining why we don't bother calibrating
> the temperature channel.
>
> Fixes: 47036a03a303 ("iio: adc: ad7124: Implement internal calibration at probe time")
> Reviewed-by: Marcelo Schmitt <marcelo.schmitt@...log.com>
> Signed-off-by: David Lechner <dlechner@...libre.com>
> ---
> Changes in v2:
> - Improved commit message.
> - Expanded code comment.
I like both improvements, thanks!
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@...libre.com>
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists