summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-stm32.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2025-04-16 16:17:04 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2025-04-16 16:17:04 +0300
commit3a320eada570c44cffb15d971479a29b2e9ee270 (patch)
tree42a02676191e08d9419eb63f51d3b6c3050fb7a1 /drivers/pwm/pwm-stm32.c
parent1741189d843a1d5ef38538bc52a3760e2e46cb2e (diff)
parent1a1d569a75f3ab2923cb62daf356d102e4df2b86 (diff)
downloadlinux-3a320eada570c44cffb15d971479a29b2e9ee270.tar.xz
Merge remote-tracking branch 'torvalds/master' into perf-tools-next
Sync with upstream to pick up the perf-tools patches that updates the header files copies to address the check_header.sh warnings. There are also some libbpf updates, better pick those to be on the same page with libbpf since perf uses it in various places. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/pwm/pwm-stm32.c')
-rw-r--r--drivers/pwm/pwm-stm32.c12
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 {