input: qcom-hv-haptics: Enable boot-up F0 calibration for PM5100

In the boot up LRA frequency calibration sequence, CAL_TLRA_CL_STS
is read out and stored in SDAM module registers by the bootloader.
Later, the HLOS haptics driver can read it from there and use it
for calculating LRA frequency. Enable the same for PM5100 PMIC.

Change-Id: Ia5e307e5d536a42b29ab05e9888640121188312c
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
This commit is contained in:
Kiran Gunda 2021-07-12 14:58:08 +05:30 committed by Fenglin Wu
parent 8afead556c
commit ef97827703

View File

@ -1042,7 +1042,7 @@ static int haptics_get_closeloop_lra_period(
rc_clk_cal = ((val[0] & CAL_RC_CLK_MASK) >> CAL_RC_CLK_SHIFT);
/* read auto resonance calibration result */
if (in_boot && (chip->hw_type == HAP520)) {
if (in_boot && ((chip->hw_type == HAP520) || (chip->hw_type == HAP520_MV))) {
if (chip->hap_cfg_nvmem == NULL) {
dev_dbg(chip->dev, "nvmem device for hap_cfg is not defined\n");
return -EINVAL;