Re: [PATCH 0/6] pwm: Some fixes preparing chardev support
From: Uwe Kleine-König
Date: Mon Apr 07 2025 - 11:27:45 EST
On Mon, Apr 07, 2025 at 12:24:31PM +0200, Uwe Kleine-König wrote:
> On Sat, Apr 05, 2025 at 11:27:11AM +0200, Uwe Kleine-König wrote:
> > Hello,
> >
> > while working on character device support for PWMs I found a few
> > inconsistencies that are fixed in this series. After that I plan to work
> > on getting the character device support into shape to get it into
> > mainline, too.
> >
> > While some of these patches qualify as fixes I think there is no urge to
> > get them into 6.15, but given there is a bunch of such changes I might
> > send them to all together to Linus for inclusion to 6.15.
> >
> > Best regards
> > Uwe
> >
> > Uwe Kleine-König (6):
> > pwm: Let pwm_set_waveform() succeed even if lowlevel driver rounded up
> > pwm: stm32: Search an appropriate duty_cycle if period cannot be
> > modified
> > pwm: stm32: Don't open-code TIM_CCER_CCxE()
> > pwm: stm32: Emit debug output also for corner cases of the rounding
> > callbacks
> > pwm: axi-pwmgen: Let .round_waveform_tohw() signal when request was
> > rounded up
> > pwm: Do stricter return value checking for .round_waveform_tohw()
>
> I applied patches #1, #2 and #5 to
> https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/fixes
And patches #3, #4 and #6 applied to
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next
with
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index dca5d09d80b9..4b148f0afeb9 100644
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -213,10 +213,10 @@ static int stm32_pwm_round_waveform_fromhw(struct pwm_chip *chip,
{
const struct stm32_pwm_waveform *wfhw = _wfhw;
struct stm32_pwm *priv = to_stm32_pwm_dev(chip);
+ unsigned long rate = clk_get_rate(priv->clk);
unsigned int ch = pwm->hwpwm;
if (wfhw->ccer & TIM_CCER_CCxE(ch + 1)) {
- unsigned long rate = clk_get_rate(priv->clk);
u64 ccr_ns;
/* The result doesn't overflow for rate >= 15259 */
squashed into #4 to fix the build failure that the 0day robot reported
in this thread.
Best regards
Uwe
Attachment:
signature.asc
Description: PGP signature