aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-19 20:48:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-19 20:48:12 -0400
commit78975f23cba0cd195db01cdbd6eb48138a655890 (patch)
tree0e808c0cfe220bd8fb00d66985d71655345904cb /drivers/misc
parentfeaa7cb5c59416143432829b15826be76605b8fe (diff)
parent73e8b0528346e88a0624f2d9821f382cd6256677 (diff)
Merge branch 'i2c/for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang: - Peter Rosin did some major rework on the locking of i2c muxes by seperating parent-locked muxes and mux-locked muxes. This avoids deadlocks/workarounds when the mux itself needs i2c commands for muxing. And as a side-effect, other workarounds in the media layer could be eliminated. Also, Peter stepped up as the i2c mux maintainer and will keep an eye on these changes. - major updates to the octeon driver - add a helper to the core to generate the address+rw_bit octal and make drivers use it - quite a bunch of driver updates * 'i2c/for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (84 commits) i2c: rcar: add DMA support i2c: st: Implement bus clear i2c: only check scl functions when using generic recovery i2c: algo-bit: declare i2c_bit_quirk_no_clk_stretch as static i2c: tegra: disable clock before returning error [media] rtl2832: regmap is aware of lockdep, drop local locking hack [media] rtl2832_sdr: get rid of empty regmap wrappers [media] rtl2832: change the i2c gate to be mux-locked [media] si2168: change the i2c gate to be mux-locked iio: imu: inv_mpu6050: change the i2c gate to be mux-locked i2c: mux: document i2c muxes and elaborate on parent-/mux-locked muxes i2c: mux: relax locking of the top i2c adapter during mux-locked muxing i2c: muxes always lock the parent adapter i2c: allow adapter drivers to override the adapter locking i2c: uniphier: add "\n" at the end of error log i2c: mv64xxx: remove CONFIG_HAVE_CLK conditionals i2c: mv64xxx: use clk_{prepare_enable,disable_unprepare} i2c: mv64xxx: handle probe deferral for the clock i2c: mv64xxx: enable the driver on ARCH_MVEBU i2c: octeon: Add workaround for broken irqs on CN3860 ...
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/eeprom/at24.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 089d6943f68a..6cc17b7779a5 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -245,8 +245,7 @@ static ssize_t at24_eeprom_read(struct at24_data *at24, char *buf,
245 if (status == count) 245 if (status == count)
246 return count; 246 return count;
247 247
248 /* REVISIT: at HZ=100, this is sloooow */ 248 usleep_range(1000, 1500);
249 msleep(1);
250 } while (time_before(read_time, timeout)); 249 } while (time_before(read_time, timeout));
251 250
252 return -ETIMEDOUT; 251 return -ETIMEDOUT;
@@ -365,8 +364,7 @@ static ssize_t at24_eeprom_write(struct at24_data *at24, const char *buf,
365 if (status == count) 364 if (status == count)
366 return count; 365 return count;
367 366
368 /* REVISIT: at HZ=100, this is sloooow */ 367 usleep_range(1000, 1500);
369 msleep(1);
370 } while (time_before(write_time, timeout)); 368 } while (time_before(write_time, timeout));
371 369
372 return -ETIMEDOUT; 370 return -ETIMEDOUT;
@@ -544,10 +542,7 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
544 } else { 542 } else {
545 return -EPFNOSUPPORT; 543 return -EPFNOSUPPORT;
546 } 544 }
547 }
548 545
549 /* Use I2C operations unless we're stuck with SMBus extensions. */
550 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
551 if (i2c_check_functionality(client->adapter, 546 if (i2c_check_functionality(client->adapter,
552 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)) { 547 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)) {
553 use_smbus_write = I2C_SMBUS_I2C_BLOCK_DATA; 548 use_smbus_write = I2C_SMBUS_I2C_BLOCK_DATA;