aboutsummaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-twl.c
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2023-10-19 22:07:00 +0200
committerThierry Reding <thierry.reding@gmail.com>2023-12-20 16:04:14 +0100
commite495f47274a145dd802748fed66608f46d9ae11d (patch)
treef0ab2902df53566d4a9bfb2850249adce32ce5b8 /drivers/pwm/pwm-twl.c
parent7ee2273197f1c1755ebdad8716eab50689401aff (diff)
downloadlinux-e495f47274a145dd802748fed66608f46d9ae11d.tar.gz
linux-e495f47274a145dd802748fed66608f46d9ae11d.tar.bz2
linux-e495f47274a145dd802748fed66608f46d9ae11d.zip
pwm: stm32: Replace write_ccrx with regmap_write
The TIM_CCR1...4 registers are consecutive, so replace the switch case with a simple calculation. Since ch is known to be in the 0...3 range (it is set to hwpwm < npwm <= 4), drop the unnecessary error handling. The return value was not checked anyway. What remains does not warrant keeping the write_ccrx() function around, so instead call regmap_write() directly at the singular call site. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-twl.c')
0 files changed, 0 insertions, 0 deletions