mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
drivers/pwm/pwm-sifive-ptc: Clear PWM CNTR
Clear CNTR of PWM after setting period & duty_cycle
This commit is contained in:
parent
429cf9fe32
commit
4f49a36502
1 changed files with 4 additions and 0 deletions
|
@ -167,6 +167,10 @@ static int sifive_pwm_ptc_apply(struct pwm_chip *chip, struct pwm_device *dev, s
|
|||
printk("[sifive_pwm_ptc_config]lrc ok....\n");
|
||||
#endif
|
||||
|
||||
/* Clear REG_RPTC_CNTR after setting period & duty_cycle*/
|
||||
reg_addr = REG_PTC_RPTC_CNTR(pwm->regs, dev->hwpwm);
|
||||
iowrite32(0, reg_addr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue