From eeca4b54e1536c019809ad0f606cc2f83a6f58b2 Mon Sep 17 00:00:00 2001 From: Fenglin Wu Date: Mon, 14 Mar 2022 16:03:54 +0800 Subject: [PATCH] input: qcom-hv-haptics: enable SW_CTRL_HBST workarounds for PM8550B V1 Enable SW_CTRL_HBST workarounds for haptics module in PM8550B V1 silicon in which the HAPTICS_BOOST module is having digital revision as V0.1. Change-Id: Ida824ae0846cef1e2be6adade0f3b4ac2461bf06 Signed-off-by: Fenglin Wu --- drivers/input/misc/qcom-hv-haptics.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/input/misc/qcom-hv-haptics.c b/drivers/input/misc/qcom-hv-haptics.c index 160cd0e92076..fea2f37299c3 100644 --- a/drivers/input/misc/qcom-hv-haptics.c +++ b/drivers/input/misc/qcom-hv-haptics.c @@ -257,6 +257,7 @@ #define HAP_BOOST_REVISION2 0x01 #define HAP_BOOST_V0P0 0x0000 #define HAP_BOOST_V0P1 0x0001 +#define HAP_BOOST_V0P2 0x0002 #define HAP_BOOST_STATUS4_REG 0x0B #define BOOST_DTEST1_STATUS_BIT BIT(0) @@ -2912,7 +2913,10 @@ static int haptics_config_wa(struct haptics_chip *chip) TOGGLE_EN_TO_FLUSH_FIFO | RECOVER_SWR_SLAVE; break; case HAP520_MV: + break; case HAP525_HV: + if (chip->hbst_revision == HAP_BOOST_V0P1) + chip->wa_flags |= SW_CTRL_HBST; break; default: dev_err(chip->dev, "HW type %d does not match\n",