From: Bichao Zheng Date: Mon, 1 Apr 2019 18:18:17 +0000 (+0200) Subject: pwm: meson: Don't disable PWM when setting duty repeatedly X-Git-Tag: Ubuntu-4.15.0-89.89~260 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=4efb4e51c90b8a4d822c940acba5706f399b6a6a;p=mirror_ubuntu-bionic-kernel.git pwm: meson: Don't disable PWM when setting duty repeatedly 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 [ Dropped code instead of hiding it behind a comment ] Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin Signed-off-by: Kamal Mostafa Signed-off-by: Khalid Elmously --- diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c index 9551f896dd6f..3d2c36963a4f 100644 --- a/drivers/pwm/pwm-meson.c +++ b/drivers/pwm/pwm-meson.c @@ -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);