summaryrefslogtreecommitdiff
path: root/drivers/iio/counter
diff options
context:
space:
mode:
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>2018-05-24 23:37:46 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-06-10 13:52:28 +0300
commit2873c3f0e2bd12a7612e905c920c058855f4072a (patch)
treed99c9396aa00658acaa5c48e7d20bd2717d3fd48 /drivers/iio/counter
parent3ca24ce9ff764bc27bceb9b2fd8ece74846c3fd3 (diff)
downloadlinux-2873c3f0e2bd12a7612e905c920c058855f4072a.tar.xz
iio: 104-quad-8: Fix off-by-one error in register selection
The reset flags operation is selected by bit 2 in the "Reset and Load Signals Decoders" register, not bit 1. Fixes: 28e5d3bb0325 ("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>
Diffstat (limited to 'drivers/iio/counter')
-rw-r--r--drivers/iio/counter/104-quad-8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/counter/104-quad-8.c b/drivers/iio/counter/104-quad-8.c
index b56985078d8c..4be85ec54af4 100644
--- a/drivers/iio/counter/104-quad-8.c
+++ b/drivers/iio/counter/104-quad-8.c
@@ -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);