Re: [lm-sensors] [PATCH 1/2] hwmon: (applesmc) Allow negativetemperature values
From: Guenter Roeck
Date: Mon Jul 16 2012 - 21:10:40 EST
On Mon, Jul 16, 2012 at 09:18:10AM +0200, Henrik Rydberg wrote:
> There are many userland reports of sensors with unreasonably small and
> large temperatures. There seem to be several reasons for this:
>
> Firstly, the major sensor type (sp78) is actually a signed number.
> This explains why some sensors show very small or large values - they
> are in fact all small, but of different sign.
>
> Secondly, the other sensor type (1-hex) is not properly understood; it
> may be that it is not a temperature after all.
>
> Thirdly, some sensors are differential in nature, showing changes over
> time rather than absolute numbers. This explains why those values are
> small and of varying sign.
>
> This patch interprets the sp78 type as signed short, but keeps the
> original scaling. For other types, -EINVAL is returned, since the
> nature of those sensors is unknown.
>
> Signed-off-by: Henrik Rydberg <rydberg@xxxxxxxxxxx>
> ---
Applied to -next.
Thanks,
Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/