Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20186357 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "pwm: qpnp: correct LUT mode LPG disable steps"

parents eb60dbd1 46883f3b
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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)