input: qcom-hv-haptics: add high-voltage check for HAP525_HV module

HAP525_HV module Vmax setting follows the HV_HAP_DRIVER defined
in HW_CONFIG, so add the check to make sure the Vmax can be set
correctly.

Change-Id: I116e068c774dea47648f345cc3cf89a98f2eee52
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
This commit is contained in:
Fenglin Wu 2022-02-16 18:58:22 +08:00 committed by David Collins
parent e8ed28a66e
commit ede62fd6fb

View File

@ -2863,7 +2863,7 @@ static int haptics_init_vmax_config(struct haptics_chip *chip)
chip->is_hv_haptics = true;
chip->max_vmax_mv = MAX_VMAX_MV;
if (chip->hw_type == HAP520_MV) {
if (chip->hw_type == HAP520_MV || chip->hw_type == HAP525_HV) {
rc = haptics_read(chip, chip->cfg_addr_base,
HAP_CFG_HW_CONFIG_REG, &val, 1);
if (rc < 0)