ITE drivers/pwm: don't divide-by-zero
Make sure cxcprs isn't zero, or we will have
divide-by-zero on calculating actual_freq.
Test:
1.tests/drivers/pwm/pwm_api pattern
2.GPA0(pwm0) output 79201Hz, 324Hz, 100Hz, 1Hz waveform
Signed-off-by:
Ruibin Chang <Ruibin.Chang@ite.com.tw>
Loading
Please sign in to comment