Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1733999 > unrolled thread
| Started by | Fabrice Gasnier <fabrice.gasnier@st.com> |
|---|---|
| First post | 2017-09-18 12:10 +0200 |
| Last post | 2017-09-24 14:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/3] iio: trigger: stm32-timer: fix a corner case to write preset Fabrice Gasnier <fabrice.gasnier@st.com> - 2017-09-18 12:10 +0200
Re: [PATCH 2/3] iio: trigger: stm32-timer: fix a corner case to write preset Jonathan Cameron <jic23@kernel.org> - 2017-09-24 14:20 +0200
| From | Fabrice Gasnier <fabrice.gasnier@st.com> |
|---|---|
| Date | 2017-09-18 12:10 +0200 |
| Subject | [PATCH 2/3] iio: trigger: stm32-timer: fix a corner case to write preset |
| Message-ID | <ur1a3-4VA-29@gated-at.bofh.it> |
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>
---
drivers/iio/trigger/stm32-timer-trigger.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/trigger/stm32-timer-trigger.c b/drivers/iio/trigger/stm32-timer-trigger.c
index 34cc25b..eb212f8c 100644
--- a/drivers/iio/trigger/stm32-timer-trigger.c
+++ b/drivers/iio/trigger/stm32-timer-trigger.c
@@ -174,6 +174,7 @@ static void stm32_timer_stop(struct stm32_timer_trigger *priv)
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);
--
1.9.1
[toc] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2017-09-24 14:20 +0200 |
| Subject | Re: [PATCH 2/3] iio: trigger: stm32-timer: fix a corner case to write preset |
| Message-ID | <ute38-as-5@gated-at.bofh.it> |
| In reply to | #1733999 |
On Mon, 18 Sep 2017 12:05:31 +0200
Fabrice Gasnier <fabrice.gasnier@st.com> wrote:
> 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>
Applied to the fixes-togreg-post-rc1 branch of iio.git and
marked for stable.
Thanks,
Jonathan
> ---
> drivers/iio/trigger/stm32-timer-trigger.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/trigger/stm32-timer-trigger.c b/drivers/iio/trigger/stm32-timer-trigger.c
> index 34cc25b..eb212f8c 100644
> --- a/drivers/iio/trigger/stm32-timer-trigger.c
> +++ b/drivers/iio/trigger/stm32-timer-trigger.c
> @@ -174,6 +174,7 @@ static void stm32_timer_stop(struct stm32_timer_trigger *priv)
> 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);
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web