From ede62fd6fb0bd9f614c90fe840d65882c2cb7ca9 Mon Sep 17 00:00:00 2001 From: Fenglin Wu Date: Wed, 16 Feb 2022 18:58:22 +0800 Subject: [PATCH] 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 --- drivers/input/misc/qcom-hv-haptics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/qcom-hv-haptics.c b/drivers/input/misc/qcom-hv-haptics.c index c7785beb6bf6..483d03512523 100644 --- a/drivers/input/misc/qcom-hv-haptics.c +++ b/drivers/input/misc/qcom-hv-haptics.c @@ -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)