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

Skip to content
Commit 78ea896d authored by Sultanxda's avatar Sultanxda Committed by Anomalchik
Browse files

msm: qpnp-haptic: Process haptics asynchronously



Blocking the timed_output sysfs node due to mutex contention causes severe
device wake-up latency, as a process crucial to system resume writes to the
timed_output vibrator node every time the device is resumed via the
fingerprint reader (fingerprint reader triggers a haptic response on
success).

By processing haptics asynchronously via a worker, the timed_output sysfs
won't get stalled for long periods of time (>30ms), and thus the device
will consistently wake from sleep faster.

Signed-off-by: default avatarSultanxda <sultanxda@gmail.com>

msm: qpnp-haptic: Prevent redundant calls to disable vibrator

A redundant call to disable the vibrator right before something wants to
enable it results in lack of vibration.

Avoid re-disabling haptics to fix this.

Signed-off-by: default avatarSultanxda <sultanxda@gmail.com>

msm: qpnp-haptic: Start shutoff timer after haptics actually start

qpnp_hap_set() sometimes lags when enabling haptics, causing the shutoff
timer to kill the haptics prematurely.

Start the shutoff timer after haptics are enabled so that the requested
duration is actually carried out.

Change-Id: I91bad94d18415476b5b05c1e1a4a60ae180947df
Signed-off-by: default avatarSultanxda <sultanxda@gmail.com>
parent e604ee52
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment