iio: imu: st_lsm6dsx: do not use a fixed read len in read_oneshot
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Sat, 17 Nov 2018 18:04:27 +0000 (19:04 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 25 Nov 2018 14:06:30 +0000 (14:06 +0000)
commit3aed83caa2f7370a04cc0be0e86d0939eba0c5f7
tree3295837a7a1830d47ff2c46f4187c9c2b2949f3b
parent8611b69e95464da1458c1430c64b147b0f51058a
iio: imu: st_lsm6dsx: do not use a fixed read len in read_oneshot

Generalize st_lsm6dsx_shub_read_oneshot in order to not use a fixed
read length and take into account iio channel realbits for single
read operations

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c