Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 169a88c1 authored by Gregor Boirie's avatar Gregor Boirie Committed by Jonathan Cameron
Browse files

iio:st_sensors: emulate SMBus block read if needed



Use SMBus "block read" protocol only when supported by adapter.

Signed-off-by: default avatarGregor Boirie <gregor.boirie@parrot.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent dfe3ab1a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ 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),
	return i2c_smbus_read_i2c_block_data_or_emulated(to_i2c_client(dev),
							 reg_addr, len, data);
}