From 4be21a43384fb46409378bfff63b6669c69d76b3 Mon Sep 17 00:00:00 2001 From: lixinsheng2 Date: Thu, 4 Jul 2024 12:59:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3input=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lixinsheng2 --- framework/model/input/driver/hdf_hid_adapter.c | 1 + framework/model/input/driver/hdf_input_device_manager.c | 1 + 2 files changed, 2 insertions(+) diff --git a/framework/model/input/driver/hdf_hid_adapter.c b/framework/model/input/driver/hdf_hid_adapter.c index 35f80e173..95ed41a22 100644 --- a/framework/model/input/driver/hdf_hid_adapter.c +++ b/framework/model/input/driver/hdf_hid_adapter.c @@ -52,6 +52,7 @@ static bool HaveHidCache(void) static void LoadCachedHid(void) { + HDF_LOGE("test_%s: start", __func__); int32_t i = 0; int32_t ret; if (!HaveHidCache()) { diff --git a/framework/model/input/driver/hdf_input_device_manager.c b/framework/model/input/driver/hdf_input_device_manager.c index ab2384110..bea3d5b12 100644 --- a/framework/model/input/driver/hdf_input_device_manager.c +++ b/framework/model/input/driver/hdf_input_device_manager.c @@ -57,6 +57,7 @@ static struct HdfDeviceObject *HidRegisterHdfDevice(InputDevice *inputDev) HDF_LOGE("%s: snprintf_s failed", __func__); return NULL; } + HDF_LOGE("test_%s: enter devName=%s, devType=%u, devId=%u", __func__, inputDev->devName, inputDev->devType, inputDev->devId); hdfDev = HdfDeviceObjectAlloc(g_inputManager->hdfDevObj, moduleName); if (hdfDev == NULL) { -- Gitee From 9a5725b77f76d931a0c7f665dd5f6744c6e24e1f Mon Sep 17 00:00:00 2001 From: lixinsheng2 Date: Thu, 4 Jul 2024 12:59:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3input=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lixinsheng2 --- framework/model/input/driver/hdf_hid_adapter.c | 3 +++ .../model/input/driver/hdf_input_device_manager.c | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/framework/model/input/driver/hdf_hid_adapter.c b/framework/model/input/driver/hdf_hid_adapter.c index 35f80e173..8638a2784 100644 --- a/framework/model/input/driver/hdf_hid_adapter.c +++ b/framework/model/input/driver/hdf_hid_adapter.c @@ -52,6 +52,7 @@ static bool HaveHidCache(void) static void LoadCachedHid(void) { + HDF_LOGE("test_%s: start", __func__); int32_t i = 0; int32_t ret; if (!HaveHidCache()) { @@ -242,8 +243,10 @@ void* HidRegisterHdfInputDev(HidInfo *info) } if (InputDriverLoaded()) { + HDF_LOGE("test_%s: DoRegisterInputDev", __func__); DoRegisterInputDev(inputDev); } else { + HDF_LOGE("test_%s: CacheHid", __func__); CacheHid(inputDev); } return inputDev; diff --git a/framework/model/input/driver/hdf_input_device_manager.c b/framework/model/input/driver/hdf_input_device_manager.c index ab2384110..353d133fb 100644 --- a/framework/model/input/driver/hdf_input_device_manager.c +++ b/framework/model/input/driver/hdf_input_device_manager.c @@ -38,6 +38,7 @@ static bool IsHidDevice(InputDevice *inputDev) return true; #ifdef CONFIG_ARCH_ROCKCHIP } else if (strncmp(inputDev->devName, "hid-powerkey", strlen("hid-powerkey")) == 0) { + HDF_LOGE("test_%s: enter def CONFIG_ARCH_ROCKCHIP", __func__); return true; #endif } @@ -110,11 +111,11 @@ static int32_t CreateDeviceNode(InputDevice *inputDev) { static bool existNonHid = false ; if (IsHidDevice(inputDev)) { - if (!existNonHid) { - CacheHid(inputDev); - HDF_LOGI("%s: is first hid dev add cache, devId is %d ", __func__, inputDev->devId); - return HDF_SUCCESS; - } + // if (!existNonHid) { + // CacheHid(inputDev); + // HDF_LOGI("%s: is first hid dev add cache, devId is %d ", __func__, inputDev->devId); + // return HDF_SUCCESS; + // } HDF_LOGI("%s: prepare to register hdf device", __func__); inputDev->hdfDevObj = HidRegisterHdfDevice(inputDev); if (inputDev->hdfDevObj == NULL) { @@ -334,6 +335,7 @@ int32_t RegisterInputDevice(InputDevice *inputDev) HDF_LOGE("%s: dev manager is null or initialized failed", __func__); return HDF_FAILURE; } + HDF_LOGE("test_%s: enter devName=%s, devType=%u, devId=%u", __func__, inputDev->devName, inputDev->devType, inputDev->devId); OsalMutexLock(&g_inputManager->mutex); ret = AllocDeviceID(inputDev); -- Gitee