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

Commit efea8f5b authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

input: qti-haptics: Disable AUTO_RES for ERM



Currently, auto resonance is enabled per effect only for LRA
which is correct. However, if ERM type actuator is used and
auto resonance is left enabled, it can cause adverse effect
on the actuator. Hence keep it disabled if ERM is used.

Change-Id: I048c43aacea2520cf642e5d0982c61e926b9b4c4
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent 724fd76b
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1103,8 +1103,11 @@ static int qti_haptics_hw_init(struct qti_hap_chip *chip)
	 * Skip configurations below for ERM actuator
	 * as they're only for LRA actuators
	 */
	if (config->act_type == ACT_ERM)
		return 0;
	if (config->act_type == ACT_ERM) {
		/* Disable AUTO_RES for ERM */
		rc = qti_haptics_lra_auto_res_enable(chip, false);
		return rc;
	}

	addr = REG_HAP_CFG2;
	val = config->lra_shape;