diff options
author | Gregor Boirie <gregor.boirie@parrot.com> | 2016-04-19 12:18:39 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-05-29 18:04:17 +0300 |
commit | 169a88c1ee19b0734c9703d51a6d8ebe538f5bc3 (patch) | |
tree | 05f6d4fe1b34fa122a266cbaae8f06e34f88a857 /drivers/iio | |
parent | dfe3ab1af0765eb800da5ce4cb4c685783096d9c (diff) | |
download | linux-169a88c1ee19b0734c9703d51a6d8ebe538f5bc3.tar.xz |
iio:st_sensors: emulate SMBus block read if needed
Use SMBus "block read" protocol only when supported by adapter.
Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/common/st_sensors/st_sensors_i2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/common/st_sensors/st_sensors_i2c.c b/drivers/iio/common/st_sensors/st_sensors_i2c.c index 98cfee296d46..b43aa36031f8 100644 --- a/drivers/iio/common/st_sensors/st_sensors_i2c.c +++ b/drivers/iio/common/st_sensors/st_sensors_i2c.c @@ -48,8 +48,8 @@ static int st_sensors_i2c_read_multiple_byte( if (multiread_bit) reg_addr |= ST_SENSORS_I2C_MULTIREAD; - return i2c_smbus_read_i2c_block_data(to_i2c_client(dev), - reg_addr, len, data); + return i2c_smbus_read_i2c_block_data_or_emulated(to_i2c_client(dev), + reg_addr, len, data); } static int st_sensors_i2c_write_byte(struct st_sensor_transfer_buffer *tb, |