From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Axel Lin <axel.lin@ingics.com>,
Thierry Reding <thierry.reding@gmail.com>
Cc: linux-pwm@vger.kernel.org
Subject: Re: [PATCH RFT] PWM: twl: actually disable twl6030 PWMs
Date: Wed, 9 Apr 2014 12:32:31 +0300 [thread overview]
Message-ID: <534513AF.9030905@ti.com> (raw)
In-Reply-To: <1397035286.1002.1.camel@phoenix>
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 <axel.lin@ingics.com>
> ---
> 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 <peter.ujfalusi@ti.com>
>
> 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
next prev parent reply other threads:[~2014-04-09 9:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-09 9:21 [PATCH RFT] PWM: twl: actually disable twl6030 PWMs Axel Lin
2014-04-09 9:32 ` Peter Ujfalusi [this message]
2014-05-08 4:09 ` Axel Lin
2014-05-08 21:56 ` Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=534513AF.9030905@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=axel.lin@ingics.com \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.