pwm: pwm-qpnp: Enable glitch removal after PWM enabled
Enable glitch control after PWM enabled to remove the glitches on the PWM output. CRs-Fixed: 2134126 Change-Id: I910b26d997bd5e934119dce1ab518bb31ab5c9a5 Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
This commit is contained in:
parent
b1281c202f
commit
8b7ca67a37
1 changed files with 9 additions and 0 deletions
|
@ -1324,6 +1324,15 @@ static int _pwm_enable(struct qpnp_pwm_chip *chip)
|
|||
chip->qpnp_lpg_registers[QPNP_ENABLE_CONTROL]) ||
|
||||
chip->flags & QPNP_PWM_LUT_NOT_SUPPORTED) {
|
||||
rc = qpnp_lpg_configure_pwm_state(chip, QPNP_PWM_ENABLE);
|
||||
if (rc) {
|
||||
pr_err("Failed to enable PWM mode, rc=%d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
rc = qpnp_lpg_glitch_removal(chip, true);
|
||||
if (rc) {
|
||||
pr_err("Failed to enable glitch removal, rc=%d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
} else if (!(chip->flags & QPNP_PWM_LUT_NOT_SUPPORTED)) {
|
||||
rc = qpnp_lpg_configure_lut_state(chip, QPNP_LUT_ENABLE);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue