From d0d2dc496349415cbc589c52d62709cc59f4af07 Mon Sep 17 00:00:00 2001 From: litong20 Date: Thu, 23 Sep 2021 20:14:33 +0800 Subject: [PATCH] Does not distinguish 9916 and 9916P touch chips. Because 9916 and 9916P use the same firmware file and configuration file, so the chip does not need to distinguish between 9916 and 9916P. Change-Id: I08921833b01ee1700bd6c81bbf10e204e57b080a Reviewed-on: https://gerrit.mot.com/2070699 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_ts_mmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_mmi.c b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_mmi.c index c14ff3b33156..6fb911fc509f 100644 --- a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_mmi.c +++ b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_mmi.c @@ -35,6 +35,7 @@ static int goodix_ts_mmi_methods_get_vendor(struct device *dev, void *cdata) { return scnprintf(TO_CHARP(cdata), TS_MMI_MAX_VENDOR_LEN, "%s", "goodix"); } +#define TS_MMI_CHIP_INFO_LEN 7 /* GT9916 */ static int goodix_ts_mmi_methods_get_productinfo(struct device *dev, void *cdata) { int ret; struct platform_device *pdev; @@ -44,7 +45,7 @@ static int goodix_ts_mmi_methods_get_productinfo(struct device *dev, void *cdata GET_GOODIX_DATA(dev); ret = core_data->hw_ops->read_version(core_data, &fw_version, false); - return scnprintf(TO_CHARP(cdata), TS_MMI_MAX_INFO_LEN, "GT%s", + return scnprintf(TO_CHARP(cdata), TS_MMI_CHIP_INFO_LEN, "GT%s", fw_version.patch_pid); }