From 8ed2d0ed3945d2dc5ffa6a068b6b195fe427cc58 Mon Sep 17 00:00:00 2001 From: Fenglin Wu Date: Mon, 14 Mar 2022 15:20:01 +0800 Subject: [PATCH] input: qcom-hv-haptics: config open-loop drive when hBoost is enabled With commit 5427cc3025e0 ("input: qcom-hv-haptics: delay hBoost turning off"), the hBoost would be kept as enabled in the 2 seconds after stopping play. If a new play is triggered in that 2 seconds, the hBoost will be considered as working in open-loop mode so configure haptics open-loop drive in such case. Change-Id: Ibfa533f23a52bd609e2a8564f859ca8835a8fd67 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 ff16832173c8..160cd0e92076 100644 --- a/drivers/input/misc/qcom-hv-haptics.c +++ b/drivers/input/misc/qcom-hv-haptics.c @@ -1401,7 +1401,7 @@ static int haptics_open_loop_drive_config(struct haptics_chip *chip, bool en) mask |= FORCE_VSET_ACK_BIT; if ((is_boost_vreg_enabled_in_open_loop(chip) || - is_haptics_external_powered(chip)) && en) { + chip->hboost_enabled || is_haptics_external_powered(chip)) && en) { /* Force VREG_RDY */ val = mask; rc = haptics_masked_write(chip, chip->cfg_addr_base,