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

Commit 1935ef60 authored by Mohan Pallaka's avatar Mohan Pallaka
Browse files

platform: msm: disable haptics when it is in BUSY for too long



Disable haptics module if it does not come out of BUSY state
after 4 cycles of wait time for 5 iterations as per the
hardware specification.

CRs-fixed: 716973
Change-Id: I7935ab2941bc21e4082354962c0d1687f35f3cfc
Signed-off-by: default avatarMohan Pallaka <mpallaka@codeaurora.org>
parent b20c393d
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -288,10 +288,9 @@ static int qpnp_hap_mod_enable(struct qpnp_hap *hap, int on)
				break;
		}

		if (i >= QPNP_HAP_MAX_RETRIES) {
			dev_err(&hap->spmi->dev, "Haptics Busy\n");
			return -EBUSY;
		}
		if (i >= QPNP_HAP_MAX_RETRIES)
			dev_dbg(&hap->spmi->dev,
				"Haptics Busy. Force disable\n");

		val &= ~QPNP_HAP_EN;
	}