diff options
| author | Ingo Molnar <[email protected]> | 2025-04-22 06:31:41 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2025-04-22 06:31:41 +0000 |
| commit | c96f564e6f943cf5d8536e1c43f243aa7c42b4ed (patch) | |
| tree | ada98ccab9b31fe9519b4e6ea2beec63ad98cb16 /drivers/pwm/pwm-stm32.c | |
| parent | x86/microcode/AMD: Clean the cache if update did not load microcode (diff) | |
| parent | Merge branch 'linus' into x86/cpu, to resolve conflicts (diff) | |
| download | kernel-c96f564e6f943cf5d8536e1c43f243aa7c42b4ed.tar.gz kernel-c96f564e6f943cf5d8536e1c43f243aa7c42b4ed.zip | |
Merge branch 'x86/cpu' into x86/microcode, to pick up dependent commits
Avoid a conflict in <asm/cpufeatures.h> by merging pending x86/cpu changes.
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-stm32.c')
| -rw-r--r-- | drivers/pwm/pwm-stm32.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c index a59de4de18b6..ec2c05c9ee7a 100644 --- a/drivers/pwm/pwm-stm32.c +++ b/drivers/pwm/pwm-stm32.c @@ -103,22 +103,16 @@ static int stm32_pwm_round_waveform_tohw(struct pwm_chip *chip, if (ret) goto out; - /* - * calculate the best value for ARR for the given PSC, refuse if - * the resulting period gets bigger than the requested one. - */ arr = mul_u64_u64_div_u64(wf->period_length_ns, rate, (u64)NSEC_PER_SEC * (wfhw->psc + 1)); if (arr <= wfhw->arr) { /* - * requested period is small than the currently + * requested period is smaller than the currently * configured and unchangable period, report back the smallest - * possible period, i.e. the current state; Initialize - * ccr to anything valid. + * possible period, i.e. the current state and return 1 + * to indicate the wrong rounding direction. */ - wfhw->ccr = 0; ret = 1; - goto out; } } else { |
