add 12-bit precision mode to ds1621,

patch from Christian Zuckschwerdt:

Hi,

On Fri, 15 Jun 2001, Mark D. Studebaker wrote:

> I looked at the patch and I see there are separate
> /proc entries for the 9 and 12 bit outputs.
> Why not just make the 12 bit output the only output using "temp"??
> I don't understand the need for all the new /proc entries,
> except perhaps for debugging inside #ifdef DEBUG.
> Would you or Jan be willing to develop a patch that way?
> I'm all for increased accuracy as a standard feature - why not?

Ok. I rewrote the patch to support standard (9bit) and enhanced (12bit)
accuracy via the "temp" entry. The "raw" interface is also gone.

There are some quirks needed for the sensors app. It seems that
prog/sensors/chips.c fixes the output to %+3.1f
Thats not good for 12bit mode which gives you 2 decimals and therefor
wrong scaling.

Precision is .062 with 12bit (4 decimal bits) instead of .5 with 9bit (1
decimal bit). That way 2 decimals seem a natural choice.
On the other hand I see no obvious reason not to fix decimals to 1...
I'm lost there -- suggestions anyone?

Another problem is that 12bit is slow and laggy. I don't recommend making
it the default mode.

  cu.
    :
    Christian


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1145 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker committed 2001-07-29 00:17:14 +00:00
1 parent 2bd05221ef
commit 30b9291288
4 files changed
+317 -46

No files matched your search

+2
View File
@@ -467,6 +467,8 @@
#define DS1621_ALARM_TEMP_HIGH 0x40
#define DS1621_ALARM_TEMP_LOW 0x20
#define DS1621_SYSCTL_ENABLE 2002
#define DS1621_SYSCTL_CONTINUOUS 2003
#define DS1621_SYSCTL_POLARITY 2004
#define IT87_SYSCTL_IN0 1000 /* Volts * 100 */
#define IT87_SYSCTL_IN1 1001