Home
last modified time | relevance | path

Searched refs:pos (Results 1 – 25 of 67) sorted by relevance

123

/drivers/hdf_core/interfaces/inner_api/utils/
Dhdf_dlist.h209 #define DLIST_FOR_EACH_ENTRY(pos, head, type, member) \ argument
210 for ((pos) = CONTAINER_OF((head)->next, type, member); \
211 &(pos)->member != (head); \
212 (pos) = CONTAINER_OF((pos)->member.next, type, member))
215 #define DLIST_FOR_EACH_ENTRY_REVERSE(pos, head, type, member) \ argument
216 for ((pos) = CONTAINER_OF((head)->prev, type, member); \
217 &(pos)->member != (head); \
218 (pos) = CONTAINER_OF((pos)->member.prev, type, member))
232 #define DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, head, type, member) \ argument
233 for ((pos) = CONTAINER_OF((head)->next, type, member), \
[all …]
/drivers/hdf_core/adapter/uhdf2/host/src/
Ddevhost_dump.c50 struct DumpServiceNode *pos = NULL; in DevHostDumpDeInit() local
54 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &g_dumpHostNode.list, struct DumpServiceNode, node) { in DevHostDumpDeInit()
55 DListRemove(&pos->node); in DevHostDumpDeInit()
56 OsalMemFree(pos->servName); in DevHostDumpDeInit()
57 OsalMemFree(pos); in DevHostDumpDeInit()
68 struct DumpServiceNode *pos = NULL; in DevHostCheckDumpExist() local
71 DLIST_FOR_EACH_ENTRY(pos, &g_dumpHostNode.list, struct DumpServiceNode, node) { in DevHostCheckDumpExist()
72 if (strcmp(pos->servName, servName) == 0) { in DevHostCheckDumpExist()
143 struct DumpServiceNode *pos = NULL; in DevHostDump() local
146 DLIST_FOR_EACH_ENTRY(pos, &g_dumpHostNode.list, struct DumpServiceNode, node) { in DevHostDump()
[all …]
/drivers/hdf_core/framework/support/platform/src/regulator/
Dregulator_core.c29 struct RegulatorNode *pos = NULL; in RegulatorNodeOpen() local
40 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->regulatorHead, struct RegulatorNode, node) { in RegulatorNodeOpen()
41 if (strcmp(name, pos->regulatorInfo.name) == 0) { in RegulatorNodeOpen()
42 if ((pos->ops->open != NULL) && pos->ops->open(pos) != HDF_SUCCESS) { in RegulatorNodeOpen()
48 return pos; in RegulatorNodeOpen()
65 struct RegulatorNode *pos = NULL; in RegulatorNodeListPrint() local
76 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->regulatorHead, struct RegulatorNode, node) { in RegulatorNodeListPrint()
78 pos->regulatorInfo.name, pos->regulatorInfo.status, in RegulatorNodeListPrint()
79 pos->regulatorInfo.constraints.alwaysOn, pos->regulatorInfo.constraints.mode, in RegulatorNodeListPrint()
80 pos->regulatorInfo.constraints.minUv, pos->regulatorInfo.constraints.maxUv, in RegulatorNodeListPrint()
[all …]
Dregulator_tree_mgr.c50 struct RegulatorTreeInfo *pos = NULL; in RegulatorTreeGetParent() local
60 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->treeMgrHead, struct RegulatorTreeInfo, node) { in RegulatorTreeGetParent()
61 if (strcmp(pos->name, name) == 0) { in RegulatorTreeGetParent()
62 if (pos->parent == NULL) { in RegulatorTreeGetParent()
69 name, pos->parent->regulatorInfo.name); in RegulatorTreeGetParent()
70 return pos->parent; in RegulatorTreeGetParent()
84 struct RegulatorTreeInfo *pos = NULL; in RegulatorTreeGetChild() local
94 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->treeMgrHead, struct RegulatorTreeInfo, node) { in RegulatorTreeGetChild()
95 if (strcmp(pos->name, name) == 0) { in RegulatorTreeGetChild()
98 return (&pos->childHead); in RegulatorTreeGetChild()
[all …]
/drivers/peripheral/codec/hal/passthrough/src/
Dcodec_component_manager.c38 struct ComponentIdElement *pos = NULL; in GetNextComponentId() local
44 DLIST_FOR_EACH_ENTRY(pos, &g_list->head, struct ComponentIdElement, node) { in GetNextComponentId()
45 if (pos != NULL && tempId == pos->componentId) { in GetNextComponentId()
129 struct ComponentIdElement *pos = NULL; in ComponentManagerDestoryComponent() local
133 DLIST_FOR_EACH_ENTRY_SAFE(pos, next, &g_list->head, struct ComponentIdElement, node) { in ComponentManagerDestoryComponent()
134 if (pos == NULL || componentId != pos->componentId) { in ComponentManagerDestoryComponent()
137 if (pos->info == NULL) { in ComponentManagerDestoryComponent()
142 ret = CodecAdapterDestroyComponent(pos->info->codecNode); in ComponentManagerDestoryComponent()
147 CodecComponentTypeRelease(&pos->info->instance); in ComponentManagerDestoryComponent()
148 *pos->comp = NULL; in ComponentManagerDestoryComponent()
[all …]
/drivers/peripheral/input/hal/src/
Dinput_controller.c202 DeviceInfoNode *pos = NULL; in SetPowerStatus() local
213 DLIST_FOR_EACH_ENTRY_SAFE(pos, next, &manager->devList, DeviceInfoNode, node) { in SetPowerStatus()
214 if (pos->payload.devIndex != devIndex) { in SetPowerStatus()
217 if (IoServiceOps(pos->service, SET_PWR_STATUS, &status, NULL, 0)) { in SetPowerStatus()
233 DeviceInfoNode *pos = NULL; in GetPowerStatus() local
244 DLIST_FOR_EACH_ENTRY_SAFE(pos, next, &manager->devList, DeviceInfoNode, node) { in GetPowerStatus()
245 if (pos->payload.devIndex != devIndex) { in GetPowerStatus()
248 if (IoServiceOps(pos->service, GET_PWR_STATUS, NULL, status, sizeof(uint32_t))) { in GetPowerStatus()
269 DeviceInfoNode *pos = NULL; in GetDeviceType() local
280 DLIST_FOR_EACH_ENTRY_SAFE(pos, next, &manager->devList, DeviceInfoNode, node) { in GetDeviceType()
[all …]
Dinput_reporter.c41 DeviceInfoNode *pos = NULL; in EventListenerCallback() local
72 DLIST_FOR_EACH_ENTRY_SAFE(pos, next, &manager->devList, DeviceInfoNode, node) { in EventListenerCallback()
73 if (pos->service == service) { in EventListenerCallback()
74pos->eventCb->EventPkgCallback((const InputEventPackage **)pkgs, count, pos->payload.devIndex); in EventListenerCallback()
95 DeviceInfoNode *pos = NULL; in RegisterReportCallback() local
106 DLIST_FOR_EACH_ENTRY_SAFE(pos, next, &manager->devList, DeviceInfoNode, node) { in RegisterReportCallback()
107 if (pos->payload.devIndex != devIndex) { in RegisterReportCallback()
115 if (HdfDeviceRegisterEventListener(pos->service, listener) != INPUT_SUCCESS) { in RegisterReportCallback()
122 pos->eventCb = callback; in RegisterReportCallback()
123 pos->listener = listener; in RegisterReportCallback()
[all …]
Dinput_manager.c46 DeviceInfoNode *pos = NULL; in GetInputDevice() local
70 DLIST_FOR_EACH_ENTRY_SAFE(pos, next, &manager->devList, DeviceInfoNode, node) { in GetInputDevice()
71 if (pos->payload.devIndex != devIndex) { in GetInputDevice()
74 *devInfo = &pos->payload; in GetInputDevice()
87 DeviceInfoNode *pos = NULL; in GetInputDeviceList() local
101 DLIST_FOR_EACH_ENTRY_SAFE(pos, next, &manager->devList, DeviceInfoNode, node) { in GetInputDeviceList()
109 *tempList = &pos->payload; in GetInputDeviceList()
120 DeviceInfoNode *pos = NULL; in CloseInputDevice() local
127 DLIST_FOR_EACH_ENTRY_SAFE(pos, next, &manager->devList, DeviceInfoNode, node) { in CloseInputDevice()
128 if (pos->payload.devIndex != devIndex) { in CloseInputDevice()
[all …]
/drivers/peripheral/sensor/hal/src/
Dsensor_controller.c44 struct SensorIdListNode *pos = NULL; in ReleaseAllSensorInfo() local
47 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->sensorIdListHead, struct SensorIdListNode, node) { in ReleaseAllSensorInfo()
48 DListRemove(&(pos->node)); in ReleaseAllSensorInfo()
49 OsalMemFree(pos); in ReleaseAllSensorInfo()
61 struct SensorManagerNode *pos = NULL; in SetSensorIdClassification() local
67 DLIST_FOR_EACH_ENTRY(pos, &manager->managerHead, struct SensorManagerNode, node) { in SetSensorIdClassification()
68 end = begin + pos->sensorCount; in SetSensorIdClassification()
76 sensorIdNode->ioService = pos->ioService; in SetSensorIdClassification()
95 struct SensorInformation *pos = NULL; in GetSensorInfoFromReply() local
111 pos = manager->sensorInfoEntry; in GetSensorInfoFromReply()
[all …]
Dsensor_manager.c95 struct SensorManagerNode *pos = NULL; in ReleaseSensorServiceList() local
101 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->managerHead, struct SensorManagerNode, node) { in ReleaseSensorServiceList()
102 if (pos->ioService != NULL) { in ReleaseSensorServiceList()
103 HdfIoServiceRecycle(pos->ioService); in ReleaseSensorServiceList()
104 pos->ioService = NULL; in ReleaseSensorServiceList()
107 DListRemove(&(pos->node)); in ReleaseSensorServiceList()
108 OsalMemFree(pos); in ReleaseSensorServiceList()
109 pos = NULL; in ReleaseSensorServiceList()
Dsensor_dump.c158 int32_t pos = eventDumpList->pos; in SensorShowData() local
160 pos = pos + 1 > MAX_DUMP_DATA_SIZE ? 1 : pos + 1; in SensorShowData()
161 float *data = (float *)(eventDumpList->listDumpArr[pos - 1].data); in SensorShowData()
162 ShowData(data, eventDumpList->listDumpArr[pos - 1].timestamp, in SensorShowData()
163 g_sensorList[eventDumpList->listDumpArr[pos - 1].sensorId], reply); in SensorShowData()
/drivers/hdf_core/framework/support/platform/src/fwk/
Dplatform_listener_u.c191 struct PlatformUserListener *pos = NULL; in PlatformUserListenerReg() local
203 DLIST_FOR_EACH_ENTRY(pos, &manager->listeners, struct PlatformUserListener, node) { in PlatformUserListenerReg()
204 if (pos->num == num) { in PlatformUserListenerReg()
224 struct PlatformUserListener *pos = NULL; in PlatformUserListenerDestory() local
235 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->listeners, struct PlatformUserListener, node) { in PlatformUserListenerDestory()
236 if (pos->num == num) { in PlatformUserListenerDestory()
238 if (HdfDeviceUnregisterEventListener(manager->service, pos->listener) != HDF_SUCCESS) { in PlatformUserListenerDestory()
243 OsalMemFree(pos->listener); in PlatformUserListenerDestory()
244 OsalMemFree(pos->data); in PlatformUserListenerDestory()
245 DListRemove(&pos->node); in PlatformUserListenerDestory()
[all …]
Dplatform_dumper.c274 struct DumperDataMgrNode *pos = NULL; in DumperAddNode() local
282 DLIST_FOR_EACH_ENTRY(pos, &dumper->dumperDatas, struct DumperDataMgrNode, node) { in DumperAddNode()
283 if ((strcmp(pos->data.name, data->name) == 0) && (pos->data.type == data->type)) { in DumperAddNode()
346 struct DumperDataMgrNode *pos = NULL; in PlatformDumperDelData() local
355 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &dumper->dumperDatas, struct DumperDataMgrNode, node) { in PlatformDumperDelData()
356 if ((strcmp(pos->data.name, name) == 0) && (pos->data.type == type)) { in PlatformDumperDelData()
358 DListRemove(&pos->node); in PlatformDumperDelData()
359 OsalMemFree(pos); in PlatformDumperDelData()
371 struct DumperDataMgrNode *pos = NULL; in PlatformDumperClearDatas() local
380 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &dumper->dumperDatas, struct DumperDataMgrNode, node) { in PlatformDumperClearDatas()
[all …]
Dplatform_manager.c46 struct PlatformDevice *pos = NULL; in PlatformManagerClearDevice() local
54 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->devices, struct PlatformDevice, node) { in PlatformManagerClearDevice()
55 DListRemove(&pos->node); in PlatformManagerClearDevice()
56 PlatformDevicePut(pos); // put the reference hold by manager in PlatformManagerClearDevice()
162 struct PlatformDevice *pos = NULL; in PlatformManagerAddDevice() local
175 DLIST_FOR_EACH_ENTRY(pos, &manager->devices, struct PlatformDevice, node) { in PlatformManagerAddDevice()
176 if (pos == device) { in PlatformManagerAddDevice()
222 struct PlatformDevice *pos = NULL; in PlatformManagerDelDevice() local
230 DLIST_FOR_EACH_ENTRY(pos, &manager->devices, struct PlatformDevice, node) { in PlatformManagerDelDevice()
231 if (pos == device) { in PlatformManagerDelDevice()
[all …]
/drivers/peripheral/codec/hal/src/
Dcodec_component_manager_service.c58 struct ComponentTypeNode *pos = NULL; in GetNextComponentId() local
65 DLIST_FOR_EACH_ENTRY_SAFE(pos, next, &g_service->head, struct ComponentTypeNode, node) in GetNextComponentId()
67 if (pos != NULL && tempId == pos->componentId) { in GetNextComponentId()
102 struct ComponentTypeNode *pos = NULL; in OmxManagerDestroyComponent() local
107 DLIST_FOR_EACH_ENTRY_SAFE(pos, next, &g_service->head, struct ComponentTypeNode, node) in OmxManagerDestroyComponent()
109 if (pos == NULL || componentId != pos->componentId) { in OmxManagerDestroyComponent()
113 struct CodecComponentNode *codecNode = CodecComponentTypeServiceGetCodecNode(pos->service); in OmxManagerDestroyComponent()
123 DListRemove(&pos->node); in OmxManagerDestroyComponent()
124 CodecComponentTypeServiceRelease(pos->service); in OmxManagerDestroyComponent()
125 OsalMemFree(pos); in OmxManagerDestroyComponent()
[all …]
Dcodec_dfx_service.c44 struct ComponentTypeNode *pos = NULL; in DevCodecHostDump() local
46 DLIST_FOR_EACH_ENTRY_SAFE(pos, next, &managerService->head, struct ComponentTypeNode, node) in DevCodecHostDump()
48 if (pos == NULL) { in DevCodecHostDump()
52 … struct CodecComponentNode *codecNode = CodecComponentTypeServiceGetCodecNode(pos->service); in DevCodecHostDump()
55 …int32_t ret = OmxAdapterWriteDumperData(dump, CODEC_MAX_DFX_DUMP_LEN, pos->componentId, codecNode); in DevCodecHostDump()
/drivers/hdf_core/framework/tools/hdf_dev_eco_tool/command_line/
Dhdf_lite_kconfig_file.py60 pos = len(self.lines) - 1
61 while pos > 0 and len(self.lines[pos].strip()) == 0:
62 pos -= 1
63 pos += 1
64 self.lines.insert(pos, new_line)
/drivers/hdf_core/framework/model/sensor/driver/common/src/
Dsensor_device_manager.c29 struct SensorDevInfoNode *pos = NULL; in AddSensorDevice() local
36 DLIST_FOR_EACH_ENTRY(pos, &manager->sensorDevInfoHead, struct SensorDevInfoNode, node) { in AddSensorDevice()
37 if ((deviceInfo->sensorInfo.sensorId == pos->devInfo.sensorInfo.sensorId) && in AddSensorDevice()
38 (strcmp(deviceInfo->sensorInfo.sensorName, pos->devInfo.sensorInfo.sensorName) == 0)) { in AddSensorDevice()
66 struct SensorDevInfoNode *pos = NULL; in DeleteSensorDevice() local
74 … DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->sensorDevInfoHead, struct SensorDevInfoNode, node) { in DeleteSensorDevice()
75 if ((sensorBaseInfo->sensorId == pos->devInfo.sensorInfo.sensorId) && in DeleteSensorDevice()
76 (strcmp(sensorBaseInfo->sensorName, pos->devInfo.sensorInfo.sensorName) == 0)) { in DeleteSensorDevice()
77 DListRemove(&pos->node); in DeleteSensorDevice()
78 OsalMemFree(pos); in DeleteSensorDevice()
[all …]
/drivers/peripheral/audio/hdi_service/primary_impl/src/
Daudio_manager.c221 struct IAudioManager *manager, struct IAudioAdapter *adapter, int32_t pos) in AudioManagerServiceAddAdapter() argument
234 if (pos >= SUPPORT_ADAPTER_NUM_MAX) { in AudioManagerServiceAddAdapter()
238 int32_t ret = strncpy_s(hwManager->adapterInfos[pos].adapterName, ADAPTER_NAME_LEN, in AudioManagerServiceAddAdapter()
245 hwManager->adapterInfos[pos].refCnt = 1; // first init set 1 in AudioManagerServiceAddAdapter()
246 hwManager->adapterInfos[pos].adapterServicePtr = hwAdapter; in AudioManagerServiceAddAdapter()
247 …AUDIO_FUNC_LOGI("load adaptername[%{public}s], refCount[1]", hwManager->adapterInfos[pos].adapterN… in AudioManagerServiceAddAdapter()
476 static int32_t AudioManagerServiceRemvAdapter(struct IAudioManager *manager, uint32_t pos) in AudioManagerServiceRemvAdapter() argument
478 if (manager == NULL || pos >= SUPPORT_ADAPTER_NUM_MAX) { in AudioManagerServiceRemvAdapter()
484 …struct AudioHwAdapter *hwAdapter = (struct AudioHwAdapter *)audioManagerSer->adapterInfos[pos].ada… in AudioManagerServiceRemvAdapter()
486 if (audioManagerSer->adapterInfos[pos].refCnt != 0) { in AudioManagerServiceRemvAdapter()
[all …]
/drivers/hdf_core/framework/support/platform/src/timer/
Dtimer_core.c35 struct TimerCntrl *pos = NULL; in TimerCntrlOpen() local
44 DLIST_FOR_EACH_ENTRY(pos, &manager->timerListHead, struct TimerCntrl, node) { in TimerCntrlOpen()
45 if (number == pos->info.number) { in TimerCntrlOpen()
47 return pos; in TimerCntrlOpen()
440 struct TimerCntrl *pos = NULL; in TimerListRemoveAll() local
449 DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &manager->timerListHead, struct TimerCntrl, node) { in TimerListRemoveAll()
450 if ((pos->ops->Remove != NULL) && (pos->ops->Remove(pos) != HDF_SUCCESS)) { in TimerListRemoveAll()
451 HDF_LOGE("TimerListRemoveAll: remove %u fail!", pos->info.number); in TimerListRemoveAll()
453 DListRemove(&pos->node); in TimerListRemoveAll()
454 (void)OsalMutexDestroy(&pos->lock); in TimerListRemoveAll()
[all …]
/drivers/hdf_core/adapter/khdf/linux/osal/src/
Dosal_file.c51 loff_t pos; in OsalFileWrite() local
59 pos = fp->f_pos; in OsalFileWrite()
60 ret = kernel_write(fp, string, length, &pos); in OsalFileWrite()
87 loff_t pos; in OsalFileRead() local
95 pos = fp->f_pos; in OsalFileRead()
96 ret = kernel_read(fp, buf, length, &pos); in OsalFileRead()
/drivers/hdf_core/framework/tools/hdi-gen/util/
Dstring_helper.cpp30 size_t pos = sources.find(limit, begin); in Split() local
31 while (pos != std::string::npos) { in Split()
32 std::string element = sources.substr(begin, pos - begin); in Split()
36 begin = pos + limit.size(); in Split()
37 pos = sources.find(limit, begin); in Split()
94 size_t pos = 0; in Replace() local
95 while ((pos = result.find(oldstr, pos)) != std::string::npos) { in Replace()
96 result.replace(pos, oldstr.size(), newstr); in Replace()
97 pos += newstr.size(); in Replace()
/drivers/hdf_core/framework/model/misc/vibrator/driver/src/
Dvibrator_haptic.c247 struct VibratorEffectNode *pos = NULL; in GetHapticSeqByEffect() local
269 … DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &hapticData->effectSeqHead, struct VibratorEffectNode, node) { in GetHapticSeqByEffect()
270 if (strcmp(effectCfg->effect, pos->effect) == 0 && pos->seq != NULL) { in GetHapticSeqByEffect()
271 hapticData->effectType = (int32_t)pos->type; in GetHapticSeqByEffect()
272 HDF_LOGE("%s: pos_num = %d", __func__, pos->num); in GetHapticSeqByEffect()
273 hapticData->seqCount = pos->num; in GetHapticSeqByEffect()
274 hapticData->currentEffectSeq = &(pos->seq[0]); in GetHapticSeqByEffect()
381 struct VibratorEffectNode *pos = NULL; in FreeHapticConfig() local
389 … DLIST_FOR_EACH_ENTRY_SAFE(pos, tmp, &hapticData->effectSeqHead, struct VibratorEffectNode, node) { in FreeHapticConfig()
390 if (pos->seq != NULL) { in FreeHapticConfig()
[all …]
/drivers/hdf_core/framework/test/unittest/osal/
Dosal_list_test.c79 OsalTestEventHandle *pos = NULL; in OsalTestList() local
81 DLIST_FOR_EACH_ENTRY(pos, head, OsalTestEventHandle, list) { in OsalTestList()
82 if (pos->handle != NULL) { in OsalTestList()
83 pos->handle(1); in OsalTestList()
152 OsalTestEventHandle *pos = NULL; in TestListRemoveInlist() local
156 DLIST_FOR_EACH_ENTRY_SAFE(pos, q, &g_handleMng.list, OsalTestEventHandle, list) { in TestListRemoveInlist()
157 if (&(pos->list) == &g_handleArr[0].list) { in TestListRemoveInlist()
158 DListRemove(&(pos->list)); in TestListRemoveInlist()
163 if (pos->handle != NULL) { in TestListRemoveInlist()
164 pos->handle(1); in TestListRemoveInlist()
[all …]
/drivers/hdf_core/framework/support/platform/src/pcie/
Dpcie_if.c39 int32_t PcieRead(DevHandle handle, uint32_t mode, uint32_t pos, uint8_t *data, uint32_t len) in PcieRead() argument
41 return PcieCntlrRead((struct PcieCntlr *)handle, mode, pos, data, len); in PcieRead()
44 int32_t PcieWrite(DevHandle handle, uint32_t mode, uint32_t pos, uint8_t *data, uint32_t len) in PcieWrite() argument
46 return PcieCntlrWrite((struct PcieCntlr *)handle, mode, pos, data, len); in PcieWrite()

123