diff --git a/kernel/chips/lm78.c b/kernel/chips/lm78.c index 27b21a9c..e91d31be 100644 --- a/kernel/chips/lm78.c +++ b/kernel/chips/lm78.c @@ -448,7 +448,7 @@ int lm78_detect_smbus(struct i2c_adapter *adapter) /* Later on, we will keep a list of registered addresses for each adapter, and check whether they are used here */ - if (smbus_read_byte_data(adapter,address,LM78_REG_CONFIG) == 0xff) + if (smbus_read_byte_data(adapter,address,LM78_REG_CONFIG) < 0) continue; /* Real detection code goes here */ @@ -467,6 +467,11 @@ int lm78_detect_smbus(struct i2c_adapter *adapter) type = lm79; type_name = "lm79"; client_name = "LM79 chip"; + } else if (err == 0x02) { + printk("lm78.o: Warning: Winbond W83781D detected (treated as a LM79)\n"); + type = lm79; + type_name = "lm79"; + client_name = "LM79 chip"; } else { #ifdef DEBUG printk("lm78.o: warning: probed non-lm78 chip?!? (%x)\n",err); diff --git a/src/lm78.c b/src/lm78.c index 27b21a9c..e91d31be 100644 --- a/src/lm78.c +++ b/src/lm78.c @@ -448,7 +448,7 @@ int lm78_detect_smbus(struct i2c_adapter *adapter) /* Later on, we will keep a list of registered addresses for each adapter, and check whether they are used here */ - if (smbus_read_byte_data(adapter,address,LM78_REG_CONFIG) == 0xff) + if (smbus_read_byte_data(adapter,address,LM78_REG_CONFIG) < 0) continue; /* Real detection code goes here */ @@ -467,6 +467,11 @@ int lm78_detect_smbus(struct i2c_adapter *adapter) type = lm79; type_name = "lm79"; client_name = "LM79 chip"; + } else if (err == 0x02) { + printk("lm78.o: Warning: Winbond W83781D detected (treated as a LM79)\n"); + type = lm79; + type_name = "lm79"; + client_name = "LM79 chip"; } else { #ifdef DEBUG printk("lm78.o: warning: probed non-lm78 chip?!? (%x)\n",err);