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]
Date: Tue, 30 Apr 2024 10:26:38 -0400
From: Marc Ferland <marc.ferland@...il.com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc: lars@...afoo.de, Michael.Hennerich@...log.com, jic23@...nel.org, 
	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Marc Ferland <marc.ferland@...atest.com>
Subject: Re: [PATCH] iio: dac: ad5592r: fix temperature scale

On Tue, Apr 30, 2024 at 9:59 AM Jonathan Cameron
<Jonathan.Cameron@...wei.com> wrote:
>
> On Tue, 30 Apr 2024 09:13:30 -0400
> marc.ferland@...il.com wrote:
>
> > From: Marc Ferland <marc.ferland@...atest.com>
> >
> > For temperature readings, the remainder is returned as nano Celsius
> > _but_ we mark it as IIO_VAL_INT_PLUS_MICRO. This results in incorrect
> > temperature reporting through hwmon for example. I have a board here
> > which reports the following when running 'sensors':
> >
> > iio_hwmon-isa-0000
> > Adapter: ISA adapter
> > temp1:        +93.3°C
> >
> > With the patch applied, it returns the correct temperature:
> >
> > iio_hwmon-isa-0000
> > Adapter: ISA adapter
> > temp1:        +30.5°C
> >
> > Signed-off-by: Marc Ferland <marc.ferland@...atest.com>
>
> IIO temperature units are milli celcius, so I'm not following
> the argument here.  The driver might be reporting in pico celcius
> I suppose?  Call out that this is the scale factor though, so
> it corresponds to 1LSB hence a small number is certainly plausible..
>
> Reasonable to argue it's taking the integer and dividing by 10^9 hence
> INT_PLUS_NANO is the right answer, but it isn't nano celsius.
>

Oups! you're obviously right. I'll update my commit message and resend.
Marc

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ