All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: "David Rivshin (Allworx)" <drivshin.allworx@gmail.com>
Cc: linux-pwm@vger.kernel.org,
	Neil Armstrong <narmstrong@baylibre.com>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Tony Lindgren <tony@atomide.com>,
	Grant Erickson <marathon96@gmail.com>, NeilBrown <neilb@suse.de>,
	Joachim Eastwood <manabian@gmail.com>,
	Adam Ford <aford173@gmail.com>
Subject: Re: [PATCH 0/4] pwm: omap-dmtimer: fix period/duty_cycle calculation
Date: Fri, 4 Mar 2016 22:18:38 +0100	[thread overview]
Message-ID: <20160304211838.GA21731@ulmo> (raw)
In-Reply-To: <20160304112736.660e4223.drivshin.allworx@gmail.com>

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

On Fri, Mar 04, 2016 at 11:27:36AM -0500, David Rivshin (Allworx) wrote:
> On Fri, 4 Mar 2016 16:19:48 +0100
> Thierry Reding <thierry.reding@gmail.com> wrote:
> 
> > On Fri, Feb 26, 2016 at 08:31:00PM -0500, David Rivshin (Allworx) wrote:
> > > On Fri, 29 Jan 2016 23:26:50 -0500
> > > "David Rivshin (Allworx)" <drivshin.allworx@gmail.com> wrote:
> > >   
> > > > From: David Rivshin <drivshin@allworx.com>
> > > > 
> > > > When using a short PWM period (approaching the min of 2/clk_rate),
> > > > pwm-omap-dmtimer does not produce accurate results. In the worst case a
> > > > requested period of 2/clk_rate would result in a real period of 4/clk_rate
> > > > instead. This is a series includes a fix for that problem, as well as
> > > > other related improvements, and is based on the current linux-pwm/for-next
> > > > tip.
> > > > 
> > > > I have tested on a Sitara AM335x platform, using a scope to verify the
> > > > output with a variety of periods and duty cycles. This includes a PWM
> > > > rate up clk_rate/2 with 50% duty cycle (e.g. generating fclk/2) with
> > > > both 32768Hz and 24MHz fclks. I do not have an OMAP4 board to test with,
> > > > although appropriate sections in the the reference manuals appear
> > > > substantially the same, so I believe the changes are equally correct
> > > > there.
> > > > 
> > > > Note that the OMAP4 TRMs do effectively state that the maximum PWM
> > > > rate is clk_rate/4, so at very fast PWM rates the behavior may not be
> > > > as reliable as I observed with Sitara. Although I suspect that it's
> > > > the same module and will also work, at least under some circumstances.
> > > > If anyone with OMAP4 hardware and a scope is so inclined, I would be
> > > > curious to know the results.
> > > > 
> > > > David Rivshin (4):
> > > >   pwm: omap-dmtimer: fix inaccurate period/duty_cycle calculation
> > > >   pwm: omap-dmtimer: add sanity checking for load and match values
> > > >   pwm: omap-dmtimer: round load and match values rather than truncate
> > > >   pwm: omap-dmtimer: add dev_dbg() message for effective period and duty
> > > >     cycle
> > > > 
> > > >  drivers/pwm/pwm-omap-dmtimer.c | 71 ++++++++++++++++++++++++++++++++----------
> > > >  1 file changed, 55 insertions(+), 16 deletions(-)
> > > >   
> > > 
> > > Hi Thierry,
> > > 
> > > Gentle ping. It does not look like you've taken this series, and I 
> > > wanted to make sure you're not waiting on something from me. It would 
> > > be nice to get at least the first patch into 4.5, if possible.  
> > 
> > I've applied patches 1 and 3, and I'm planning on sending out a pull
> > request for inclusion in v4.5-rc7 later on.
> 
> Thanks!
> 
> > Patches 2 and 4 didn't seem ready/critical, so let's finish those up
> > for v4.6-rc1.
> 
> I know there was a lot of discussion on 4, but I'm not sure what the 
> concern is on patch 2. Is there something specific you're thinking of?

Patch 2 sounded like some optional sanity checking which we didn't hit
anyway in the current code. Hence I didn't consider it a fix.

> FYI, I know that Adam Ford is using this driver as the backend for
> a pwm-backlight control. Without patch 2 this driver will not configure 
> the HW in a legal way at 0 or 100% duty cycle. However, I forget what 
> the practical effect of that is, and Adam seemed to indicate it was OK
> for his purposes.

Okay, I'll hold back a little longer to give you some time to test.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: thierry.reding@gmail.com (Thierry Reding)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/4] pwm: omap-dmtimer: fix period/duty_cycle calculation
Date: Fri, 4 Mar 2016 22:18:38 +0100	[thread overview]
Message-ID: <20160304211838.GA21731@ulmo> (raw)
In-Reply-To: <20160304112736.660e4223.drivshin.allworx@gmail.com>

On Fri, Mar 04, 2016 at 11:27:36AM -0500, David Rivshin (Allworx) wrote:
> On Fri, 4 Mar 2016 16:19:48 +0100
> Thierry Reding <thierry.reding@gmail.com> wrote:
> 
> > On Fri, Feb 26, 2016 at 08:31:00PM -0500, David Rivshin (Allworx) wrote:
> > > On Fri, 29 Jan 2016 23:26:50 -0500
> > > "David Rivshin (Allworx)" <drivshin.allworx@gmail.com> wrote:
> > >   
> > > > From: David Rivshin <drivshin@allworx.com>
> > > > 
> > > > When using a short PWM period (approaching the min of 2/clk_rate),
> > > > pwm-omap-dmtimer does not produce accurate results. In the worst case a
> > > > requested period of 2/clk_rate would result in a real period of 4/clk_rate
> > > > instead. This is a series includes a fix for that problem, as well as
> > > > other related improvements, and is based on the current linux-pwm/for-next
> > > > tip.
> > > > 
> > > > I have tested on a Sitara AM335x platform, using a scope to verify the
> > > > output with a variety of periods and duty cycles. This includes a PWM
> > > > rate up clk_rate/2 with 50% duty cycle (e.g. generating fclk/2) with
> > > > both 32768Hz and 24MHz fclks. I do not have an OMAP4 board to test with,
> > > > although appropriate sections in the the reference manuals appear
> > > > substantially the same, so I believe the changes are equally correct
> > > > there.
> > > > 
> > > > Note that the OMAP4 TRMs do effectively state that the maximum PWM
> > > > rate is clk_rate/4, so at very fast PWM rates the behavior may not be
> > > > as reliable as I observed with Sitara. Although I suspect that it's
> > > > the same module and will also work, at least under some circumstances.
> > > > If anyone with OMAP4 hardware and a scope is so inclined, I would be
> > > > curious to know the results.
> > > > 
> > > > David Rivshin (4):
> > > >   pwm: omap-dmtimer: fix inaccurate period/duty_cycle calculation
> > > >   pwm: omap-dmtimer: add sanity checking for load and match values
> > > >   pwm: omap-dmtimer: round load and match values rather than truncate
> > > >   pwm: omap-dmtimer: add dev_dbg() message for effective period and duty
> > > >     cycle
> > > > 
> > > >  drivers/pwm/pwm-omap-dmtimer.c | 71 ++++++++++++++++++++++++++++++++----------
> > > >  1 file changed, 55 insertions(+), 16 deletions(-)
> > > >   
> > > 
> > > Hi Thierry,
> > > 
> > > Gentle ping. It does not look like you've taken this series, and I 
> > > wanted to make sure you're not waiting on something from me. It would 
> > > be nice to get at least the first patch into 4.5, if possible.  
> > 
> > I've applied patches 1 and 3, and I'm planning on sending out a pull
> > request for inclusion in v4.5-rc7 later on.
> 
> Thanks!
> 
> > Patches 2 and 4 didn't seem ready/critical, so let's finish those up
> > for v4.6-rc1.
> 
> I know there was a lot of discussion on 4, but I'm not sure what the 
> concern is on patch 2. Is there something specific you're thinking of?

Patch 2 sounded like some optional sanity checking which we didn't hit
anyway in the current code. Hence I didn't consider it a fix.

> FYI, I know that Adam Ford is using this driver as the backend for
> a pwm-backlight control. Without patch 2 this driver will not configure 
> the HW in a legal way at 0 or 100% duty cycle. However, I forget what 
> the practical effect of that is, and Adam seemed to indicate it was OK
> for his purposes.

Okay, I'll hold back a little longer to give you some time to test.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160304/83c0a526/attachment-0001.sig>

  parent reply	other threads:[~2016-03-04 21:18 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-30  4:26 [PATCH 0/4] pwm: omap-dmtimer: fix period/duty_cycle calculation David Rivshin (Allworx)
2016-01-30  4:26 ` David Rivshin (Allworx)
2016-01-30  4:26 ` [PATCH 1/4] pwm: omap-dmtimer: fix inaccurate " David Rivshin (Allworx)
2016-01-30  4:26   ` David Rivshin (Allworx)
2016-02-03 10:23   ` Neil Armstrong
2016-02-03 10:23     ` Neil Armstrong
2016-02-15 20:24     ` Adam Ford
2016-02-15 20:24       ` Adam Ford
2016-03-04 15:17   ` Thierry Reding
2016-03-04 15:17     ` Thierry Reding
2016-01-30  4:26 ` [PATCH 2/4] pwm: omap-dmtimer: add sanity checking for load and match values David Rivshin (Allworx)
2016-01-30  4:26   ` David Rivshin (Allworx)
2016-02-01 18:35   ` David Rivshin (Allworx)
2016-02-01 18:35     ` David Rivshin (Allworx)
2016-02-03 10:24     ` Neil Armstrong
2016-02-03 10:24       ` Neil Armstrong
2016-01-30  4:26 ` [PATCH 3/4] pwm: omap-dmtimer: round load and match values rather than truncate David Rivshin (Allworx)
2016-01-30  4:26   ` David Rivshin (Allworx)
2016-02-03 10:24   ` Neil Armstrong
2016-02-03 10:24     ` Neil Armstrong
2016-03-04 15:18   ` Thierry Reding
2016-03-04 15:18     ` Thierry Reding
2016-01-30  4:26 ` [PATCH 4/4] pwm: omap-dmtimer: add dev_dbg() message for effective period and duty cycle David Rivshin (Allworx)
2016-01-30  4:26   ` David Rivshin (Allworx)
2016-01-30 14:51   ` Neil Armstrong
2016-01-30 14:51     ` Neil Armstrong
2016-02-01 18:22     ` David Rivshin (Allworx)
2016-02-01 18:22       ` David Rivshin (Allworx)
2016-02-01 18:59       ` Tony Lindgren
2016-02-01 18:59         ` Tony Lindgren
2016-02-02 16:23         ` Thierry Reding
2016-02-02 16:23           ` Thierry Reding
2016-02-02 23:44           ` David Rivshin (Allworx)
2016-02-02 23:44             ` David Rivshin (Allworx)
2016-02-03 14:14             ` Thierry Reding
2016-02-03 14:14               ` Thierry Reding
2016-02-05 19:51               ` David Rivshin (Allworx)
2016-02-05 19:51                 ` David Rivshin (Allworx)
2016-02-05 19:51                 ` David Rivshin (Allworx)
2016-02-09 12:49                 ` Neil Armstrong
2016-02-09 12:49                   ` Neil Armstrong
2016-01-30 14:52 ` [PATCH 0/4] pwm: omap-dmtimer: fix period/duty_cycle calculation Neil Armstrong
2016-01-30 14:52   ` Neil Armstrong
2016-02-01 20:14   ` David Rivshin (Allworx)
2016-02-01 20:14     ` David Rivshin (Allworx)
2016-02-27  1:31 ` David Rivshin (Allworx)
2016-02-27  1:31   ` David Rivshin (Allworx)
2016-03-04 15:19   ` Thierry Reding
2016-03-04 15:19     ` Thierry Reding
2016-03-04 16:27     ` David Rivshin (Allworx)
2016-03-04 16:27       ` David Rivshin (Allworx)
2016-03-04 16:29       ` Adam Ford
2016-03-04 20:01         ` David Rivshin (Allworx)
2016-03-04 20:01           ` David Rivshin (Allworx)
2016-03-04 20:03           ` Adam Ford
2016-03-04 20:03             ` Adam Ford
2016-03-04 21:18       ` Thierry Reding [this message]
2016-03-04 21:18         ` Thierry Reding
2016-03-04 23:20         ` David Rivshin (Allworx)
2016-03-04 23:20           ` David Rivshin (Allworx)
2016-03-08 23:23           ` Adam Ford
2016-03-08 23:23             ` Adam Ford

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=20160304211838.GA21731@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=aford173@gmail.com \
    --cc=drivshin.allworx@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=manabian@gmail.com \
    --cc=marathon96@gmail.com \
    --cc=narmstrong@baylibre.com \
    --cc=neilb@suse.de \
    --cc=tony@atomide.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.