lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251012200750.059b9e77@jic23-huawei>
Date: Sun, 12 Oct 2025 20:07:50 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Uwe Kleine-König <u.kleine-koenig@...libre.com>
Cc: David Lechner <dlechner@...libre.com>, Michael Hennerich
 <Michael.Hennerich@...log.com>, 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

On Sun, 12 Oct 2025 14:47:13 +0200
Uwe Kleine-König <u.kleine-koenig@...libre.com> wrote:

> 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>

Applied to the temporary branch I'm queuing fixes on until I can rebase on rc1.
+ marked for stable.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ