From c32d8edb547dde9f41e18c3c9d2b36d2c4119225 Mon Sep 17 00:00:00 2001 From: wingte49 Date: Wed, 25 May 2022 19:49:56 +0800 Subject: [PATCH] motorola:Rhodec:Update chipone_fhd_mmi Modify: Prevent the module from being disconnected when starting up. Change-Id: I6f4cbe2d24ec9673f38b0b0589aae323f6b7c240 Reviewed-on: https://gerrit.mot.com/2279582 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Yeqing Wang Reviewed-by: Huosheng Liao Submit-Approved: Jira Key --- drivers/input/touchscreen/chipone_tddi_fhd_mmi/cts_tcs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/chipone_tddi_fhd_mmi/cts_tcs.c b/drivers/input/touchscreen/chipone_tddi_fhd_mmi/cts_tcs.c index 8920e2a98ace..b5b67c594182 100644 --- a/drivers/input/touchscreen/chipone_tddi_fhd_mmi/cts_tcs.c +++ b/drivers/input/touchscreen/chipone_tddi_fhd_mmi/cts_tcs.c @@ -1079,12 +1079,15 @@ int cts_tcs_reset_device(const struct cts_device *cts_dev) bool use_soft_tp_reset; int ret; - if (cts_dev->hwdata->hwid == CTS_DEV_HWID_ICNL9916) + if (!cts_dev->hwdata) { + use_soft_tp_reset = true; + } else if (cts_dev->hwdata->hwid == CTS_DEV_HWID_ICNL9916) { use_soft_tp_reset = false; - else if (cts_dev->hwdata->hwid == CTS_DEV_HWID_ICNL9922) + } else if (cts_dev->hwdata->hwid == CTS_DEV_HWID_ICNL9922) { use_soft_tp_reset = true; - else + } else { use_soft_tp_reset = true; + } cts_info("use_soft_tp_reset=%d", use_soft_tp_reset); if (use_soft_tp_reset) {