diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-05-12 19:20:04 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-05-12 19:20:04 -0400 |
commit | 1540c84b5ed657ed71dce06915bba461e6b09574 (patch) | |
tree | a449dc166800a1b0c429bb038bfc974e577eaf72 /drivers/i2c/i2c-core.c | |
parent | 1a3a403aa98b0ccabeb12abd7da90d33250ea36b (diff) | |
parent | 4640b4e7d9919e9629fe8456df94f71658431ef9 (diff) |
Merge branch '2.6.33.4' into rt/2.6.33
Conflicts:
Makefile
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r-- | drivers/i2c/i2c-core.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 10be7b5fbe97..855911ebdb4d 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -1210,12 +1210,23 @@ static int i2c_detect_address(struct i2c_client *temp_client, | |||
1210 | return 0; | 1210 | return 0; |
1211 | 1211 | ||
1212 | /* Make sure there is something at this address */ | 1212 | /* Make sure there is something at this address */ |
1213 | if (i2c_smbus_xfer(adapter, addr, 0, 0, 0, I2C_SMBUS_QUICK, NULL) < 0) | 1213 | if (addr == 0x73 && (adapter->class & I2C_CLASS_HWMON)) { |
1214 | return 0; | 1214 | /* Special probe for FSC hwmon chips */ |
1215 | union i2c_smbus_data dummy; | ||
1215 | 1216 | ||
1216 | /* Prevent 24RF08 corruption */ | 1217 | if (i2c_smbus_xfer(adapter, addr, 0, I2C_SMBUS_READ, 0, |
1217 | if ((addr & ~0x0f) == 0x50) | 1218 | I2C_SMBUS_BYTE_DATA, &dummy) < 0) |
1218 | i2c_smbus_xfer(adapter, addr, 0, 0, 0, I2C_SMBUS_QUICK, NULL); | 1219 | return 0; |
1220 | } else { | ||
1221 | if (i2c_smbus_xfer(adapter, addr, 0, I2C_SMBUS_WRITE, 0, | ||
1222 | I2C_SMBUS_QUICK, NULL) < 0) | ||
1223 | return 0; | ||
1224 | |||
1225 | /* Prevent 24RF08 corruption */ | ||
1226 | if ((addr & ~0x0f) == 0x50) | ||
1227 | i2c_smbus_xfer(adapter, addr, 0, I2C_SMBUS_WRITE, 0, | ||
1228 | I2C_SMBUS_QUICK, NULL); | ||
1229 | } | ||
1219 | 1230 | ||
1220 | /* Finally call the custom detection function */ | 1231 | /* Finally call the custom detection function */ |
1221 | memset(&info, 0, sizeof(struct i2c_board_info)); | 1232 | memset(&info, 0, sizeof(struct i2c_board_info)); |