]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
pwm: meson: Don't disable PWM when setting duty repeatedly
authorBichao Zheng <bichao.zheng@amlogic.com>
Mon, 1 Apr 2019 18:18:17 +0000 (20:18 +0200)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit a279345807e1e0ae79567a52cfdd9d30c9174a3c ]

There is an abnormally low about 20ms,when setting duty repeatedly.
Because setting the duty will disable PWM and then enable. Delete
this operation now.

Fixes: 211ed630753d2f ("pwm: Add support for Meson PWM Controller")
Signed-off-by: Bichao Zheng <bichao.zheng@amlogic.com>
[ Dropped code instead of hiding it behind a comment ]
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/pwm/pwm-meson.c

index 9551f896dd6f38b170f72840c7dd33c7d335106c..3d2c36963a4fc8e2fffdf64a623057815c6d6b5d 100644 (file)
@@ -325,11 +325,6 @@ static int meson_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
        if (state->period != channel->state.period ||
            state->duty_cycle != channel->state.duty_cycle ||
            state->polarity != channel->state.polarity) {
-               if (channel->state.enabled) {
-                       meson_pwm_disable(meson, pwm->hwpwm);
-                       channel->state.enabled = false;
-               }
-
                if (state->polarity != channel->state.polarity) {
                        if (state->polarity == PWM_POLARITY_NORMAL)
                                meson->inverter_mask |= BIT(pwm->hwpwm);