iio: trigger: stm32-timer: preset shouldn't be buffered
authorFabrice Gasnier <fabrice.gasnier@st.com>
Mon, 18 Sep 2017 10:05:30 +0000 (12:05 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 24 Sep 2017 12:08:48 +0000 (13:08 +0100)
commit0a56eabc4e3f730782e4a9f3af4f60aa03a8a849
tree4777099a1cb23ba0532eeea75f3561dcf260aed8
parent53063846affd27def6f96e13a9fb80b9a3c2d126
iio: trigger: stm32-timer: preset shouldn't be buffered

Currently, setting preset value (ARR) will update directly 'Auto reload
value' only on 1st write access. But then, ARPE is set. This makes
ARR a shadow register. Preset value should be updated upon each
write request: ensure ARPE is 0. This fixes successive writes to
preset attribute.

Fixes: 4adec7da0536 ("iio: stm32 trigger: Add quadrature encoder device")
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/trigger/stm32-timer-trigger.c