The driver first does a proper read of the data register, but right after that
it does a spi_read, which will overwrite the initial result.
It looks as if the extra spi_read was accidentally introduced in commit
a5e7363ca ("staging:iio:gyro:adis16130 drop control of adc resolution."), quite
likely due to a bad rebase.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
ret = spi_sync(st->us, &msg);
- ret = spi_read(st->us, st->buf, 4);
if (ret == 0)
*val = (st->buf[1] << 16) | (st->buf[2] << 8) | st->buf[3];