mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 03:43:03 +00:00
pwm: qpnp: correct LUT mode LPG disable steps
Modify the pwm-qpnp driver in order to remove RAMP_CONTROL register writes during LPG disable while in LUT mode. This is needed to fix the LED blink functionality when LPG enable/disable operations are performed continously CRs-Fixed: 593837 Change-Id: I915eb7620902911ef8d3f8d44c9b75986bc69bd1 Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
This commit is contained in:
parent
810f69165f
commit
46883f3b59
|
@ -132,7 +132,6 @@ do { \
|
|||
#define QPNP_ENABLE_LUT_V0(value) (value |= QPNP_RAMP_START_MASK)
|
||||
#define QPNP_DISABLE_LUT_V0(value) (value &= ~QPNP_RAMP_START_MASK)
|
||||
#define QPNP_ENABLE_LUT_V1(value, id) (value |= BIT(id))
|
||||
#define QPNP_DISABLE_LUT_V1(value, id) (value &= ~BIT(id))
|
||||
|
||||
/* LPG Control for RAMP_STEP_DURATION_LSB */
|
||||
#define QPNP_RAMP_STEP_DURATION_LSB_MASK 0xFF
|
||||
|
@ -1006,8 +1005,6 @@ static int qpnp_lpg_configure_lut_state(struct qpnp_pwm_chip *chip,
|
|||
lpg_config->lut_config.ramp_index);
|
||||
value2 = QPNP_ENABLE_LPG_MODE;
|
||||
} else {
|
||||
QPNP_DISABLE_LUT_V1(value1,
|
||||
lpg_config->lut_config.ramp_index);
|
||||
value2 = QPNP_DISABLE_LPG_MODE;
|
||||
}
|
||||
mask1 = value1;
|
||||
|
@ -1027,8 +1024,10 @@ static int qpnp_lpg_configure_lut_state(struct qpnp_pwm_chip *chip,
|
|||
if (rc)
|
||||
return rc;
|
||||
|
||||
return qpnp_lpg_save_and_write(value1, mask1, reg1,
|
||||
if (state == QPNP_LUT_ENABLE || chip->revision == QPNP_LPG_REVISION_0)
|
||||
rc = qpnp_lpg_save_and_write(value1, mask1, reg1,
|
||||
addr1, 1, chip);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static inline int qpnp_enable_pwm_mode(struct qpnp_pwm_chip *chip)
|
||||
|
|
Loading…
Reference in a new issue