Modify proposal to manage LM75A chips
Hi Davide,
Quoted 2 lines · Davide Rizzo
I suggest this modify to make LM75 driver support also LM75A chips, that otherwise fail a bug-based identification test.
Moving to the lm-sensors list, where this discussion belongs. Also, please avoid application/octet-stream attachments.
Quoted 2 lines
This check is not working on LM75A.
If you remove it, the driver will work also with LM75A chips.
If you remove it, the driver will also attach to basically any I2C chip in address range 0x48-0x4f. This is of course not acceptable, which is why the change you propose, and which was already proposed many times in the past [1] [2], has always been rejected.
[1] http://lists.lm-sensors.org/pipermail/lm-sensors/2008-April/022879.html
[2] http://lists.lm-sensors.org/pipermail/lm-sensors/2008-June/023445.html
The fact is that the LM75A can't be detected.
Quoted 18 lines
Signed-off-by Davide Rizzo <[email protected]>========================================
diff -urNplinux-2.6.26/drivers/hwmon/lm75.clinux-2.6.26.elpa/drivers/hwmon/lm75.cdrivers/hwmon/lm75.c +2
-1@@ -170,17 +170,19 @@ static int lm75_detect(struct i2c_adapte cur =i2c_smbus_read_word_data (new_client,0 ); conf =i2c_smbus_read_byte_data (new_client,1 ); hyst =i2c_smbus_read_word_data (new_client,2 ); +/* This was eliminated because LM75A is not recognized if (i2c_smbus_read_word_data(new_client, 4) != hyst || i2c_smbus_read_word_data(new_client, 5) != hyst || i2c_smbus_read_word_data(new_client, 6) != hyst || i2c_smbus_read_word_data(new_client, 7) != hyst) - goto exit_free; +goto exit_free;*/ os =i2c_smbus_read_word_data (new_client,3 );
drivers/hwmon/lm75.c static int lm75_detect(struct i2c_adapte · line 188
Quoted 10 lines
drivers/hwmon/lm75.c +2
-1+/* This was eliminated because LM75A is not recognized if (i2c_smbus_read_word_data(new_client, 4) != os || i2c_smbus_read_word_data(new_client, 5) != os || i2c_smbus_read_word_data(new_client, 6) != os || i2c_smbus_read_word_data(new_client, 7) != os) - goto exit_free; +goto exit_free;*/ /* Unused bits */ if (conf &0xe0 )
Which system do you have this LM75A on? If this is an embedded system with platform code, simply declare the device with i2c_register_board_info(). The lm75 driver supports the "lm75a" type since kernel 2.6.27-rc2. Otherwise, simply pass a "force" parameter to the lm75 driver when you load it, to bypass the detection.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors