pwm: twl: Really disable twl6030 PWMs
authorAxel Lin <axel.lin@ingics.com>
Wed, 9 Apr 2014 09:21:26 +0000 (17:21 +0800)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 8 May 2014 21:41:47 +0000 (23:41 +0200)
Current twl6030_pwm_disable() implementation writes TWL6030_TOGGLE3_REG
twice, the second write sets TWL6030_PWMXEN bits so the PWM clock does
not disable.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-twl.c

index b99a50e626a64f82ca98783cc373bd2bc4c82e01..04f76725d59158e1da8fa6968b470edfc0670d36 100644 (file)
@@ -263,14 +263,6 @@ static void twl6030_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
        val |= TWL6030_PWM_TOGGLE(pwm->hwpwm, TWL6030_PWMXR);
        val &= ~TWL6030_PWM_TOGGLE(pwm->hwpwm, TWL6030_PWMXS | TWL6030_PWMXEN);
 
-       ret = twl_i2c_write_u8(TWL6030_MODULE_ID1, val, TWL6030_TOGGLE3_REG);
-       if (ret < 0) {
-               dev_err(chip->dev, "%s: Failed to read TOGGLE3\n", pwm->label);
-               goto out;
-       }
-
-       val |= TWL6030_PWM_TOGGLE(pwm->hwpwm, TWL6030_PWMXS | TWL6030_PWMXEN);
-
        ret = twl_i2c_write_u8(TWL6030_MODULE_ID1, val, TWL6030_TOGGLE3_REG);
        if (ret < 0) {
                dev_err(chip->dev, "%s: Failed to disable PWM\n", pwm->label);