iio: adc: at91-sama5d2_adc: fix differential channels in triggered mode
authorEugen Hristev <eugen.hristev@microchip.com>
Tue, 28 Jan 2020 12:57:39 +0000 (12:57 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2020 14:34:21 +0000 (16:34 +0200)
commit9d25ef1abe73f42c6cf40ca6505dee606742ec8b
tree3cc93d21c970ed1efcf52204d9b4eff8b350c0fd
parentc9a99f738913f03ab48ddd1220b651e71fbd9e79
iio: adc: at91-sama5d2_adc: fix differential channels in triggered mode

[ Upstream commit a500f3bd787f8224341e44b238f318c407b10897 ]

The differential channels require writing the channel offset register (COR).
Otherwise they do not work in differential mode.
The configuration of COR is missing in triggered mode.

Fixes: 5e1a1da0f8c9 ("iio: adc: at91-sama5d2_adc: add hw trigger and buffer support")
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/adc/at91-sama5d2_adc.c