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

Skip to content
Commit 03305506 authored by Fenglin Wu's avatar Fenglin Wu
Browse files

input: qcom-hv-haptics: add LRA impedance detection support



Add support for detecting LRA impedance. The detection is done using
following procedure: set ISC to 250 mA and Vmax to 10 V, then sweep
the duty cycle using binary approach based on the SC_FAULT status until
reaching to the last step. The impedance can be only detected between
a range and the resolution depends on the sweeping steps. Currently,
total number of steps used for calculating LRA impedance using
approximation is 5 which can achieve an accuracy of 1.25 Ohms.

This detection is only available for PM8350B 2.0 chip and it can be
triggered using command:
    echo 1 > /sys/class/qcom-haptics/lra_calibration

After that, the result can be read out using command:
    cat /sys/class/qcom-haptics/lra_impedance

Change-Id: I7edc00ecdb019ccf7ca5af459dec8105834706f5
Signed-off-by: default avatarFenglin Wu <fenglinw@codeaurora.org>
parent f2f00c3b
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