All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>, linux-pwm@vger.kernel.org
Subject: [PATCH RFT] PWM: twl: actually disable twl6030 PWMs
Date: Wed, 09 Apr 2014 17:21:26 +0800	[thread overview]
Message-ID: <1397035286.1002.1.camel@phoenix> (raw)

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.

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;
 	}
-- 
1.8.3.2




             reply	other threads:[~2014-04-09  9:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-09  9:21 Axel Lin [this message]
2014-04-09  9:32 ` [PATCH RFT] PWM: twl: actually disable twl6030 PWMs Peter Ujfalusi
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=1397035286.1002.1.camel@phoenix \
    --to=axel.lin@ingics.com \
    --cc=linux-pwm@vger.kernel.org \
    --cc=peter.ujfalusi@ti.com \
    --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.