Re: W1: w1_slave units, standardize 1C or .001C? Break API

From: Evgeniy Polyakov
Date: Tue Jan 22 2008 - 16:06:54 EST


Hi David.

On Mon, Jan 21, 2008 at 05:15:57PM -0600, David Fries (david@xxxxxxxxx) wrote:
> The ds18b20 one wire temperature sensor conversion routine is
> returning the units in degrees C while the ds1820 (ds18s20) is
> returning it in .001 degrees C. 20C vs 20312C. Once you know the
> units I'm liking the latter as it gives a higher precision. Time to
> break user applications so the driver can give the temperature in the
> same units for both sensors.

What about instead of breaking application just add new sysfs file,
which will only return temperature instead of full rom content.
It can be millidegrees Centigrade, another one can be millikelvins :)

Actually it is already posible for applications to decode whatever
precision they like from the rom content displayed, although that can be
not very convenient.

--
Evgeniy Polyakov
--
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/