From c042d862afd827c631841fe76afb0484f0aa98e3 Mon Sep 17 00:00:00 2001 From: litong20 Date: Tue, 21 Dec 2021 18:26:38 +0800 Subject: [PATCH] Do not re-enable the stylus when the stylus mode is switched TP: When exiting the stylus mode, the IC will send an abnormal reset interrupt. At this time, the stylus will be enabled again, but because the stylus clock is closed, the touch will not work. Change-Id: Id1b393de2b2bee5b06e9d4f5b74dfd301be4547d Reviewed-on: https://gerrit.mot.com/2150837 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jichao Zou Submit-Approved: Jira Key --- drivers/input/touchscreen/goodix_berlin_mmi/goodix_brl_hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_brl_hw.c b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_brl_hw.c index da6266bef031..eda50a74e3dc 100644 --- a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_brl_hw.c +++ b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_brl_hw.c @@ -1137,7 +1137,8 @@ static int goodix_touch_handler(struct goodix_ts_core *cd, } /* Need to resend the stylus cmd after abnormal reseting */ - if (cd->board_data.stylus_mode_ctrl && cd->set_mode.stylus_mode) { + if (cd->board_data.stylus_mode_ctrl && cd->get_mode.stylus_mode + && cd->set_mode.stylus_mode) { if ((buffer[3] & 0x20) == 0) { struct goodix_ts_cmd stylus_cmd; stylus_cmd.cmd = 0xA4;