aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorPhilipp Zabel <[email protected]>2023-10-19 22:07:00 +0200
committerThierry Reding <[email protected]>2023-12-20 16:04:14 +0100
commite495f47274a145dd802748fed66608f46d9ae11d (patch)
treef0ab2902df53566d4a9bfb2850249adce32ce5b8 /scripts/gdb/linux/utils.py
parent7ee2273197f1c1755ebdad8716eab50689401aff (diff)
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 <[email protected]> Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Fabrice Gasnier <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions