* [PATCH RFT] PWM: twl: actually disable twl6030 PWMs
@ 2014-04-09 9:21 Axel Lin
2014-04-09 9:32 ` Peter Ujfalusi
2014-05-08 21:56 ` Thierry Reding
0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2014-04-09 9:21 UTC (permalink / raw)
To: Thierry Reding; +Cc: Peter Ujfalusi, linux-pwm
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RFT] PWM: twl: actually disable twl6030 PWMs
2014-04-09 9:21 [PATCH RFT] PWM: twl: actually disable twl6030 PWMs Axel Lin
@ 2014-04-09 9:32 ` Peter Ujfalusi
2014-05-08 4:09 ` Axel Lin
2014-05-08 21:56 ` Thierry Reding
1 sibling, 1 reply; 4+ messages in thread
From: Peter Ujfalusi @ 2014-04-09 9:32 UTC (permalink / raw)
To: Axel Lin, Thierry Reding; +Cc: linux-pwm
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RFT] PWM: twl: actually disable twl6030 PWMs
2014-04-09 9:32 ` Peter Ujfalusi
@ 2014-05-08 4:09 ` Axel Lin
0 siblings, 0 replies; 4+ messages in thread
From: Axel Lin @ 2014-05-08 4:09 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: Thierry Reding, linux-pwm
2014-04-09 17:32 GMT+08:00 Peter Ujfalusi <peter.ujfalusi@ti.com>:
> 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>
Hi Thierry,
Would you pick up this patch?
Regards,
Axel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RFT] PWM: twl: actually disable twl6030 PWMs
2014-04-09 9:21 [PATCH RFT] PWM: twl: actually disable twl6030 PWMs Axel Lin
2014-04-09 9:32 ` Peter Ujfalusi
@ 2014-05-08 21:56 ` Thierry Reding
1 sibling, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2014-05-08 21:56 UTC (permalink / raw)
To: Axel Lin; +Cc: Peter Ujfalusi, linux-pwm
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
On Wed, Apr 09, 2014 at 05:21:26PM +0800, 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.
>
> Regards,
> Axel
> drivers/pwm/pwm-twl.c | 8 --------
> 1 file changed, 8 deletions(-)
Applied, thanks.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-08 21:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-09 9:21 [PATCH RFT] PWM: twl: actually disable twl6030 PWMs Axel Lin
2014-04-09 9:32 ` Peter Ujfalusi
2014-05-08 4:09 ` Axel Lin
2014-05-08 21:56 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).