提交 2873c3f0 编写于 作者: W William Breathitt Gray 提交者: Jonathan Cameron

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: 28e5d3bb ("iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8")
Signed-off-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
上级 3ca24ce9
...@@ -138,7 +138,7 @@ static int quad8_write_raw(struct iio_dev *indio_dev, ...@@ -138,7 +138,7 @@ static int quad8_write_raw(struct iio_dev *indio_dev,
outb(val >> (8 * i), base_offset); outb(val >> (8 * i), base_offset);
/* Reset Borrow, Carry, Compare, and Sign flags */ /* Reset Borrow, Carry, Compare, and Sign flags */
outb(0x02, base_offset + 1); outb(0x04, base_offset + 1);
/* Reset Error flag */ /* Reset Error flag */
outb(0x06, base_offset + 1); outb(0x06, base_offset + 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册