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

Skip to content
Commit 92bf9e3e authored by Abinaya P's avatar Abinaya P Committed by Ankit Sharma
Browse files

msm: qpnp-haptic: add additional checks to avoid division by zero.



While calculating the +/-30% variation from the resonant frequency for auto
resonance search algorithm, division by zero is happening causing device
crash. Add additional checks to avoid such crashes. Also, RATE_CFG1 and
RATE_CFG2 registers should be updated with values from AUTO_RES_LO and
AUTO_RES_HI registers respectively only if the frequency variation is
+/-25% of the resonant freqeuncy. Add code change for the same.

CRs-Fixed: 1024697
Change-Id: I2a68cb61331ce4e68857031a4c0c14fded77a0e5
Signed-off-by: default avatarAbinaya P <abinayap@codeaurora.org>
Signed-off-by: default avatarHimanshu Aggarwal <haggarwa@codeaurora.org>
parent cebbcd90
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