From e891eb46438d0466af9f8d00ac6690d3daec3cc0 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 13 Jul 2023 10:36:29 -0300 Subject: [PATCH] Avoid usb detection at _FT8726 touchscreen driver WHAT: This changes restrict the recent impletementation of usb detection at focaltech fingerprint driver so it does dot affect _FT8726 WHY: At current implementation of usb detection, _FT8726 causes a kernel panic when the USB cable is connected. _FT8726 cannot set the register that fts_mcu_usb_detect_set expects it to have, so it holds a mutex, fails to set the register and panics at ___might_sleep. The support of us detect is handled by FTS_USB_DETECT_EN, so disable it for _FT8726 Change-Id: I7be8eff1b9b23190a5165f6486bbfd0959eae6b4 Reviewed-on: https://gerrit.mot.com/2675494 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Pedro Tadahiro Kaneko Reviewed-by: Claudio Junior Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- .../touchscreen/focaltech_0flash_v2_mmi/focaltech_config.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/input/touchscreen/focaltech_0flash_v2_mmi/focaltech_config.h b/drivers/input/touchscreen/focaltech_0flash_v2_mmi/focaltech_config.h index 452bee2f877d..a8090b73d952 100644 --- a/drivers/input/touchscreen/focaltech_0flash_v2_mmi/focaltech_config.h +++ b/drivers/input/touchscreen/focaltech_0flash_v2_mmi/focaltech_config.h @@ -286,7 +286,11 @@ /* * Usb detect support */ +#if (FTS_CHIP_TYPE == _FT8726) +#define FTS_USB_DETECT_EN 0 +#else #define FTS_USB_DETECT_EN 1 +#endif /* * module_id: mean vendor_id generally, also maybe gpio or lcm_id...