]> git.baikalelectronics.ru Git - kernel.git/commit
iio: trigger: stm32-timer: fix a corner case to write preset
authorFabrice Gasnier <fabrice.gasnier@st.com>
Mon, 18 Sep 2017 10:05:31 +0000 (12:05 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 24 Sep 2017 12:09:57 +0000 (13:09 +0100)
commitba64960e063884891c6f0c4582d317032633beaa
treec189564527a6dd09e643d384d0d2c4e3443f8f5e
parentb08a8d16d6ebcb963c46a892a55dfdc34846379d
iio: trigger: stm32-timer: fix a corner case to write preset

Balance timer start routine that sets ARPE: clear it in stop routine.
This fixes a corner case, when timer is used successively as trigger
(with sampling_frequency start/stop routines), then as a counter
(with preset).

Fixes: ec1299d9441c ("iio: Add STM32 timer trigger driver")
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