Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <ukleinek@kernel.org>
To: Karl Mehltretter <kmehltretter@gmail.com>
Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	 Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	 linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pwm: atmel: Fix prescaler for periods of 2^32 clock cycles or more
Date: Wed, 14 Oct 2026 11:45:23 +0200	[thread overview]
Message-ID: <as9NusRrYjMO388-@monoceros> (raw)
In-Reply-To: <20261003083036.21584-1-kmehltretter@gmail.com>

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

hello Karl,

On Sat, Oct 03, 2026 at 10:30:35AM +0200, Karl Mehltretter wrote:
> [...] Some out-of-range requests of 2^32 clock cycles or more were
> accepted and programmed with truncated values. They now fail with
> -EINVAL.

This is wrong, a too big request is supposed to pick the maximal
possible configuration without an error. But that is a preexisting issue
and converting to the waveform API is more sensible than fixing that.
For the scope of this patch, the implemented behaviour is ok.

> The truncation was not reachable when it was introduced. The period
> was an unsigned int in nanoseconds then, which limits it to about
> 4.29 s. Commit a9d887dc1c60 ("pwm: Convert period and duty cycle to
> u64") made longer periods possible.
> 
> Fixes: 2101c878f767 ("pwm: atmel: Replace loop in prescale calculation by ad-hoc calculation")
> Fixes: a9d887dc1c60 ("pwm: Convert period and duty cycle to u64")

Why are here two fixes lines? Given that 2101c878f767 is an ancestor of
a9d887dc1c60, this cannot be right.

Best regards
Uwe

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

      reply	other threads:[~2026-10-14  9:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-03  8:30 [PATCH] pwm: atmel: Fix prescaler for periods of 2^32 clock cycles or more Karl Mehltretter
2026-10-14  9:45 ` Uwe Kleine-König [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=as9NusRrYjMO388-@monoceros \
    --to=ukleinek@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=kmehltretter@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=nicolas.ferre@microchip.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox