From 31cdbcc1298fed69e2ba8480eab7dade7c09bcb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?liangkz=28=E6=A2=81=E5=BC=80=E7=A5=9D=29?= Date: Thu, 25 Jul 2024 01:09:34 +0000 Subject: [PATCH] =?UTF-8?q?Fix:Repair=20rk3568=20veneer=20touch-screen=20f?= =?UTF-8?q?irmware=20differences=20between=20the=20old=20and=20the=20new?= =?UTF-8?q?=20=E7=9B=B8=E5=85=B3=E7=9A=84Issue=20https://gitee.com/openhar?= =?UTF-8?q?mony/drivers=5Fhdf=5Fcore/issues/I84CN6=20#I84CN6:=E3=80=90Open?= =?UTF-8?q?Harmony=204.0=E3=80=91=E3=80=90=E9=A9=B1=E5=8A=A8=E5=AD=90?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E3=80=91=E3=80=90input=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=96=B0=E6=97=A7rk3568=E5=8D=95=E6=9D=BF=E8=A7=A6?= =?UTF-8?q?=E6=91=B8=E5=B1=8F=E5=9B=BA=E4=BB=B6=E5=B7=AE=E5=BC=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原因(目的、解决的问题等) 解决新旧RK3568单板触摸屏固件差异导致触摸屏不可用的问题 描述(做了什么,变更了什么) https://gitee.com/openharmony/drivers_hdf_core/pulls/1992 https://gitee.com/openharmony/drivers_hdf_core/pulls/1977 这两个PR的提交,可以解决一部分问题,但还有条件覆盖不到导致异常。 收到社区dayu200的用户反馈,单板烧录OH 3.2版本,触摸屏功能正常;单板烧录OH 4.x/5.x版本系统,触摸屏功能失效。 经调试确认,该单板的显示屏读取的TP版本信息为:IC FW version is 512,会被判为 “ID wrong”,return HDF_FAILURE,导致没有加载TP驱动,触摸屏功能失效。 现根据读取到的寄存器信息:0x5688 0200,增加对 0x5688 字段的判断,将其识别为 GT5688 方案的TP,使其正确加载TP驱动,可修复该功能。 测试用例(新增、改动、可能影响的功能) NA,已在不同的DAYU200上测试确认可以正常工作。 Signed-off-by: liangkz(梁开祝) --- framework/model/input/driver/touchscreen/touch_gt911.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/model/input/driver/touchscreen/touch_gt911.c b/framework/model/input/driver/touchscreen/touch_gt911.c index 074c40d98..34ae962a5 100644 --- a/framework/model/input/driver/touchscreen/touch_gt911.c +++ b/framework/model/input/driver/touchscreen/touch_gt911.c @@ -69,6 +69,11 @@ static int32_t ChipDetect(ChipDevice *device) HDF_LOGI("%s:TOUCH IC is GT911", __func__); break; default: + if (buf[GT_PROD_ID_1ST] == '5' && buf[GT_PROD_ID_2ND] == '6' && \ + buf[GT_PROD_ID_3RD] == '8' && buf[GT_PROD_ID_4TH] == '8') { + HDF_LOGI("%s:TOUCH IC is GT5688", __func__); + break; + } HDF_LOGE("%s: ID wrong,IC FW version is %d", __func__, version); return HDF_FAILURE; } -- Gitee