Commit 7adb9a28 authored by Mark M. Hoffman's avatar Mark M. Hoffman Committed by Greg Kroah-Hartman

[PATCH] i2c: Add lm78 sensor chip support

This patch vs. 2.5.70 adds support for LM78, LM78-J, and LM79 sensors
chips based on lm_sensors project CVS.  This works on one of my boards.

I want to draw attention to something I did with this driver by
comparing it to it87.c in 2.5.70:

> #define IT87_INIT_TEMP_HIGH_1 600
> #define IT87_INIT_TEMP_LOW_1  200

The hardware uses degrees C, and sysfs uses degrees C * 1000.  But
these #defines are apparently in units of degrees C * 10.  This
arbitrary intermediate representation bugs me.  And given the new 2.5
sysfs standard, it's unnecessary.

In this patch for lm78, I rewrote the conversion routines in terms
of the sysfs units - getting rid of the intermediate nonsense.  If
there are no objections, I'm going to start passing patches to do
this to the other sensor chip drivers in 2.5 as well.  It would be
nice to get some help with this too... especially since I don't
have all that hardware at hand to test the results.
parent eaaaa304
...@@ -62,6 +62,20 @@ config SENSORS_LM85 ...@@ -62,6 +62,20 @@ config SENSORS_LM85
in the lm_sensors package, which you can download at in the lm_sensors package, which you can download at
http://www.lm-sensors.nu http://www.lm-sensors.nu
config SENSORS_LM78
tristate " National Semiconductors LM78 and compatibles"
depends on I2C && EXPERIMENTAL
help
If you say yes here you get support for National Semiconductor LM78,
LM78-J and LM79. This can also be built as a module which can be
inserted and removed while the kernel is running.
The module will be called lm78.
You will also need the latest user-space utilties: you can find them
in the lm_sensors package, which you can download at
http://www.lm-sensors.nu
config SENSORS_VIA686A config SENSORS_VIA686A
tristate " VIA686A" tristate " VIA686A"
depends on I2C && EXPERIMENTAL depends on I2C && EXPERIMENTAL
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment