aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/chips/eeprom.c5
-rw-r--r--drivers/i2c/chips/max6875.c5
-rw-r--r--drivers/i2c/i2c-core.c13
3 files changed, 10 insertions, 13 deletions
diff --git a/drivers/i2c/chips/eeprom.c b/drivers/i2c/chips/eeprom.c
index a27420a54c84..d58403a47908 100644
--- a/drivers/i2c/chips/eeprom.c
+++ b/drivers/i2c/chips/eeprom.c
@@ -161,11 +161,6 @@ int eeprom_detect(struct i2c_adapter *adapter, int address, int kind)
161 struct eeprom_data *data; 161 struct eeprom_data *data;
162 int err = 0; 162 int err = 0;
163 163
164 /* prevent 24RF08 corruption */
165 if (kind < 0)
166 i2c_smbus_xfer(adapter, address, 0, 0, 0,
167 I2C_SMBUS_QUICK, NULL);
168
169 /* There are three ways we can read the EEPROM data: 164 /* There are three ways we can read the EEPROM data:
170 (1) I2C block reads (faster, but unsupported by most adapters) 165 (1) I2C block reads (faster, but unsupported by most adapters)
171 (2) Consecutive byte reads (100% overhead) 166 (2) Consecutive byte reads (100% overhead)
diff --git a/drivers/i2c/chips/max6875.c b/drivers/i2c/chips/max6875.c
index 31cee2d34a17..9e1aeb69abf9 100644
--- a/drivers/i2c/chips/max6875.c
+++ b/drivers/i2c/chips/max6875.c
@@ -171,11 +171,6 @@ static int max6875_detect(struct i2c_adapter *adapter, int address, int kind)
171 struct max6875_data *data; 171 struct max6875_data *data;
172 int err = 0; 172 int err = 0;
173 173
174 /* Prevent 24rf08 corruption (in case of user error) */
175 if (kind < 0)
176 i2c_smbus_xfer(adapter, address, 0, 0, 0,
177 I2C_SMBUS_QUICK, NULL);
178
179 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_BYTE_DATA 174 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_BYTE_DATA
180 | I2C_FUNC_SMBUS_READ_BYTE)) 175 | I2C_FUNC_SMBUS_READ_BYTE))
181 return 0; 176 return 0;
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index bee0148dfab8..dda472e5e8be 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -679,9 +679,16 @@ static int i2c_probe_address(struct i2c_adapter *adapter, int addr, int kind,
679 return 0; 679 return 0;
680 680
681 /* Make sure there is something at this address, unless forced */ 681 /* Make sure there is something at this address, unless forced */
682 if (kind < 0 682 if (kind < 0) {
683 && i2c_smbus_xfer(adapter, addr, 0, 0, 0, I2C_SMBUS_QUICK, NULL) < 0) 683 if (i2c_smbus_xfer(adapter, addr, 0, 0, 0,
684 return 0; 684 I2C_SMBUS_QUICK, NULL) < 0)
685 return 0;
686
687 /* prevent 24RF08 corruption */
688 if ((addr & ~0x0f) == 0x50)
689 i2c_smbus_xfer(adapter, addr, 0, 0, 0,
690 I2C_SMBUS_QUICK, NULL);
691 }
685 692
686 /* Finally call the custom detection function */ 693 /* Finally call the custom detection function */
687 err = found_proc(adapter, addr, kind); 694 err = found_proc(adapter, addr, kind);