Re: [PATCH 2.6] sensors chip updates (3 of 4)

From: Mark M. Hoffman
Date: Mon Dec 15 2003 - 23:16:57 EST



This patch is from the lm_sensors project CVS, from this revision:

1.44 (mds) remove initialization of limits by driver

It is better to set these limits by a combination of /etc/sensors.conf
and 'sensors -s'; "mechanism not policy."

--- linux-2.6.0-test11-gkh/drivers/i2c/chips/lm75.c 2003-12-14 13:53:50.000000000 -0500
+++ linux-2.6.0-test11-mmh/drivers/i2c/chips/lm75.c 2003-12-14 17:52:49.000000000 -0500
@@ -51,10 +51,6 @@
#define TEMP_FROM_REG(val) ((((val & 0x7fff) >> 7) * 5) | ((val & 0x8000)?-256:0))
#define TEMP_TO_REG(val) (SENSORS_LIMIT((val<0?(0x200+((val)/5))<<7:(((val) + 2) / 5) << 7),0,0xffff))

-/* Initial values */
-#define LM75_INIT_TEMP_OS 600
-#define LM75_INIT_TEMP_HYST 500
-
/* Each client has this additional data */
struct lm75_data {
struct semaphore update_lock;
@@ -258,10 +254,6 @@
static void lm75_init_client(struct i2c_client *client)
{
/* Initialize the LM75 chip */
- lm75_write_value(client, LM75_REG_TEMP_OS,
- TEMP_TO_REG(LM75_INIT_TEMP_OS));
- lm75_write_value(client, LM75_REG_TEMP_HYST,
- TEMP_TO_REG(LM75_INIT_TEMP_HYST));
lm75_write_value(client, LM75_REG_CONF, 0);
}

--
Mark M. Hoffman
mhoffman@xxxxxxxxxxxxx

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