All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Dan O'Donovan <dan@emutex.com>
Cc: linux-pwm@vger.kernel.org, mika.westerberg@linux.intel.com
Subject: Re: [PATCH v2] pwm: lpss: fix base_unit calculation for PWM frequency
Date: Fri, 10 Jun 2016 15:38:41 +0200	[thread overview]
Message-ID: <20160610133841.GI27142@ulmo.ba.sec> (raw)
In-Reply-To: <1464791472-17738-1-git-send-email-dan@emutex.com>

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

On Wed, Jun 01, 2016 at 03:31:12PM +0100, Dan O'Donovan wrote:
> The base_unit calculation applies an offset of 0x2 which adds
> significant error for lower frequencies and doesn't appear to be
> warranted - rounding the division result gives a correct value.
> 
> Also, the upper limit check for base_unit is off-by-one; the upper
> nibble of base_unit is invalid if >=128 according to the Table 88
> in the Z8000 Processor Series Datasheet Volume 1 (Rev. 2).
> 
> Verified on UP Board (Cherry Trail) and Minnowboard Max (Bay Trail).
> 
> Signed-off-by: Dan O'Donovan <dan@emutex.com>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
> v2:
>  * fixed error in a code comment regarding base_unit, spotted by Mika
> 
>  drivers/pwm/pwm-lpss.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)

Applied, thanks.

Thierry

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

      reply	other threads:[~2016-06-10 13:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 14:51 [PATCH] pwm: lpss: fix base_unit calculation for PWM frequency Dan O'Donovan
2016-06-01 10:20 ` Mika Westerberg
2016-06-01 10:33   ` Dan O'Donovan
2016-06-01 14:31 ` [PATCH v2] " Dan O'Donovan
2016-06-10 13:38   ` Thierry Reding [this message]

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=20160610133841.GI27142@ulmo.ba.sec \
    --to=thierry.reding@gmail.com \
    --cc=dan@emutex.com \
    --cc=linux-pwm@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.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.