提交 169a88c1 编写于 作者: G Gregor Boirie 提交者: Jonathan Cameron

iio:st_sensors: emulate SMBus block read if needed

Use SMBus "block read" protocol only when supported by adapter.
Signed-off-by: NGregor Boirie <gregor.boirie@parrot.com>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 dfe3ab1a
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册