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 <zoujc@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
litong20 2021-12-21 18:26:38 +08:00 • committed by litong
commit c042d862af

View file

@ -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;