Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 11:37:51 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Justin Hibbits <chmeeedalf@gmail.com>
Cc:        Ravi Pokala <rpokala@mac.com>, src-committers <src-committers@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, Luiz Otavio O Souza <loos@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>
Subject:   Re: svn commit: r300421 - in head/sys: arm/allwinner arm/broadcom/bcm2835 arm/freescale/imx arm/mv dev/acpi_support dev/acpica dev/amdtemp dev/coretemp dev/iicbus powerpc/powermac
Message-ID:  <CANCZdfpsEpgb_B2mbiZqFGuwOb-rcDxf5KJLaEcavw7mD%2BHj0g@mail.gmail.com>
In-Reply-To: <CAHSQbTAVt6QgVNz0M_yCVpTwSc=-YFU5O0uhaqKC6XOPOmJCkQ@mail.gmail.com>
References:  <201605221358.u4MDwW8u097510@repo.freebsd.org> <C66E915D-A4D7-4591-AF6C-0949AF184271@panasas.com> <CAHSQbTAVt6QgVNz0M_yCVpTwSc=-YFU5O0uhaqKC6XOPOmJCkQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, May 22, 2016 at 1:12 PM, Justin Hibbits <chmeeedalf@gmail.com> wrote:
>
> On May 22, 2016 13:51, "Ravi Pokala" <rpokala@mac.com> wrote:
>>
>> -----Original Message-----
>> From: <owner-src-committers@freebsd.org> on behalf of Luiz Otavio O Souza
>> <loos@FreeBSD.org>
>> Date: 2016-05-22, Sunday at 06:58
>> To: <src-committers@freebsd.org>, <svn-src-all@freebsd.org>,
>> <svn-src-head@freebsd.org>
>> Subject: svn commit: r300421 - in head/sys: arm/allwinner
>> arm/broadcom/bcm2835 arm/freescale/imx arm/mv dev/acpi_support dev/acpica
>> dev/amdtemp dev/coretemp dev/iicbus powerpc/powermac
>>
>> >Author: loos
>> >Date: Sun May 22 13:58:32 2016
>> >New Revision: 300421
>> >URL: https://svnweb.freebsd.org/changeset/base/300421
>> >
>> >Log:
>> >  Fix the deciKelvin to Celsius conversion in kernel.
>> >
>> >  After r285994, sysctl(8) was fixed to use 273.15 instead of 273.20 as
>> > 0C
>> >  reference and as result, the temperature read in sysctl(8) now exibits
>> > a
>> >  +0.1C difference.
>>
>> Out of morbid curiosity, why do these things report in deciKelvin anyway?
>> Are there sensors we support out there which report native Kelvin, or that
>> report sub-degree precision?
>>
>> Thanks,
>>
>> Ravi (rpokala@)
>>
>
> There are many i2c sensors which report in sub-degree centigrade. Though
> some of them are in 1/8 (or other power of 2) degree precision, not 1/10.

ACPI reports in decikelvin, and it was the first thing we supported. Some 1 wire
devices support 1/16th a degree, and we support it in millikelvin since 1/16th
is 0.0625. So the precision needed is actually greater than what we're
reporting.
However, the accuracy of the measurement isn't +/- 0.001, it's closer
to +/1 0.063
or so (well, that's a relative accuracy, absolute accuracy is closer
to +/- 1 degree).
We report the higher level of precision so that applications that use
the relative
temperature can use it to inform a control loop. We have no good way to report
relative precision for a measurement, or the absolute accuracy.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpsEpgb_B2mbiZqFGuwOb-rcDxf5KJLaEcavw7mD%2BHj0g>