]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 09:56:11 +0000 (11:56 +0200)
commit2fbaf4bc9da3af4e15a68cb0b35a1d95667bdb4d
tree1ddf59a3f0c2cfa27a742a645454deba4befc57e
parent5340b04493ab495b8a854d041887300cf6525fe5
iio: trigger: stm32-timer: fix a corner case to write preset

commit b7a9776c1f9443326632486fcbd82dca82f8511e upstream.

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: 93fbe91b5521 ("iio: Add STM32 timer trigger driver")
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/trigger/stm32-timer-trigger.c