Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190542
b: refs/heads/master
c: b1d4b39
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare committed May 4, 2010
1 parent 5c80906 commit 886dfa5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4a7b9b04de15f6b63da5ccdd373ffa3057a3681
refs/heads/master: b1d4b390ea4bb480e65974ce522a04022608a8df
21 changes: 16 additions & 5 deletions trunk/drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,12 +1264,23 @@ static int i2c_detect_address(struct i2c_client *temp_client,
return 0;

/* Make sure there is something at this address */
if (i2c_smbus_xfer(adapter, addr, 0, 0, 0, I2C_SMBUS_QUICK, NULL) < 0)
return 0;
if (addr == 0x73 && (adapter->class & I2C_CLASS_HWMON)) {
/* Special probe for FSC hwmon chips */
union i2c_smbus_data dummy;

/* Prevent 24RF08 corruption */
if ((addr & ~0x0f) == 0x50)
i2c_smbus_xfer(adapter, addr, 0, 0, 0, I2C_SMBUS_QUICK, NULL);
if (i2c_smbus_xfer(adapter, addr, 0, I2C_SMBUS_READ, 0,
I2C_SMBUS_BYTE_DATA, &dummy) < 0)
return 0;
} else {
if (i2c_smbus_xfer(adapter, addr, 0, I2C_SMBUS_WRITE, 0,
I2C_SMBUS_QUICK, NULL) < 0)
return 0;

/* Prevent 24RF08 corruption */
if ((addr & ~0x0f) == 0x50)
i2c_smbus_xfer(adapter, addr, 0, I2C_SMBUS_WRITE, 0,
I2C_SMBUS_QUICK, NULL);
}

/* Finally call the custom detection function */
memset(&info, 0, sizeof(struct i2c_board_info));
Expand Down

0 comments on commit 886dfa5

Please sign in to comment.