From: jic23@kernel.org (Jonathan Cameron)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] iio: trigger: stm32-timer: fix a corner case to write preset
Date: Sun, 24 Sep 2017 13:10:27 +0100 [thread overview]
Message-ID: <20170924131027.2d6c5d90@archlinux> (raw)
In-Reply-To: <1505729132-1369-3-git-send-email-fabrice.gasnier@st.com>
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);
next prev parent reply other threads:[~2017-09-24 12:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 10:05 [PATCH 0/3] iio: trigger: stm32-timers fixes Fabrice Gasnier
2017-09-18 10:05 ` [PATCH 1/3] iio: trigger: stm32-timer: preset shouldn't be buffered Fabrice Gasnier
2017-09-24 12:09 ` Jonathan Cameron
2017-09-18 10:05 ` [PATCH 2/3] iio: trigger: stm32-timer: fix a corner case to write preset Fabrice Gasnier
2017-09-24 12:10 ` Jonathan Cameron [this message]
2017-09-18 10:05 ` [PATCH 3/3] iio: trigger: stm32-timer: enable clock when in master mode Fabrice Gasnier
2017-09-24 12:22 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170924131027.2d6c5d90@archlinux \
--to=jic23@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).