Linux PWM subsystem development
 help / color / mirror / Atom feed
From: Trevor Gamblin <tgamblin@baylibre.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	linux-pwm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] pwm: Let pwm_set_waveform() succeed even if lowlevel driver rounded up
Date: Mon, 7 Apr 2025 08:52:24 -0400	[thread overview]
Message-ID: <910d7fc8-e4d1-4421-a118-b8a254a3fe37@baylibre.com> (raw)
In-Reply-To: <353dc6ae31be815e41fd3df89c257127ca0d1a09.1743844730.git.u.kleine-koenig@baylibre.com>


On 2025-04-05 05:27, Uwe Kleine-König wrote:
> Waveform parameters are supposed to be rounded down to the next value
> possible for the hardware. However when a requested value is too small,
> .round_waveform_tohw() is supposed to pick the next bigger value and
> return 1. Let pwm_set_waveform() behave in the same way.
>
> This creates consistency between pwm_set_waveform_might_sleep() with
> exact=false and pwm_round_waveform_might_sleep() +
> pwm_set_waveform_might_sleep() with exact=true.
>
> The PWM_DEBUG rounding check has to be adapted to only trigger if no
> uprounding happend.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Tested-by: Trevor Gamblin <tgamblin@baylibre.com>

  reply	other threads:[~2025-04-07 12:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-05  9:27 [PATCH 0/6] pwm: Some fixes preparing chardev support Uwe Kleine-König
2025-04-05  9:27 ` [PATCH 1/6] pwm: Let pwm_set_waveform() succeed even if lowlevel driver rounded up Uwe Kleine-König
2025-04-07 12:52   ` Trevor Gamblin [this message]
2025-04-05  9:27 ` [PATCH 2/6] pwm: stm32: Search an appropriate duty_cycle if period cannot be modified Uwe Kleine-König
2025-04-05  9:27 ` [PATCH 3/6] pwm: stm32: Don't open-code TIM_CCER_CCxE() Uwe Kleine-König
2025-04-05  9:27 ` [PATCH 4/6] pwm: stm32: Emit debug output also for corner cases of the rounding callbacks Uwe Kleine-König
2025-04-05 22:15   ` kernel test robot
2025-04-06  4:58   ` kernel test robot
2025-04-05  9:27 ` [PATCH 5/6] pwm: axi-pwmgen: Let .round_waveform_tohw() signal when request was rounded up Uwe Kleine-König
2025-04-07 12:52   ` Trevor Gamblin
2025-04-05  9:27 ` [PATCH 6/6] pwm: Do stricter return value checking for .round_waveform_tohw() Uwe Kleine-König
2025-04-07 10:24 ` [PATCH 0/6] pwm: Some fixes preparing chardev support Uwe Kleine-König
2025-04-07 15:16   ` Uwe Kleine-König

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=910d7fc8-e4d1-4421-a118-b8a254a3fe37@baylibre.com \
    --to=tgamblin@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=u.kleine-koenig@baylibre.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