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

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

Merge "ARM: dts: msm: add haptic auto resonance parameters"

parents 421ca951 dfaf21c7
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -61,9 +61,14 @@ Optional properties when qcom,actuator-type is "lra"
			"qwd" : quarter wave drive method
			"max-qwd" : Maximum QWD
			"zxd-eop" : ZXD + End of pattern (This is the Default)
 - qcom,lra-high-z : High Z configuration for auto resonance. Possible string values are
			"none", "opt1", "opt2" and "opt3" (default)
 - qcom,lra-res-cal-period : Auto resonance calibration period. The values range from
			4 to 32(default)

Example:
		qcom,haptic@c000 {
			status = "disabled";
			compatible = "qcom,qpnp-haptic";
			reg = <0xc000 0x100>;
			interrupts = <0x3 0xc0 0x0>,
@@ -84,5 +89,7 @@ Example:
			qcom,wave-samples = [3e 3e 3e 3e 3e 3e 3e 3e];
			qcom,wave-rep-cnt = <1>;
			qcom,wave-samp-rep-cnt = <1>;
			qcom,lra-auto-res-mode = "zxd";
			qcom,lra-high-z = "opt1";
			qcom,lra-auto-res-mode = "qwd";
			qcom,lra-res-cal-period = <4>;
		};
+3 −0
Original line number Diff line number Diff line
@@ -561,6 +561,9 @@
			qcom,wave-samples = [3e 3e 3e 3e 3e 3e 3e 3e];
			qcom,wave-rep-cnt = <1>;
			qcom,wave-samp-rep-cnt = <1>;
			qcom,lra-high-z = "opt1";
			qcom,lra-auto-res-mode = "qwd";
			qcom,lra-res-cal-period = <4>;
		};

		qcom,leds@d000 {
+8 −5
Original line number Diff line number Diff line
@@ -1487,23 +1487,26 @@ static int qpnp_hap_set(struct qpnp_hap *hap, int on)
	} else if (hap->play_mode == QPNP_HAP_BUFFER ||
			hap->play_mode == QPNP_HAP_DIRECT) {
		if (on) {
			if (hap->correct_lra_drive_freq ||
				hap->auto_res_mode == QPNP_HAP_AUTO_RES_QWD)
				qpnp_hap_auto_res_enable(hap, 0);

			rc = qpnp_hap_mod_enable(hap, on);
			if (rc < 0)
				return rc;

			if (hap->correct_lra_drive_freq)
				qpnp_hap_auto_res_enable(hap, 0);

			rc = qpnp_hap_play(hap, on);

			if (hap->correct_lra_drive_freq) {
			if (hap->correct_lra_drive_freq ||
				hap->auto_res_mode == QPNP_HAP_AUTO_RES_QWD) {
				usleep_range(AUTO_RES_ENABLE_TIMEOUT,
					(AUTO_RES_ENABLE_TIMEOUT + 1));

				rc = qpnp_hap_auto_res_enable(hap, 1);
				if (rc < 0)
					return rc;

			}
			if (hap->correct_lra_drive_freq) {
				/*
				 * Start timer to poll Auto Resonance error bit
				 */