diff --git a/framework/model/input/driver/hdf_hid_adapter.c b/framework/model/input/driver/hdf_hid_adapter.c index c6d0016b9978a8c9198b1a8c554272fa9e5618fb..8195529b2842dc3334c7a066e41a70c2ca39efa3 100644 --- a/framework/model/input/driver/hdf_hid_adapter.c +++ b/framework/model/input/driver/hdf_hid_adapter.c @@ -123,6 +123,7 @@ static void FreeCachedInfo(void) static int32_t SetInputDevAbsAttr(InputDevice *inputDev, const HidInfo *info) { + HDF_LOGI("%s: Cache hid device", __func__); int32_t ret; int i; for (i = 0; i < BITS_TO_LONG(ABS_CNT); i++) { @@ -298,6 +299,7 @@ static void RepateEvent(const InputDevice *device) void HidReportEvent(const void *inputDev, uint32_t type, uint32_t code, int32_t value) { + HDF_LOGI("%s: AAA start", __func__); bool loaded = InputDriverLoaded(); if (!loaded) { HDF_LOGD("%s: device not loaded", __func__); diff --git a/framework/model/input/driver/hdf_input_device_manager.c b/framework/model/input/driver/hdf_input_device_manager.c index e2c08a3414afd9bb8a96d93f8c539919c2213e73..2e5282cbaf20464709b41a003ed41f3d4646c736 100644 --- a/framework/model/input/driver/hdf_input_device_manager.c +++ b/framework/model/input/driver/hdf_input_device_manager.c @@ -45,6 +45,7 @@ static bool IsHidDevice(InputDevice *inputDev) static struct HdfDeviceObject *HidRegisterHdfDevice(InputDevice *inputDev) { + HDF_LOGI("%s: AAA start", __func__); char svcName[SERVICE_NAME_LEN] = {0}; const char *moduleName = "HDF_HID"; struct HdfDeviceObject *hdfDev = NULL; @@ -81,6 +82,7 @@ static struct HdfDeviceObject *HidRegisterHdfDevice(InputDevice *inputDev) static void HotPlugNotify(const InputDevice *inputDev, uint32_t status) { + HDF_LOGI("%s: AAA start", __func__); HotPlugEvent event = {0}; int32_t ret; @@ -107,6 +109,7 @@ static void HotPlugNotify(const InputDevice *inputDev, uint32_t status) static int32_t CreateDeviceNode(InputDevice *inputDev) { + HDF_LOGI("%s: AAA start", __func__); if (IsHidDevice(inputDev)) { HDF_LOGI("%s: prepare to register hdf device", __func__); inputDev->hdfDevObj = HidRegisterHdfDevice(inputDev); @@ -122,6 +125,7 @@ static int32_t CreateDeviceNode(InputDevice *inputDev) static void DeleteDeviceNode(InputDevice *inputDev) { + HDF_LOGI("%s: AAA start", __func__); if (IsHidDevice(inputDev)) { HDF_LOGI("remove input device: hdf_input_event%u", inputDev->devId); HdfDeviceObjectRelease(inputDev->hdfDevObj); @@ -132,6 +136,7 @@ static void DeleteDeviceNode(InputDevice *inputDev) static void AddInputDevice(InputDevice *inputDev) { + HDF_LOGI("%s: AAA start", __func__); InputDevice *tmpDev = NULL; if (g_inputManager->inputDevList == NULL) { g_inputManager->inputDevList = inputDev; @@ -153,6 +158,7 @@ static void AddInputDevice(InputDevice *inputDev) static int32_t CheckInputDevice(InputDevice *inputDev) { + HDF_LOGI("%s: AAA start", __func__); InputDevice *tmpDev = NULL; if (g_inputManager->inputDevList == NULL) { return HDF_SUCCESS; @@ -210,6 +216,7 @@ EXIT: static int32_t AllocPackageBuffer(InputDevice *inputDev) { + HDF_LOGI("%s: AAA start", __func__); uint16_t pkgNum; switch (inputDev->devType) { case INDEV_TYPE_TOUCH: @@ -256,6 +263,7 @@ static int32_t AllocPackageBuffer(InputDevice *inputDev) static int32_t AllocDeviceID(InputDevice *inputDev) { + HDF_LOGI("%s: AAA start", __func__); InputDevice *tmpDev = g_inputManager->inputDevList; uint32_t idList[MAX_INPUT_DEV_NUM + 1]; uint32_t id; @@ -313,6 +321,7 @@ static int32_t InitEventWorkQueue(InputDevice *inputDev) int32_t RegisterInputDevice(InputDevice *inputDev) { + HDF_LOGI("%s: AAA start", __func__); int32_t ret; HDF_LOGI("%s: enter", __func__); @@ -362,7 +371,7 @@ EXIT: void UnregisterInputDevice(InputDevice *inputDev) { int32_t ret; - HDF_LOGI("%s: enter", __func__); + HDF_LOGI("%s: AAA start", __func__); if (inputDev == NULL) { HDF_LOGE("%s: inputdev is null", __func__); return; @@ -405,12 +414,14 @@ EXIT: static uint32_t GetDeviceCount(void) { + HDF_LOGI("%s: AAA start", __func__); HDF_LOGI("%s: devCount = %d", __func__, g_inputManager->devCount); return g_inputManager->devCount; } static int32_t ScanAllDev(struct HdfSBuf *reply) { + HDF_LOGI("%s: AAA start", __func__); DevDesc sta; InputDevice *tmpDev = g_inputManager->inputDevList; while (tmpDev != NULL) { @@ -430,6 +441,7 @@ static int32_t ScanAllDev(struct HdfSBuf *reply) static int32_t ScanDevice(struct HdfDeviceIoClient *client, int32_t cmd, struct HdfSBuf *data, struct HdfSBuf *reply) { + HDF_LOGI("%s: AAA start", __func__); (void)cmd; int32_t ret; if ((client == NULL) || (data == NULL) || (reply == NULL)) { @@ -445,6 +457,7 @@ static int32_t ScanDevice(struct HdfDeviceIoClient *client, int32_t cmd, static int32_t HdfInputManagerBind(struct HdfDeviceObject *device) { + HDF_LOGI("%s: AAA start", __func__); if (device == NULL) { HDF_LOGE("%s: device is null", __func__); return HDF_ERR_INVALID_PARAM; @@ -461,6 +474,7 @@ static int32_t HdfInputManagerBind(struct HdfDeviceObject *device) static InputManager *InputManagerInstance(void) { + HDF_LOGI("%s: AAA start", __func__); InputManager *manager = (InputManager *)OsalMemAlloc(sizeof(InputManager)); if (manager == NULL) { HDF_LOGE("%s: instance input manager failed", __func__); @@ -472,7 +486,7 @@ static InputManager *InputManagerInstance(void) static int32_t HdfInputManagerInit(struct HdfDeviceObject *device) { - HDF_LOGI("%s: enter", __func__); + HDF_LOGI("%s: AAA start", __func__); if (device == NULL) { HDF_LOGE("%s: device is null", __func__); return HDF_ERR_INVALID_PARAM; diff --git a/framework/model/input/driver/hdf_touch.c b/framework/model/input/driver/hdf_touch.c index dedb726dc027a9ff8980849f640367bf170b02a4..d242d404ee9fb483f6b181a3835fae635f3c0b18 100644 --- a/framework/model/input/driver/hdf_touch.c +++ b/framework/model/input/driver/hdf_touch.c @@ -45,6 +45,7 @@ static int SuspendFlag = 0; static int32_t SetGpioDirAndLevel(int gpio, int dir, int level) { + HDF_LOGI("%s: AAA start", __func__); int32_t ret; if ((dir == GPIO_DIR_IN) || (dir == GPIO_DIR_OUT)) { ret = GpioSetDir(gpio, dir); @@ -186,6 +187,7 @@ static int32_t InputPinMuxCfg(uint32_t regAddr, int32_t regSize, uint32_t regVal #if defined(CONFIG_ARCH_ROCKCHIP) static int32_t SetResetStatus(TouchDriver *driver) { + HDF_LOGI("%s: AAA start", __func__); int32_t ret; uint8_t writeBuf[5]; // 5: buffer size @@ -215,6 +217,7 @@ static int32_t SetResetStatus(TouchDriver *driver) static int32_t Gt1xRequestIo(ChipDevice *chipDev) { + HDF_LOGI("%s: AAA start", __func__); int32_t ret; ret = SetGpio(chipDev->boardCfg->pins.rstGpio, 1, 0); if (ret != HDF_SUCCESS) { @@ -239,6 +242,7 @@ static int32_t Gt1xRequestIo(ChipDevice *chipDev) static int32_t HandleSeqArray(SeqArray *src, PowerEventHandler eventHandler, ChipDevice *chipDev) { + HDF_LOGI("%s: AAA start", __func__); int32_t i; SeqArray pwrTiming = {0}; int32_t ret = memcpy_s(&pwrTiming, sizeof(SeqArray), src, sizeof(SeqArray)); @@ -260,6 +264,7 @@ static int32_t HandleSeqArray(SeqArray *src, PowerEventHandler eventHandler, Chi static int32_t SetTiming(ChipDevice *chipDev, bool enable) { + HDF_LOGI("%s: AAA start", __func__); #if defined(CONFIG_ARCH_MESON) return HDF_SUCCESS; #endif @@ -304,6 +309,7 @@ static int32_t SetTiming(ChipDevice *chipDev, bool enable) static void EventHandle(TouchDriver *driver, ChipDevice *chipDev) { + HDF_LOGI("%s: AAA start", __func__); int32_t ret; if ((chipDev->ops == NULL) || (chipDev->ops->DataHandle == NULL)) { return; @@ -317,6 +323,7 @@ static void EventHandle(TouchDriver *driver, ChipDevice *chipDev) static int32_t IrqHandle(uint16_t intGpioNum, void *data) { + HDF_LOGI("%s: AAA start", __func__); TouchDriver *driver = (TouchDriver *)data; int ret = GpioDisableIrq(intGpioNum); if (ret != HDF_SUCCESS) { @@ -336,6 +343,7 @@ static int32_t IrqHandle(uint16_t intGpioNum, void *data) static void InputFrameReport(TouchDriver *driver) { + HDF_LOGI("%s: AAA start", __func__); InputDevice *dev = driver->inputDev; FrameData *frame = &driver->frameData; int32_t i; @@ -343,6 +351,8 @@ static void InputFrameReport(TouchDriver *driver) OsalMutexLock(&driver->mutex); for (i = 0; i < MAX_FINGERS_NUM; i++) { if (frame->fingers[i].valid) { + HDF_LOGI("%s: ABS_MT_POSITION_X = %{public}d", frame->fingers[i].x); + HDF_LOGI("%s: ABS_MT_POSITION_Y = %{public}d", frame->fingers[i].y); input_report_abs(dev, ABS_MT_POSITION_X, frame->fingers[i].x); input_report_abs(dev, ABS_MT_POSITION_Y, frame->fingers[i].y); input_report_abs(dev, ABS_MT_TRACKING_ID, frame->fingers[i].trackId); @@ -361,6 +371,7 @@ static void InputFrameReport(TouchDriver *driver) static int32_t SetupChipIrq(ChipDevice *chipDev) { + HDF_LOGI("%s: AAA start", __func__); #if defined(CONFIG_ARCH_MESON) return HDF_SUCCESS; #endif @@ -390,6 +401,7 @@ static int32_t SetupChipIrq(ChipDevice *chipDev) static void ChipReset(ChipDevice *chipDev) { + HDF_LOGI("%s: AAA start", __func__); if (chipDev == NULL) { HDF_LOGE("%s: invalid param", __func__); return; @@ -488,6 +500,7 @@ static void Gt1xDeinitEsdProtect(void) static int32_t ChipEsdResetRetry(TouchDriver *driver) { + HDF_LOGI("%s: AAA start", __func__); int32_t ret; ChipDevice *chipDev = driver->device; uint16_t intGpioNum = driver->device->boardCfg->pins.intGpio; @@ -519,6 +532,7 @@ static int32_t ChipEsdResetRetry(TouchDriver *driver) static void Gt1xEsdCheckFunc(struct work_struct *work) { + HDF_LOGI("%s: AAA start", __func__); int32_t i = 0; int32_t ret = -1; if (time_after(jiffies, g_timeout)) { @@ -551,6 +565,7 @@ static void Gt1xEsdCheckFunc(struct work_struct *work) static int32_t ChipCheckResetRetry(ChipDevice *chipDev) { + HDF_LOGI("%s: AAA start", __func__); int32_t count = 20; // 20 : reset time int32_t ret; @@ -573,6 +588,7 @@ static int32_t ChipCheckResetRetry(ChipDevice *chipDev) static int32_t ChipDriverInit(ChipDevice *chipDev) { + HDF_LOGI("%s: AAA start", __func__); int32_t count = 20; // 20: reset time int32_t ret; #if defined(CONFIG_ARCH_ROCKCHIP) @@ -628,6 +644,7 @@ static int32_t ChipDriverInit(ChipDevice *chipDev) static InputDevice *InputDeviceInstance(ChipDevice *chipDev) { + HDF_LOGI("%s: AAA start", __func__); InputDevice *inputDev = (InputDevice *)OsalMemAlloc(sizeof(InputDevice)); if (inputDev == NULL) { HDF_LOGE("%s: instance input device failed", __func__); @@ -645,6 +662,7 @@ static InputDevice *InputDeviceInstance(ChipDevice *chipDev) static int32_t ChipMatchCheck(const ChipDevice *chipDev, const TouchDriver *driver) { + HDF_LOGI("%s: AAA start", __func__); const struct DeviceResourceNode *boardNode = driver->boardCfg->boardNode; const struct DeviceResourceNode *chipNode = chipDev->chipCfg->chipNode; @@ -668,6 +686,7 @@ static int32_t ChipMatchCheck(const ChipDevice *chipDev, const TouchDriver *driv static int32_t DeviceBindDriver(ChipDevice *chipDev) { + HDF_LOGI("%s: AAA start", __func__); TouchDriver *driver = NULL; int32_t ret = HDF_FAILURE; int32_t i; @@ -694,6 +713,7 @@ static int32_t DeviceBindDriver(ChipDevice *chipDev) int32_t RegisterTouchChipDevice(ChipDevice *chipDev) { + HDF_LOGI("%s: AAA start", __func__); int32_t ret; InputDevice *inputDev = NULL; if ((chipDev == NULL) || (chipDev->chipCfg == NULL)) { @@ -733,6 +753,7 @@ EXIT: static int32_t TouchGetDevType(TouchDriver *driver, struct HdfSBuf *reply) { + HDF_LOGI("%s: AAA start", __func__); uint32_t devType = driver->devType; HDF_LOGI("%s: enter, devType is %u", __func__, devType); bool ret = HdfSbufWriteUint32(reply, devType); @@ -745,6 +766,7 @@ static int32_t TouchGetDevType(TouchDriver *driver, struct HdfSBuf *reply) static int32_t TouchSetPowerStatus(TouchDriver *driver, struct HdfSBuf *data) { + HDF_LOGI("%s: AAA start", __func__); uint32_t pwrStatus = 0; bool ret = HdfSbufReadUint32(data, &pwrStatus); if (!ret) { @@ -758,6 +780,7 @@ static int32_t TouchSetPowerStatus(TouchDriver *driver, struct HdfSBuf *data) static int32_t TouchGetPowerStatus(TouchDriver *driver, struct HdfSBuf *reply) { + HDF_LOGI("%s: AAA start", __func__); uint32_t pwrStatus = driver->pwrStatus; bool ret = HdfSbufWriteUint32(reply, pwrStatus); if (!ret) { @@ -770,6 +793,7 @@ static int32_t TouchGetPowerStatus(TouchDriver *driver, struct HdfSBuf *reply) static int32_t TouchGetDeviceStrInfo(TouchDriver *driver, int32_t cmd, struct HdfSBuf *reply) { + HDF_LOGI("%s: AAA start", __func__); const char *info = NULL; if ((driver->device == NULL) || (driver->device->chipCfg == NULL)) { HDF_LOGE("%s: parameter invalid", __func__); @@ -802,6 +826,7 @@ static int32_t TouchGetDeviceStrInfo(TouchDriver *driver, int32_t cmd, struct Hd static int32_t TouchGetDeviceAttr(TouchDriver *driver, struct HdfSBuf *reply) { + HDF_LOGI("%s: AAA start", __func__); char *tempStr = "main_touch"; int32_t ret; if (driver->inputDev == NULL) { @@ -825,6 +850,7 @@ static int32_t TouchGetDeviceAttr(TouchDriver *driver, struct HdfSBuf *reply) static int32_t TouchGetDeviceAbility(TouchDriver *driver, struct HdfSBuf *reply) { + HDF_LOGI("%s: AAA start", __func__); if (driver->inputDev == NULL) { return HDF_FAILURE; } @@ -840,6 +866,7 @@ static int32_t TouchGetDeviceAbility(TouchDriver *driver, struct HdfSBuf *reply) static int32_t TouchSetGestureMode(TouchDriver *driver, struct HdfSBuf *data) { + HDF_LOGI("%s: AAA start", __func__); uint32_t gestureMode = 0; bool ret = HdfSbufReadUint32(data, &gestureMode); if (!ret) { @@ -853,6 +880,7 @@ static int32_t TouchSetGestureMode(TouchDriver *driver, struct HdfSBuf *data) static int32_t TouchSelfCapacitance(TouchDriver *driver, struct HdfSBuf *data, struct HdfSBuf *reply) { + HDF_LOGI("%s: AAA start", __func__); CapacitanceTestInfo capacTest = {0}; bool ret = HdfSbufReadUint32(data, &capacTest.testType); if (!ret) { @@ -876,6 +904,7 @@ static int32_t TouchSelfCapacitance(TouchDriver *driver, struct HdfSBuf *data, s static int32_t TouchRunExtraCmd(TouchDriver *driver, struct HdfSBuf *data) { + HDF_LOGI("%s: AAA start", __func__); InputExtraCmd cmd = {0}; cmd.cmdCode = HdfSbufReadString(data); if (cmd.cmdCode == NULL) { @@ -895,6 +924,7 @@ static int32_t TouchRunExtraCmd(TouchDriver *driver, struct HdfSBuf *data) static int32_t HdfTouchDispatch(struct HdfDeviceIoClient *client, int32_t cmd, struct HdfSBuf *data, struct HdfSBuf *reply) { + HDF_LOGI("%s: AAA start", __func__); int32_t ret; TouchDriver *touchDriver = NULL; if ((client == NULL) || (client->device == NULL) || (data == NULL) || (reply == NULL)) { @@ -949,6 +979,7 @@ static int32_t HdfTouchDispatch(struct HdfDeviceIoClient *client, int32_t cmd, static int32_t TouchSetupBus(TouchDriver *driver, TouchBoardCfg *config) { + HDF_LOGI("%s: AAA start", __func__); uint8_t busType = config->bus.busType; uint8_t busNum = config->bus.i2c.busNum; if (busType == I2C_TYPE) { @@ -983,6 +1014,7 @@ static int32_t TouchSetupBus(TouchDriver *driver, TouchBoardCfg *config) static int32_t TouchInitData(TouchDriver *driver, TouchBoardCfg *config) { + HDF_LOGI("%s: AAA start", __func__); driver->devType = config->attr.devType; driver->devName = config->attr.devName; driver->i2cClient.i2cCfg.busNum = config->bus.i2c.busNum; @@ -993,6 +1025,7 @@ static int32_t TouchInitData(TouchDriver *driver, TouchBoardCfg *config) static int32_t TouchDriverInit(TouchDriver *driver, TouchBoardCfg *config) { + HDF_LOGI("%s: AAA start", __func__); int32_t ret = TouchInitData(driver, config); CHECK_RETURN_VALUE(ret); @@ -1008,6 +1041,7 @@ static int32_t TouchDriverInit(TouchDriver *driver, TouchBoardCfg *config) static TouchBoardCfg *BoardConfigInstance(struct HdfDeviceObject *device) { + HDF_LOGI("%s: AAA start", __func__); TouchBoardCfg *boardCfg = (TouchBoardCfg *)OsalMemAlloc(sizeof(TouchBoardCfg)); if (boardCfg == NULL) { HDF_LOGE("%s: instance board config failed", __func__); @@ -1025,6 +1059,7 @@ static TouchBoardCfg *BoardConfigInstance(struct HdfDeviceObject *device) static TouchDriver *TouchDriverInstance(void) { + HDF_LOGI("%s: AAA start", __func__); TouchDriver *touchDrv = (TouchDriver *)OsalMemAlloc(sizeof(TouchDriver)); if (touchDrv == NULL) { HDF_LOGE("%s: instance touch driver failed", __func__); @@ -1047,6 +1082,7 @@ static void AddTouchDriver(TouchDriver *driver) static int32_t HdfTouchDriverBind(struct HdfDeviceObject *device) { + HDF_LOGI("%s: AAA start", __func__); if (device == NULL) { HDF_LOGE("%s: param is null", __func__); return HDF_ERR_INVALID_PARAM; @@ -1086,6 +1122,7 @@ static int HdfTouchDriverDozeResume(struct HdfDeviceObject *device) static int HdfTouchDriverDozeSuspend(struct HdfDeviceObject *device) { + HDF_LOGI("%s: AAA start", __func__); if (device == NULL) { HDF_LOGE("%s: param is null", __func__); return HDF_ERR_INVALID_PARAM; @@ -1121,6 +1158,7 @@ static int HdfTouchDriverDozeSuspend(struct HdfDeviceObject *device) static void HdfTouchDriverRegisterPowerListener(struct HdfDeviceObject *device) { + HDF_LOGI("%s: AAA start", __func__); int ret; static struct IPowerEventListener powerListener = {0}; HDF_LOGI("%s::enter!", __func__); @@ -1135,6 +1173,7 @@ static void HdfTouchDriverRegisterPowerListener(struct HdfDeviceObject *device) static void HdfTouchDriverUnregisterPowerListener(struct HdfDeviceObject *device) { + HDF_LOGI("%s: AAA start", __func__); static struct IPowerEventListener powerListener = {0}; HDF_LOGI("%s::enter!", __func__); powerListener.DozeResume = NULL; @@ -1148,6 +1187,7 @@ static void HdfTouchDriverUnregisterPowerListener(struct HdfDeviceObject *device static int32_t HdfTouchDriverProbe(struct HdfDeviceObject *device) { + HDF_LOGI("%s: AAA start", __func__); int32_t ret; TouchBoardCfg *boardCfg = NULL; TouchDriver *touchDriver = NULL; @@ -1191,6 +1231,7 @@ EXIT: static void HdfTouchDriverRelease(struct HdfDeviceObject *device) { + HDF_LOGI("%s: AAA start", __func__); TouchDriver *driver = NULL; InputDevice *inputDev = NULL; int32_t i;