Lines Matching refs:devIndex
200 static int32_t SetPowerStatus(uint32_t devIndex, uint32_t status) in SetPowerStatus() argument
206 if ((devIndex >= MAX_INPUT_DEV_NUM) || (status >= INPUT_POWER_STATUS_UNKNOWN)) { in SetPowerStatus()
214 if (pos->payload.devIndex != devIndex) { in SetPowerStatus()
227 HDF_LOGE("%s: device%u doesn't exist, can't set power status", __func__, devIndex); in SetPowerStatus()
231 static int32_t GetPowerStatus(uint32_t devIndex, uint32_t *status) in GetPowerStatus() argument
237 if ((devIndex >= MAX_INPUT_DEV_NUM) || (status == NULL)) { in GetPowerStatus()
245 if (pos->payload.devIndex != devIndex) { in GetPowerStatus()
263 HDF_LOGE("%s: device%u doesn't exist, can't get power status", __func__, devIndex); in GetPowerStatus()
267 static int32_t GetDeviceType(uint32_t devIndex, uint32_t *deviceType) in GetDeviceType() argument
273 if ((devIndex >= MAX_INPUT_DEV_NUM) || (deviceType == NULL)) { in GetDeviceType()
281 if (pos->payload.devIndex != devIndex) { in GetDeviceType()
300 HDF_LOGE("%s: device%u doesn't exist, can't get device type", __func__, devIndex); in GetDeviceType()
304 static int32_t GetDevStringInfo(uint32_t devIndex, char *info, uint32_t len, uint32_t lenLimit, int… in GetDevStringInfo() argument
311 if ((devIndex >= MAX_INPUT_DEV_NUM) || (info == NULL) || (len < lenLimit)) { in GetDevStringInfo()
319 if (pos->payload.devIndex != devIndex) { in GetDevStringInfo()
351 HDF_LOGI("%s: device%u get information success", __func__, devIndex); in GetDevStringInfo()
356 HDF_LOGE("%s: device%u doesn't exist, can't get information", __func__, devIndex); in GetDevStringInfo()
360 static int32_t GetChipName(uint32_t devIndex, char *chipName, uint32_t length) in GetChipName() argument
362 return GetDevStringInfo(devIndex, chipName, length, CHIP_NAME_LEN, GET_CHIP_NAME); in GetChipName()
365 static int32_t GetChipInfo(uint32_t devIndex, char *chipInfo, uint32_t length) in GetChipInfo() argument
367 return GetDevStringInfo(devIndex, chipInfo, length, CHIP_INFO_LEN, GET_CHIP_INFO); in GetChipInfo()
370 static int32_t GetVendorName(uint32_t devIndex, char *vendorName, uint32_t length) in GetVendorName() argument
372 return GetDevStringInfo(devIndex, vendorName, length, VENDOR_NAME_LEN, GET_VENDOR_NAME); in GetVendorName()
375 static int32_t SetGestureMode(uint32_t devIndex, uint32_t gestureMode) in SetGestureMode() argument
381 if (devIndex >= MAX_INPUT_DEV_NUM) { in SetGestureMode()
389 if (pos->payload.devIndex != devIndex) { in SetGestureMode()
402 HDF_LOGE("%s: device%u doesn't exist, can't set gesture mode", __func__, devIndex); in SetGestureMode()
406 static int32_t RunCapacitanceTest(uint32_t devIndex, uint32_t testType, char *result, uint32_t leng… in RunCapacitanceTest() argument
413 if (devIndex >= (MAX_INPUT_DEV_NUM) || (testType >= TEST_TYPE_UNKNOWN) || in RunCapacitanceTest()
424 if (pos->payload.devIndex != devIndex) { in RunCapacitanceTest()
444 HDF_LOGE("%s: device%u doesn't exist, can't run capacitance test", __func__, devIndex); in RunCapacitanceTest()
448 static int32_t RunExtraCommand(uint32_t devIndex, InputExtraCmd *cmdInfo) in RunExtraCommand() argument
454 if ((devIndex >= MAX_INPUT_DEV_NUM) || (cmdInfo == NULL) || (cmdInfo->cmdCode == NULL) || in RunExtraCommand()
463 if (pos->payload.devIndex != devIndex) { in RunExtraCommand()
476 HDF_LOGE("%s: device%d doesn't exist, can't run extra cmd", __func__, devIndex); in RunExtraCommand()
480 static int32_t GetDeviceAbility(uint32_t devIndex, InputDevAbility *ability) in GetDeviceAbility() argument
486 if (devIndex >= MAX_INPUT_DEV_NUM) { in GetDeviceAbility()
494 if (pos->payload.devIndex != devIndex) { in GetDeviceAbility()
512 HDF_LOGE("%s: device%u doesn't exist, can't get dev ability", __func__, devIndex); in GetDeviceAbility()
516 static int32_t UpdateAbilityInfo(uint32_t devIndex) in UpdateAbilityInfo() argument
521 ret = GetDeviceAbility(devIndex, &node.payload.abilitySet); in UpdateAbilityInfo()
526 static int32_t GetDeviceAttr(uint32_t devIndex, InputDevAttr *attr) in GetDeviceAttr() argument
532 if (devIndex >= MAX_INPUT_DEV_NUM) { in GetDeviceAttr()
539 if (pos->payload.devIndex != devIndex) { in GetDeviceAttr()
558 HDF_LOGE("%s: device%u doesn't exist, can't get dev attr", __func__, devIndex); in GetDeviceAttr()
562 static int32_t UpdateAttrInfo(uint32_t devIndex) in UpdateAttrInfo() argument
567 ret = GetDeviceAttr(devIndex, &node.payload.attrSet); in UpdateAttrInfo()
572 static int32_t UpdateDevBaseInfo(uint32_t devIndex) in UpdateDevBaseInfo() argument
577 ret = GetDeviceType(devIndex, &node.payload.devType); in UpdateDevBaseInfo()
579 ret = GetChipName(devIndex, &node.payload.chipInfo[0], CHIP_INFO_LEN); in UpdateDevBaseInfo()
581 ret = GetChipInfo(devIndex, &node.payload.vendorName[0], VENDOR_NAME_LEN); in UpdateDevBaseInfo()
583 ret = GetVendorName(devIndex, &node.payload.chipName[0], CHIP_NAME_LEN); in UpdateDevBaseInfo()
588 int32_t UpdateDevFullInfo(uint32_t devIndex) in UpdateDevFullInfo() argument
590 int32_t ret = UpdateDevBaseInfo(devIndex); in UpdateDevFullInfo()
592 ret = UpdateAbilityInfo(devIndex); in UpdateDevFullInfo()
594 ret = UpdateAttrInfo(devIndex); in UpdateDevFullInfo()