[PATCH 6.17 157/563] pwm: tiehrpwm: Fix various off-by-one errors in duty-cycle calculation