pwm: stm32: Remove automatic output enable
authorFabrice Gasnier <fabrice.gasnier@st.com>
Thu, 21 Nov 2019 10:58:00 +0000 (11:58 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 20 Jan 2020 12:47:36 +0000 (13:47 +0100)
Don't use AOE (automatic output enable) by default. In case of break
events, PWM is automatically re-enabled on next PWM cycle otherwise.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-stm32.c

index 7ff48c14fae806f4ae8f003a35f1ba6797021203..d3be944f2ae96dbf3313ec593956ca440f1eb8c3 100644 (file)
@@ -377,9 +377,7 @@ static int stm32_pwm_config(struct stm32_pwm *priv, int ch,
        else
                regmap_update_bits(priv->regmap, TIM_CCMR2, mask, ccmr);
 
-       regmap_update_bits(priv->regmap, TIM_BDTR,
-                          TIM_BDTR_MOE | TIM_BDTR_AOE,
-                          TIM_BDTR_MOE | TIM_BDTR_AOE);
+       regmap_update_bits(priv->regmap, TIM_BDTR, TIM_BDTR_MOE, TIM_BDTR_MOE);
 
        return 0;
 }