summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-stm32.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-28 10:45:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-28 10:45:00 +0300
commit4f822ad5ee944ffafc21937a32dd055f1df5c28d (patch)
tree9b38a39de453ec1694fb383a812639162d1182a0 /drivers/pwm/pwm-stm32.c
parent77feb17c950e03dd0c0d4a64642f3e658679fe3c (diff)
parentb4432656b36e5cc1d50a1f2dc15357543add530e (diff)
downloadlinux-4f822ad5ee944ffafc21937a32dd055f1df5c28d.tar.xz
Merge 6.15-rc4 into char-misc-next
We need the char-misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 {