Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7183
b: refs/heads/master
c: 4c9337d
h: refs/heads/master
i:
  7181: 5cf781d
  7179: 9c623ed
  7175: 2961cbe
  7167: 4561ccd
v: v3
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Sep 5, 2005
1 parent 8092674 commit 63394e9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 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: a89ba0bc02e82920a0f4137aa5d655ac0366cc28
refs/heads/master: 4c9337da37c877e53a64696fc8524f642d446cba
2 changes: 2 additions & 0 deletions trunk/Documentation/i2c/porting-clients
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ Technical changes:
device_create_file. Move the driver initialization before any
sysfs file creation.
Drop client->id.
Drop any 24RF08 corruption prevention you find, as this is now done
at the i2c-core level, and doing it twice voids it.

* [Init] Limits must not be set by the driver (can be done later in
user-space). Chip should not be reset default (although a module
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/i2c/chips/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,6 @@ int eeprom_detect(struct i2c_adapter *adapter, int address, int kind)
struct eeprom_data *data;
int err = 0;

/* prevent 24RF08 corruption */
if (kind < 0)
i2c_smbus_xfer(adapter, address, 0, 0, 0,
I2C_SMBUS_QUICK, NULL);

/* There are three ways we can read the EEPROM data:
(1) I2C block reads (faster, but unsupported by most adapters)
(2) Consecutive byte reads (100% overhead)
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/i2c/chips/max6875.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ static int max6875_detect(struct i2c_adapter *adapter, int address, int kind)
struct max6875_data *data;
int err = 0;

/* Prevent 24rf08 corruption (in case of user error) */
if (kind < 0)
i2c_smbus_xfer(adapter, address, 0, 0, 0,
I2C_SMBUS_QUICK, NULL);

if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_BYTE_DATA
| I2C_FUNC_SMBUS_READ_BYTE))
return 0;
Expand Down
13 changes: 10 additions & 3 deletions trunk/drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,9 +679,16 @@ static int i2c_probe_address(struct i2c_adapter *adapter, int addr, int kind,
return 0;

/* Make sure there is something at this address, unless forced */
if (kind < 0
&& i2c_smbus_xfer(adapter, addr, 0, 0, 0, I2C_SMBUS_QUICK, NULL) < 0)
return 0;
if (kind < 0) {
if (i2c_smbus_xfer(adapter, addr, 0, 0, 0,
I2C_SMBUS_QUICK, NULL) < 0)
return 0;

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

/* Finally call the custom detection function */
err = found_proc(adapter, addr, kind);
Expand Down

0 comments on commit 63394e9

Please sign in to comment.