linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pwm: samsung: do not set manual update bit in pwm_samsung_config
@ 2014-05-12 14:56 Ajay Kumar
  2014-05-12 14:59 ` Ajay kumar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ajay Kumar @ 2014-05-12 14:56 UTC (permalink / raw)
  To: linux-pwm
  Cc: linux-samsung-soc, ajaynumb, thierry.reding, tomasz.figa,
	abrestic, jg1.han, sachin.kamat, joshi, prashanth.g, Ajay Kumar

pwm_samsung_config sets manual update bit via call to
pwm_samsung_enable even when the channel is already running.
This causes noticable flickers on display if we try to change
the backlight value from 0 to MAX, continiously.

So, we remove the call to pwm_samsung_enable from
pwm_samsung_config to avoid the flicker and this change doesn't
harm normal working since the pwm_bl core already takes care of
calling pwm_samsung_enable whenever needed.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
 drivers/pwm/pwm-samsung.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c
index d66529a..ba6b650 100644
--- a/drivers/pwm/pwm-samsung.c
+++ b/drivers/pwm/pwm-samsung.c
@@ -335,9 +335,6 @@ static int pwm_samsung_config(struct pwm_chip *chip, struct pwm_device *pwm,
 	writel(tcnt, our_chip->base + REG_TCNTB(pwm->hwpwm));
 	writel(tcmp, our_chip->base + REG_TCMPB(pwm->hwpwm));
 
-	if (test_bit(PWMF_ENABLED, &pwm->flags))
-		pwm_samsung_enable(chip, pwm);
-
 	chan->period_ns = period_ns;
 	chan->tin_ns = tin_ns;
 	chan->duty_ns = duty_ns;
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] pwm: samsung: do not set manual update bit in pwm_samsung_config
  2014-05-12 14:56 [PATCH] pwm: samsung: do not set manual update bit in pwm_samsung_config Ajay Kumar
@ 2014-05-12 14:59 ` Ajay kumar
  2014-05-12 17:11 ` Tomasz Figa
  2014-05-21 10:20 ` Thierry Reding
  2 siblings, 0 replies; 4+ messages in thread
From: Ajay kumar @ 2014-05-12 14:59 UTC (permalink / raw)
  To: linux-pwm
  Cc: linux-samsung-soc@vger.kernel.org, Thierry Reding, Tomasz Figa,
	Andrew Bresticker, Jingoo Han, Sachin Kamat, sunil joshi,
	Prashanth G, Ajay Kumar

This is a simpler version of https://patchwork.kernel.org/patch/3113001/

On Mon, May 12, 2014 at 8:26 PM, Ajay Kumar <ajaykumar.rs@samsung.com> wrote:
> pwm_samsung_config sets manual update bit via call to
> pwm_samsung_enable even when the channel is already running.
> This causes noticable flickers on display if we try to change
> the backlight value from 0 to MAX, continiously.
>
> So, we remove the call to pwm_samsung_enable from
> pwm_samsung_config to avoid the flicker and this change doesn't
> harm normal working since the pwm_bl core already takes care of
> calling pwm_samsung_enable whenever needed.
>
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> ---
>  drivers/pwm/pwm-samsung.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c
> index d66529a..ba6b650 100644
> --- a/drivers/pwm/pwm-samsung.c
> +++ b/drivers/pwm/pwm-samsung.c
> @@ -335,9 +335,6 @@ static int pwm_samsung_config(struct pwm_chip *chip, struct pwm_device *pwm,
>         writel(tcnt, our_chip->base + REG_TCNTB(pwm->hwpwm));
>         writel(tcmp, our_chip->base + REG_TCMPB(pwm->hwpwm));
>
> -       if (test_bit(PWMF_ENABLED, &pwm->flags))
> -               pwm_samsung_enable(chip, pwm);
> -
>         chan->period_ns = period_ns;
>         chan->tin_ns = tin_ns;
>         chan->duty_ns = duty_ns;
> --
> 1.8.3.2
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pwm: samsung: do not set manual update bit in pwm_samsung_config
  2014-05-12 14:56 [PATCH] pwm: samsung: do not set manual update bit in pwm_samsung_config Ajay Kumar
  2014-05-12 14:59 ` Ajay kumar
@ 2014-05-12 17:11 ` Tomasz Figa
  2014-05-21 10:20 ` Thierry Reding
  2 siblings, 0 replies; 4+ messages in thread
From: Tomasz Figa @ 2014-05-12 17:11 UTC (permalink / raw)
  To: Ajay Kumar, linux-pwm
  Cc: linux-samsung-soc, ajaynumb, thierry.reding, abrestic, jg1.han,
	sachin.kamat, joshi, prashanth.g

Hi Ajay,

On 12.05.2014 16:56, Ajay Kumar wrote:
> pwm_samsung_config sets manual update bit via call to
> pwm_samsung_enable even when the channel is already running.
> This causes noticable flickers on display if we try to change
> the backlight value from 0 to MAX, continiously.
> 
> So, we remove the call to pwm_samsung_enable from
> pwm_samsung_config to avoid the flicker and this change doesn't
> harm normal working since the pwm_bl core already takes care of
> calling pwm_samsung_enable whenever needed.
> 
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> ---
>  drivers/pwm/pwm-samsung.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c
> index d66529a..ba6b650 100644
> --- a/drivers/pwm/pwm-samsung.c
> +++ b/drivers/pwm/pwm-samsung.c
> @@ -335,9 +335,6 @@ static int pwm_samsung_config(struct pwm_chip *chip, struct pwm_device *pwm,
>  	writel(tcnt, our_chip->base + REG_TCNTB(pwm->hwpwm));
>  	writel(tcmp, our_chip->base + REG_TCMPB(pwm->hwpwm));
>  
> -	if (test_bit(PWMF_ENABLED, &pwm->flags))
> -		pwm_samsung_enable(chip, pwm);
> -
>  	chan->period_ns = period_ns;
>  	chan->tin_ns = tin_ns;
>  	chan->duty_ns = duty_ns;
> 

Reviewed-by: Tomasz Figa <t.figa@samsung.com>

Best regards,
Tomasz

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pwm: samsung: do not set manual update bit in pwm_samsung_config
  2014-05-12 14:56 [PATCH] pwm: samsung: do not set manual update bit in pwm_samsung_config Ajay Kumar
  2014-05-12 14:59 ` Ajay kumar
  2014-05-12 17:11 ` Tomasz Figa
@ 2014-05-21 10:20 ` Thierry Reding
  2 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2014-05-21 10:20 UTC (permalink / raw)
  To: Ajay Kumar
  Cc: linux-pwm, linux-samsung-soc, ajaynumb, tomasz.figa, abrestic,
	jg1.han, sachin.kamat, joshi, prashanth.g

[-- Attachment #1: Type: text/plain, Size: 708 bytes --]

On Mon, May 12, 2014 at 08:26:21PM +0530, Ajay Kumar wrote:
> pwm_samsung_config sets manual update bit via call to
> pwm_samsung_enable even when the channel is already running.
> This causes noticable flickers on display if we try to change
> the backlight value from 0 to MAX, continiously.
> 
> So, we remove the call to pwm_samsung_enable from
> pwm_samsung_config to avoid the flicker and this change doesn't
> harm normal working since the pwm_bl core already takes care of
> calling pwm_samsung_enable whenever needed.
> 
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> ---
>  drivers/pwm/pwm-samsung.c | 3 ---
>  1 file changed, 3 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-21 10:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 14:56 [PATCH] pwm: samsung: do not set manual update bit in pwm_samsung_config Ajay Kumar
2014-05-12 14:59 ` Ajay kumar
2014-05-12 17:11 ` Tomasz Figa
2014-05-21 10:20 ` 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).