File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -103,22 +103,16 @@ static int stm32_pwm_round_waveform_tohw(struct pwm_chip *chip,
103
103
if (ret )
104
104
goto out ;
105
105
106
- /*
107
- * calculate the best value for ARR for the given PSC, refuse if
108
- * the resulting period gets bigger than the requested one.
109
- */
110
106
arr = mul_u64_u64_div_u64 (wf -> period_length_ns , rate ,
111
107
(u64 )NSEC_PER_SEC * (wfhw -> psc + 1 ));
112
108
if (arr <= wfhw -> arr ) {
113
109
/*
114
- * requested period is small than the currently
110
+ * requested period is smaller than the currently
115
111
* configured and unchangable period, report back the smallest
116
- * possible period, i.e. the current state; Initialize
117
- * ccr to anything valid .
112
+ * possible period, i.e. the current state and return 1
113
+ * to indicate the wrong rounding direction .
118
114
*/
119
- wfhw -> ccr = 0 ;
120
115
ret = 1 ;
121
- goto out ;
122
116
}
123
117
124
118
} else {
You can’t perform that action at this time.
0 commit comments