All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: "'Lars-Peter Clausen'" <lars@metafoo.de>
Cc: "'Thierry Reding'" <thierry.reding@avionic-design.de>,
	linux-kernel@vger.kernel.org,
	"'Sascha Hauer'" <kernel@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	"'Dmitry Torokhov'" <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org,
	"'Bryan Wu'" <bryan.wu@canonical.com>,
	"'Richard Purdie'" <rpurdie@rpsys.net>,
	linux-leds@vger.kernel.org,
	"'Florian Tobias Schandinat'" <FlorianSchandinat@gmx.de>,
	linux-fbdev@vger.kernel.org,
	"'Benoît Thébaudeau'" <benoit.thebaudeau@advansee.com>,
	"'Jingoo Han'" <jg1.han@samsung.com>
Subject: Re: [PATCH] pwm: Call pwm_enable() before pwm_config()
Date: Thu, 30 Aug 2012 16:10:11 +0900	[thread overview]
Message-ID: <002001cd867e$7e964130$7bc2c390$%han@samsung.com> (raw)
In-Reply-To: <50364FA4.7000401@metafoo.de>

On Friday, August 24, 2012 12:44 AM, Lars-Peter Clausen wrote:
> 
> On 08/23/2012 04:19 PM, Benoît Thébaudeau wrote:
> > Some PWM drivers enable the clock of the PWM peripheral in pwm_enable(). Hence,
> > for these drivers, a call to pwm_config() does not have any effect before
> > pwm_enable() has been called.
> >
> > This patch fixes the PWM users to make sure that they call pwm_enable() before
> > pwm_config().
> >
> > This fixes the first setting of brightness through sysfs that had no effect with
> > leds-pwm and the i.MX PWM driver.
> 
> But isn't this a bug in the PWM peripheral driver? With this change the PWM
> will start with the old settings first. While this is not so much of a problem
> for a backlight (although it might cause a short flickering) it might cause
> problems for other applications, like using the PWM pin as a timing generator.
> In my opinion it's better to fix the PWM peripheral drivers which have this
> problem instead of trying to work around it in every user of the PWM API.

Hi Lars-Peter Clausen,

I think so.
It would be better to fix the PWM peripheral drivers.


Best regards,
Jingoo Han

> 
> - Lars
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


WARNING: multiple messages have this Message-ID (diff)
From: Jingoo Han <jg1.han@samsung.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] pwm: Call pwm_enable() before pwm_config()
Date: Thu, 30 Aug 2012 07:10:11 +0000	[thread overview]
Message-ID: <002001cd867e$7e964130$7bc2c390$%han@samsung.com> (raw)
In-Reply-To: <50364FA4.7000401@metafoo.de>

On Friday, August 24, 2012 12:44 AM, Lars-Peter Clausen wrote:
> 
> On 08/23/2012 04:19 PM, Benoît Thébaudeau wrote:
> > Some PWM drivers enable the clock of the PWM peripheral in pwm_enable(). Hence,
> > for these drivers, a call to pwm_config() does not have any effect before
> > pwm_enable() has been called.
> >
> > This patch fixes the PWM users to make sure that they call pwm_enable() before
> > pwm_config().
> >
> > This fixes the first setting of brightness through sysfs that had no effect with
> > leds-pwm and the i.MX PWM driver.
> 
> But isn't this a bug in the PWM peripheral driver? With this change the PWM
> will start with the old settings first. While this is not so much of a problem
> for a backlight (although it might cause a short flickering) it might cause
> problems for other applications, like using the PWM pin as a timing generator.
> In my opinion it's better to fix the PWM peripheral drivers which have this
> problem instead of trying to work around it in every user of the PWM API.

Hi Lars-Peter Clausen,

I think so.
It would be better to fix the PWM peripheral drivers.


Best regards,
Jingoo Han

> 
> - Lars
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


WARNING: multiple messages have this Message-ID (diff)
From: jg1.han@samsung.com (Jingoo Han)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pwm: Call pwm_enable() before pwm_config()
Date: Thu, 30 Aug 2012 16:10:11 +0900	[thread overview]
Message-ID: <002001cd867e$7e964130$7bc2c390$%han@samsung.com> (raw)
In-Reply-To: <50364FA4.7000401@metafoo.de>

On Friday, August 24, 2012 12:44 AM, Lars-Peter Clausen wrote:
> 
> On 08/23/2012 04:19 PM, Beno?t Th?baudeau wrote:
> > Some PWM drivers enable the clock of the PWM peripheral in pwm_enable(). Hence,
> > for these drivers, a call to pwm_config() does not have any effect before
> > pwm_enable() has been called.
> >
> > This patch fixes the PWM users to make sure that they call pwm_enable() before
> > pwm_config().
> >
> > This fixes the first setting of brightness through sysfs that had no effect with
> > leds-pwm and the i.MX PWM driver.
> 
> But isn't this a bug in the PWM peripheral driver? With this change the PWM
> will start with the old settings first. While this is not so much of a problem
> for a backlight (although it might cause a short flickering) it might cause
> problems for other applications, like using the PWM pin as a timing generator.
> In my opinion it's better to fix the PWM peripheral drivers which have this
> problem instead of trying to work around it in every user of the PWM API.

Hi Lars-Peter Clausen,

I think so.
It would be better to fix the PWM peripheral drivers.


Best regards,
Jingoo Han

> 
> - Lars
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2012-08-30  7:10 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <322770447.2755463.1345727876098.JavaMail.root@advansee.com>
2012-08-23 13:36 ` [BUG] leds-pwm: First setting of brightness does nothing Benoît Thébaudeau
2012-08-23 13:36   ` Benoît Thébaudeau
2012-08-23 14:19   ` [PATCH] pwm: Call pwm_enable() before pwm_config() Benoît Thébaudeau
2012-08-23 14:19     ` Benoît Thébaudeau
2012-08-23 14:19     ` Benoît Thébaudeau
2012-08-23 14:19     ` Benoît Thébaudeau
2012-08-23 15:43     ` Lars-Peter Clausen
2012-08-23 15:43       ` Lars-Peter Clausen
2012-08-23 15:43       ` Lars-Peter Clausen
2012-08-23 16:57       ` Benoît Thébaudeau
2012-08-23 16:57         ` Benoît Thébaudeau
2012-08-23 16:57         ` Benoît Thébaudeau
2012-08-23 16:57         ` Benoît Thébaudeau
2012-08-23 17:12         ` Lars-Peter Clausen
2012-08-23 17:12           ` Lars-Peter Clausen
2012-08-23 17:12           ` Lars-Peter Clausen
2012-08-23 17:19           ` Lars-Peter Clausen
2012-08-23 17:19             ` Lars-Peter Clausen
2012-08-23 17:19             ` Lars-Peter Clausen
2012-08-23 19:04             ` Thierry Reding
2012-08-23 19:04               ` Thierry Reding
2012-08-23 19:04               ` Thierry Reding
2012-09-20 19:05               ` Mark Brown
2012-09-20 19:05                 ` Mark Brown
2012-09-20 19:05                 ` Mark Brown
2012-08-23 19:11           ` Thierry Reding
2012-08-23 19:11             ` Thierry Reding
2012-08-23 19:11             ` Thierry Reding
2012-08-23 20:58             ` [PATCH] pwm-imx: Fix config / enable / disable Benoît Thébaudeau
2012-08-23 21:03               ` Benoît Thébaudeau
2012-08-23 21:03               ` Benoît Thébaudeau
2012-08-23 21:03               ` Benoît Thébaudeau
2012-08-28  7:37               ` Sascha Hauer
2012-08-28  7:37                 ` Sascha Hauer
2012-08-28  7:37                 ` Sascha Hauer
2012-08-28  7:37                 ` Sascha Hauer
2012-09-20 19:03           ` [PATCH] pwm: Call pwm_enable() before pwm_config() Mark Brown
2012-09-20 19:03             ` Mark Brown
2012-09-20 19:03             ` Mark Brown
2012-08-30  7:10       ` Jingoo Han [this message]
2012-08-30  7:10         ` Jingoo Han
2012-08-30  7:10         ` Jingoo Han

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='002001cd867e$7e964130$7bc2c390$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=FlorianSchandinat@gmx.de \
    --cc=benoit.thebaudeau@advansee.com \
    --cc=bryan.wu@canonical.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    --cc=thierry.reding@avionic-design.de \
    /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.