aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-stm32.c
diff options
context:
space:
mode:
authorUwe Kleine-König <[email protected]>2025-04-05 09:27:14 +0000
committerUwe Kleine-König <[email protected]>2025-04-14 06:03:16 +0000
commit4cbeffc40798efb84eb2ed9144e0e36dda603dd9 (patch)
tree137320a693cc3e42ef48a8cab44a2962754c9942 /drivers/pwm/pwm-stm32.c
parentpwm: Add actual hardware state to pwm debugfs file (diff)
downloadkernel-4cbeffc40798efb84eb2ed9144e0e36dda603dd9.tar.gz
kernel-4cbeffc40798efb84eb2ed9144e0e36dda603dd9.zip
pwm: stm32: Don't open-code TIM_CCER_CCxE()
Instead of manually calculating the offset of the channels CCxE bit, make use of the TIM_CCER_CCxE macro. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/7803f63b1310ddbd706f51f2f42d30b6dd786b03.1743844730.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-stm32.c')
-rw-r--r--drivers/pwm/pwm-stm32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index ec2c05c9ee7a..c6625f51a199 100644
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -88,7 +88,7 @@ static int stm32_pwm_round_waveform_tohw(struct pwm_chip *chip,
rate = clk_get_rate(priv->clk);
- if (active_channels(priv) & ~(1 << ch * 4)) {
+ if (active_channels(priv) & ~TIM_CCER_CCxE(ch + 1)) {
u64 arr;
/*