[RFC PATCH] Add lm78 sensor chip support (2.5.70)

From: Mark M. Hoffman (mhoffman@lightlink.com)
Date: Sun Jun 08 2003 - 17:33:34 EST


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.

Regards,

-- 
Mark M. Hoffman
mhoffman@lightlink.com


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:19 EST