All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "iio: trigger: stm32-timer: fix a corner case to write preset" has been added to the 4.13-stable tree
@ 2017-10-09 12:27 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-10-09 12:27 UTC (permalink / raw)
  To: fabrice.gasnier, Jonathan.Cameron, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    iio: trigger: stm32-timer: fix a corner case to write preset

to the 4.13-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iio-trigger-stm32-timer-fix-a-corner-case-to-write-preset.patch
and it can be found in the queue-4.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From b7a9776c1f9443326632486fcbd82dca82f8511e Mon Sep 17 00:00:00 2001
From: Fabrice Gasnier <fabrice.gasnier@st.com>
Date: Mon, 18 Sep 2017 12:05:31 +0200
Subject: iio: trigger: stm32-timer: fix a corner case to write preset

From: Fabrice Gasnier <fabrice.gasnier@st.com>

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 |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/iio/trigger/stm32-timer-trigger.c
+++ b/drivers/iio/trigger/stm32-timer-trigger.c
@@ -138,6 +138,7 @@ static void stm32_timer_stop(struct stm3
 		clk_disable(priv->clk);
 
 	/* Stop timer */
+	regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_ARPE, 0);
 	regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_CEN, 0);
 	regmap_write(priv->regmap, TIM_PSC, 0);
 	regmap_write(priv->regmap, TIM_ARR, 0);


Patches currently in stable-queue which might be from fabrice.gasnier@st.com are

queue-4.13/iio-adc-stm32-fix-bad-error-check-on-max_channels.patch
queue-4.13/iio-trigger-stm32-timer-preset-shouldn-t-be-buffered.patch
queue-4.13/iio-trigger-stm32-timer-fix-a-corner-case-to-write-preset.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-09 12:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09 12:27 Patch "iio: trigger: stm32-timer: fix a corner case to write preset" has been added to the 4.13-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.