On 04/09/2014 12:21 PM, Axel Lin wrote: > 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 <[email protected]> > --- > Hi Peter, > I don't have this h/w handy to test. > I'd appreciate if you can review and test this patch.
You are right. The code was disabling the given PWM and then set the EN bit to one :o I don't have any explanation why it was like that, thanks for finding it! Acked-by: Peter Ujfalusi <[email protected]> > > Regards, > Axel > drivers/pwm/pwm-twl.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c > index b99a50e..04f7672 100644 > --- a/drivers/pwm/pwm-twl.c > +++ b/drivers/pwm/pwm-twl.c > @@ -265,14 +265,6 @@ static void twl6030_pwm_disable(struct pwm_chip *chip, > struct pwm_device *pwm) > > 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); > goto out; > } > -- Péter -- To unsubscribe from this list: send the line "unsubscribe linux-pwm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
