1
0
Fork 0

iio: 104-quad-8: Fix off-by-one error in register selection

[ Upstream commit 2873c3f0e2 ]

The reset flags operation is selected by bit 2 in the "Reset and Load
Signals Decoders" register, not bit 1.

Fixes: 28e5d3bb03 ("iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8")
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pull/10/head
William Breathitt Gray 2018-05-24 16:37:46 -04:00 committed by Greg Kroah-Hartman
parent a82a772da7
commit 99795ed0c6
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ static int quad8_write_raw(struct iio_dev *indio_dev,
outb(val >> (8 * i), base_offset);
/* Reset Borrow, Carry, Compare, and Sign flags */
outb(0x02, base_offset + 1);
outb(0x04, base_offset + 1);
/* Reset Error flag */
outb(0x06, base_offset + 1);