/drivers/hdf_core/framework/support/platform/src/fwk/ |
H A D | platform_device.c | 25 struct PlatformDevice *device = NULL; in PlatformDeviceOnLastPut() local 33 device = CONTAINER_OF(sref, struct PlatformDevice, ref); in PlatformDeviceOnLastPut() 34 if (device == NULL) { in PlatformDeviceOnLastPut() 35 PLAT_LOGE("PlatformDeviceOnLastPut: get device is null!"); in PlatformDeviceOnLastPut() 39 ret = PlatformDevicePostEvent(device, PLAT_EVENT_DEVICE_DEAD); in PlatformDeviceOnLastPut() 44 PLAT_LOGI("PlatformDeviceOnLastPut: device:%s(%d) life cycle end", device->name, device->number); in PlatformDeviceOnLastPut() 53 int32_t PlatformDeviceSetName(struct PlatformDevice *device, const char *fmt, ...) in PlatformDeviceSetName() argument 61 if (device in PlatformDeviceSetName() 102 PlatformDeviceClearName(struct PlatformDevice *device) PlatformDeviceClearName() argument 110 PlatformDeviceInit(struct PlatformDevice *device) PlatformDeviceInit() argument 140 PlatformDeviceUninit(struct PlatformDevice *device) PlatformDeviceUninit() argument 152 PlatformDeviceGet(struct PlatformDevice *device) PlatformDeviceGet() argument 163 PlatformDevicePut(struct PlatformDevice *device) PlatformDevicePut() argument 170 PlatformDeviceRefCount(struct PlatformDevice *device) PlatformDeviceRefCount() argument 178 PlatformDeviceAdd(struct PlatformDevice *device) PlatformDeviceAdd() argument 212 PlatformDeviceDel(struct PlatformDevice *device) PlatformDeviceDel() argument 247 PlatformDeviceCreateService(struct PlatformDevice *device, int32_t (*dispatch)(struct HdfDeviceIoClient *client, int cmd, struct HdfSBuf *data, struct HdfSBuf *reply)) PlatformDeviceCreateService() argument 270 PlatformDeviceDestroyService(struct PlatformDevice *device) PlatformDeviceDestroyService() argument 286 PlatformDeviceSetHdfDev(struct PlatformDevice *device, struct HdfDeviceObject *hdfDevice) PlatformDeviceSetHdfDev() argument 303 PlatformDeviceBind(struct PlatformDevice *device, struct HdfDeviceObject *hdfDevice) PlatformDeviceBind() argument 314 PlatformDeviceUnbind(struct PlatformDevice *device, const struct HdfDeviceObject *hdfDev) PlatformDeviceUnbind() argument 344 PlatformDevicePostEvent(struct PlatformDevice *device, uint32_t events) PlatformDevicePostEvent() argument 353 PlatformDeviceWaitEvent(struct PlatformDevice *device, uint32_t mask, uint32_t tms, uint32_t *events) PlatformDeviceWaitEvent() argument 378 PlatformDeviceListenEvent(struct PlatformDevice *device, struct PlatformEventListener *listener) PlatformDeviceListenEvent() argument 391 PlatformDeviceUnListenEvent(struct PlatformDevice *device, struct PlatformEventListener *listener) PlatformDeviceUnListenEvent() argument 398 PlatformDeviceGetDrs(const struct PlatformDevice *device) PlatformDeviceGetDrs() argument [all...] |
H A D | platform_manager.c | 19 (void)OsalSpinLockIrqSave(&manager->device.spin, &manager->device.irqSave); in PlatformManagerLock() 24 (void)OsalSpinUnlockIrqRestore(&manager->device.spin, &manager->device.irqSave); in PlatformManagerUnlock() 33 if ((ret = PlatformDeviceInit(&manager->device)) != HDF_SUCCESS) { in PlatformManagerInit() 34 PLAT_LOGE("PlatformManagerInit: device init fail!"); in PlatformManagerInit() 64 PlatformDeviceUninit(&manager->device); in PlatformManagerUninit() 79 managerNew->device.name = name; in PlatformManagerCreate() 127 static int32_t PlatformManagerAddDeviceDefault(struct PlatformManager *manager, struct PlatformDevice *device) in PlatformManagerAddDeviceDefault() argument 134 if (device in PlatformManagerAddDeviceDefault() 159 PlatformManagerAddDevice(struct PlatformManager *manager, struct PlatformDevice *device) PlatformManagerAddDevice() argument 203 PlatformManagerDelDeviceDefault(const struct PlatformManager *manager, struct PlatformDevice *device) PlatformManagerDelDeviceDefault() argument 219 PlatformManagerDelDevice(struct PlatformManager *manager, struct PlatformDevice *device) PlatformManagerDelDevice() argument 289 PlatformDeviceMatchByNumber(struct PlatformDevice *device, void *data) PlatformDeviceMatchByNumber() argument 305 PlatformDeviceMatchByName(struct PlatformDevice *device, void *data) PlatformDeviceMatchByName() argument [all...] |
/drivers/hdf_core/framework/core/host/src/ |
H A D | hdf_device.c | 19 // device node id less than 129 is configured in hcs, dynamic allocation ID starts from 129 22 static void UpdateDeivceNodeIdIndex(struct HdfDevice *device, devid_t nodeDevid) in UpdateDeivceNodeIdIndex() argument 24 if (device->devidIndex < DEVNODEID(nodeDevid)) { in UpdateDeivceNodeIdIndex() 25 device->devidIndex = DEVNODEID(nodeDevid); in UpdateDeivceNodeIdIndex() 29 static devid_t FindUsableDevNodeId(struct HdfDevice *device) in FindUsableDevNodeId() argument 34 for (; nodeId <= device->devidIndex; nodeId++) { in FindUsableDevNodeId() 36 DLIST_FOR_EACH_ENTRY(devNode, &device->devNodes, struct HdfDeviceNode, entry) { in FindUsableDevNodeId() 49 static int AcquireNodeDeivceId(struct HdfDevice *device, devid_t *devid) in AcquireNodeDeivceId() argument 53 if (device->devidIndex >= DEVNODEID_MASK) { in AcquireNodeDeivceId() 57 if (device in AcquireNodeDeivceId() 82 struct HdfDevice *device = (struct HdfDevice *)devInst; HdfDeviceAttach() local 107 struct HdfDevice *device = NULL; HdfDeviceDetach() local 129 HdfDeviceGetDeviceNode(struct IHdfDevice *device, devid_t devid) HdfDeviceGetDeviceNode() argument 141 HdfDeviceDetachWithDevid(struct IHdfDevice *device, devid_t devid) HdfDeviceDetachWithDevid() argument 154 HdfDeviceConstruct(struct HdfDevice *device) HdfDeviceConstruct() argument 164 HdfDeviceDestruct(struct HdfDevice *device) HdfDeviceDestruct() argument 176 struct HdfDevice *device = (struct HdfDevice *)OsalMemCalloc(sizeof(struct HdfDevice)); HdfDeviceCreate() local 185 struct HdfDevice *device = (struct HdfDevice *)object; HdfDeviceRelease() local 197 HdfDeviceFreeInstance(struct HdfDevice *device) HdfDeviceFreeInstance() argument [all...] |
H A D | devhost_service.c | 23 struct HdfDevice *device = NULL; in DevHostServiceFindDevice() local 29 DLIST_FOR_EACH_ENTRY(device, &hostService->devices, struct HdfDevice, node) { in DevHostServiceFindDevice() 30 if (DEVICEID(device->deviceId) == deviceId) { in DevHostServiceFindDevice() 31 return device; in DevHostServiceFindDevice() 37 static void DevHostServiceFreeDevice(struct DevHostService *hostService, struct HdfDevice *device) in DevHostServiceFreeDevice() argument 40 if (device != NULL) { in DevHostServiceFreeDevice() 41 DListRemove(&device->node); in DevHostServiceFreeDevice() 42 HdfDeviceFreeInstance(device); in DevHostServiceFreeDevice() 48 struct HdfDevice *device = DevHostServiceFindDevice(inst, deviceId); in DevHostServiceQueryOrAddDevice() local 49 if (device in DevHostServiceQueryOrAddDevice() 66 struct HdfDevice *device = NULL; DevHostServiceAddDevice() local 123 struct HdfDevice *device = NULL; DevHostServiceDelDevice() local 167 ApplyDevicesPowerState(struct HdfDevice *device, uint32_t state) ApplyDevicesPowerState() argument 201 struct HdfDevice *device = NULL; DevHostServicePmNotify() local 243 struct HdfDevice *device = NULL; DevHostServiceDestruct() local [all...] |
/drivers/hdf_core/framework/support/platform/src/clock/ |
H A D | clock_core.c | 22 struct HdfDeviceObject *device; member 29 static int32_t ClockDeviceLockDefault(struct ClockDevice *device) in ClockDeviceLockDefault() argument 31 if (device == NULL) { in ClockDeviceLockDefault() 32 HDF_LOGE("ClockDeviceLockDefault: device is null!"); in ClockDeviceLockDefault() 35 return OsalSpinLock(&device->spin); in ClockDeviceLockDefault() 38 static void ClockDeviceUnlockDefault(struct ClockDevice *device) in ClockDeviceUnlockDefault() argument 40 if (device == NULL) { in ClockDeviceUnlockDefault() 41 HDF_LOGE("ClockDeviceUnlockDefault: device is null!"); in ClockDeviceUnlockDefault() 44 (void)OsalSpinUnlock(&device->spin); in ClockDeviceUnlockDefault() 52 static inline int32_t ClockDeviceLock(struct ClockDevice *device) in ClockDeviceLock() argument 61 ClockDeviceUnlock(struct ClockDevice *device) ClockDeviceUnlock() argument 68 ClockManagerAddDevice(struct ClockDevice *device) ClockManagerAddDevice() argument 101 ClockManagerRemoveDevice(struct ClockDevice *device) ClockManagerRemoveDevice() argument 129 ClockDeviceRemove(struct ClockDevice *device) ClockDeviceRemove() argument 141 struct ClockDevice *device = NULL; ClockManagerFindDevice() local 165 ClockDeviceAdd(struct ClockDevice *device) ClockDeviceAdd() argument 228 ClockDeviceStart(struct ClockDevice *device) ClockDeviceStart() argument 253 ClockDeviceStop(struct ClockDevice *device) ClockDeviceStop() argument 281 struct ClockDevice *device = NULL; ClockDeviceOpen() local 298 ClockDeviceClose(struct ClockDevice *device) ClockDeviceClose() argument 315 ClockDeviceSetRate(struct ClockDevice *device, uint32_t rate) ClockDeviceSetRate() argument 340 ClockDeviceGetRate(struct ClockDevice *device, uint32_t *rate) ClockDeviceGetRate() argument 363 ClockDeviceGetParent(struct ClockDevice *device) ClockDeviceGetParent() argument 388 ClockDeviceSetParent(struct ClockDevice *device, struct ClockDevice *parent) ClockDeviceSetParent() argument 419 ClockDeviceDisable(struct ClockDevice *device) ClockDeviceDisable() argument 444 ClockDeviceEnable(struct ClockDevice *device) ClockDeviceEnable() argument 506 struct ClockDevice *device = NULL; ClockManagerClose() local 538 struct ClockDevice *device = NULL; ClockManagerEnable() local 569 struct ClockDevice *device = NULL; ClockManagerDisable() local 600 struct ClockDevice *device = NULL; ClockManagerSetRate() local 637 struct ClockDevice *device = NULL; ClockManagerGetRate() local 673 struct ClockDevice *device = NULL; ClockManagerGetParent() local 716 struct ClockDevice *device = NULL; ClockManagerSetParent() local 803 ClockManagerBind(struct HdfDeviceObject *device) ClockManagerBind() argument 809 ClockManagerInit(struct HdfDeviceObject *device) ClockManagerInit() argument 839 ClockManagerRelease(struct HdfDeviceObject *device) ClockManagerRelease() argument [all...] |
H A D | clock_if.c | 19 HDF_LOGE("ClockOpen: get device %u fail!", number); in ClockOpen() 29 struct ClockDevice *device = NULL; in ClockClose() local 37 device = ClockDeviceGet(number); in ClockClose() 38 if (device == NULL) { in ClockClose() 39 HDF_LOGE("ClockClose: get clock device fail!"); in ClockClose() 43 ret = ClockDeviceClose(device); in ClockClose() 51 struct ClockDevice *device = NULL; in ClockEnable() local 59 device = ClockDeviceGet(number); in ClockEnable() 60 if (device == NULL) { in ClockEnable() 61 HDF_LOGE("ClockEnable: get clock device fai in ClockEnable() 73 struct ClockDevice *device = NULL; ClockDisable() local 94 struct ClockDevice *device = NULL; ClockSetRate() local 115 struct ClockDevice *device = NULL; ClockGetRate() local 136 struct ClockDevice *device = NULL; ClockGetParent() local 164 struct ClockDevice *device = NULL; ClockSetParent() local [all...] |
/drivers/hdf_core/framework/support/platform/src/dac/ |
H A D | dac_core.c | 25 struct HdfDeviceObject *device; member 32 static int32_t DacDeviceLockDefault(struct DacDevice *device) in DacDeviceLockDefault() argument 34 if (device == NULL) { in DacDeviceLockDefault() 35 HDF_LOGE("DacDeviceLockDefault: device is null!"); in DacDeviceLockDefault() 38 return OsalSpinLock(&device->spin); in DacDeviceLockDefault() 41 static void DacDeviceUnlockDefault(struct DacDevice *device) in DacDeviceUnlockDefault() argument 43 if (device == NULL) { in DacDeviceUnlockDefault() 44 HDF_LOGE("DacDeviceUnlockDefault: device is null!"); in DacDeviceUnlockDefault() 47 (void)OsalSpinUnlock(&device->spin); in DacDeviceUnlockDefault() 55 static inline int32_t DacDeviceLock(struct DacDevice *device) in DacDeviceLock() argument 68 DacDeviceUnlock(struct DacDevice *device) DacDeviceUnlock() argument 79 DacManagerAddDevice(struct DacDevice *device) DacManagerAddDevice() argument 115 DacManagerRemoveDevice(const struct DacDevice *device) DacManagerRemoveDevice() argument 149 struct DacDevice *device = NULL; DacManagerFindDevice() local 173 DacDeviceAdd(struct DacDevice *device) DacDeviceAdd() argument 205 DacDeviceRemove(struct DacDevice *device) DacDeviceRemove() argument 220 DacDevicePut(const struct DacDevice *device) DacDevicePut() argument 228 struct DacDevice *device = NULL; DacDeviceOpen() local 245 DacDeviceClose(struct DacDevice *device) DacDeviceClose() argument 256 DacDeviceWrite(struct DacDevice *device, uint32_t channel, uint32_t val) DacDeviceWrite() argument 280 DacDeviceStart(struct DacDevice *device) DacDeviceStart() argument 312 DacDeviceStop(struct DacDevice *device) DacDeviceStop() argument 462 DacManagerBind(struct HdfDeviceObject *device) DacManagerBind() argument 467 DacManagerInit(struct HdfDeviceObject *device) DacManagerInit() argument 497 DacManagerRelease(struct HdfDeviceObject *device) DacManagerRelease() argument [all...] |
/drivers/hdf_core/framework/support/platform/src/adc/ |
H A D | adc_core.c | 26 struct HdfDeviceObject *device; member 33 static int32_t AdcDeviceLockDefault(struct AdcDevice *device) in AdcDeviceLockDefault() argument 35 if (device == NULL) { in AdcDeviceLockDefault() 36 HDF_LOGE("AdcDeviceLockDefault: device is null!"); in AdcDeviceLockDefault() 39 return OsalSpinLock(&device->spin); in AdcDeviceLockDefault() 42 static void AdcDeviceUnlockDefault(struct AdcDevice *device) in AdcDeviceUnlockDefault() argument 44 if (device == NULL) { in AdcDeviceUnlockDefault() 45 HDF_LOGE("AdcDeviceUnlockDefault: device is null!"); in AdcDeviceUnlockDefault() 48 (void)OsalSpinUnlock(&device->spin); in AdcDeviceUnlockDefault() 56 static inline int32_t AdcDeviceLock(struct AdcDevice *device) in AdcDeviceLock() argument 65 AdcDeviceUnlock(struct AdcDevice *device) AdcDeviceUnlock() argument 72 AdcDeviceStart(struct AdcDevice *device) AdcDeviceStart() argument 104 AdcDeviceStop(struct AdcDevice *device) AdcDeviceStop() argument 137 AdcManagerAddDevice(struct AdcDevice *device) AdcManagerAddDevice() argument 169 AdcManagerRemoveDevice(struct AdcDevice *device) AdcManagerRemoveDevice() argument 199 struct AdcDevice *device = NULL; AdcManagerFindDevice() local 228 AdcDevicePut(struct AdcDevice *device) AdcDevicePut() argument 236 struct AdcDevice *device = NULL; AdcDeviceOpen() local 253 AdcDeviceClose(struct AdcDevice *device) AdcDeviceClose() argument 264 AdcDeviceAdd(struct AdcDevice *device) AdcDeviceAdd() argument 296 AdcDeviceRemove(struct AdcDevice *device) AdcDeviceRemove() argument 306 AdcDeviceRead(struct AdcDevice *device, uint32_t channel, uint32_t *val) AdcDeviceRead() argument 448 AdcManagerBind(struct HdfDeviceObject *device) AdcManagerBind() argument 454 AdcManagerInit(struct HdfDeviceObject *device) AdcManagerInit() argument 485 AdcManagerRelease(struct HdfDeviceObject *device) AdcManagerRelease() argument [all...] |
/drivers/hdf_core/framework/include/bluetooth/ |
H A D | hdf_chip.h | 20 * @brief Powers on the device using a specified power manage interface. 23 * @return Returns <b>0</b> if the device is powered on; returns a negative value otherwise. 31 * @brief Powers off the device using a specified power manage interface. 34 * @return Returns <b>0</b> if the device is powered off; returns a negative value otherwise. 52 * @brief Provides functions for powering on and off the device, releasing power, and creating a power manage interface. 118 void ReleaseVirtualDevice(struct HdfVirtualDevice *device); 120 inline static int32_t HdfPowerOnVirtualDevice(struct HdfVirtualDevice *device) in HdfPowerOnVirtualDevice() argument 122 if (device == NULL) { in HdfPowerOnVirtualDevice() 125 if (device->power == NULL || device in HdfPowerOnVirtualDevice() 130 HdfPowerOffVirtualDevice(struct HdfVirtualDevice *device) HdfPowerOffVirtualDevice() argument 140 HdfResetVirtualDevice(struct HdfVirtualDevice *device) HdfResetVirtualDevice() argument [all...] |
/drivers/hdf_core/framework/test/unittest/platform/virtual/ |
H A D | clock_virtual.c | 19 int32_t VirtualClockStart(struct ClockDevice *device) in VirtualClockStart() argument 21 if (device->clk != NULL) { in VirtualClockStart() 22 HDF_LOGI("device->clk already start\n"); in VirtualClockStart() 26 device->clk = (void *)&device->deviceIndex; in VirtualClockStart() 30 int32_t VirtualClockSetRate(struct ClockDevice *device, uint32_t rate) in VirtualClockSetRate() argument 32 if (device->clk == NULL) { in VirtualClockSetRate() 40 int32_t VirtualClockStop(struct ClockDevice *device) in VirtualClockStop() argument 42 if (device->clk == NULL) { in VirtualClockStop() 47 device in VirtualClockStop() 51 VirtualClockGetRate(struct ClockDevice *device, uint32_t *rate) VirtualClockGetRate() argument 61 VirtualClockDisable(struct ClockDevice *device) VirtualClockDisable() argument 71 VirtualClockEnable(struct ClockDevice *device) VirtualClockEnable() argument 83 VirtualClockSetParent(struct ClockDevice *device, struct ClockDevice *parent) VirtualClockSetParent() argument 120 VirtualClockGetParent(struct ClockDevice *device) VirtualClockGetParent() argument 163 struct ClockDevice device; global() member 188 VirtualClockInit(struct HdfDeviceObject *device) VirtualClockInit() argument 225 VirtualClockRelease(struct HdfDeviceObject *device) VirtualClockRelease() argument [all...] |
H A D | dac_virtual.c | 22 struct DacDevice device; member 28 static int32_t VirtualDacWrite(struct DacDevice *device, uint32_t channel, uint32_t val) in VirtualDacWrite() argument 30 (void)device; in VirtualDacWrite() 38 static inline int32_t VirtualDacStart(struct DacDevice *device) in VirtualDacStart() argument 40 (void)device; in VirtualDacStart() 45 static inline int32_t VirtualDacStop(struct DacDevice *device) in VirtualDacStop() argument 47 (void)device; in VirtualDacStop() 54 HDF_LOGI("VirtualDacDeviceInit: device:%u init done!", virtual->deviceNum); in VirtualDacDeviceInit() 87 static int32_t VirtualDacParseAndInit(struct HdfDeviceObject *device, const struct DeviceResourceNode *node) in VirtualDacParseAndInit() argument 91 (void)device; in VirtualDacParseAndInit() 122 VirtualDacInit(struct HdfDeviceObject *device) VirtualDacInit() argument 146 struct DacDevice *device = NULL; VirtualDacRemoveByNode() local 172 VirtualDacRelease(struct HdfDeviceObject *device) VirtualDacRelease() argument [all...] |
/drivers/hdf_core/adapter/khdf/uniproton/test/sample_driver/src/ |
H A D | platform_device_test.c | 45 static int32_t PlatformDeviceTestSetName(struct PlatformDevice *device) in PlatformDeviceTestSetName() argument 51 ret = PlatformDeviceSetName(device, "platform_device_name_%d", 1); in PlatformDeviceTestSetName() 53 ret = strcmp(device->name, "platform_device_name_1"); in PlatformDeviceTestSetName() 57 PlatformDeviceClearName(device); in PlatformDeviceTestSetName() 58 CHECK_EQ_RETURN(device->name, NULL, HDF_FAILURE); in PlatformDeviceTestSetName() 61 ret = PlatformDeviceSetName(device, "platform_device_name"); in PlatformDeviceTestSetName() 63 ret = strcmp(device->name, "platform_device_name"); in PlatformDeviceTestSetName() 67 PlatformDeviceClearName(device); in PlatformDeviceTestSetName() 73 static int32_t PlatformDeviceTestGetDevice(struct PlatformDevice *device) in PlatformDeviceTestGetDevice() argument 81 device in PlatformDeviceTestGetDevice() 112 PlatformDeviceTestAddDevice(struct PlatformDevice *device) PlatformDeviceTestAddDevice() argument 153 PlatformDeviceTestCreateService(struct PlatformDevice *device) PlatformDeviceTestCreateService() argument 172 PlatformDeviceTestBindDeviceBefore(struct PlatformDevice *device) PlatformDeviceTestBindDeviceBefore() argument 186 PlatformDeviceTestBindDeviceAfter(struct PlatformDevice *device) PlatformDeviceTestBindDeviceAfter() argument 195 PlatformDeviceTestBindDevice(struct PlatformDevice *device) PlatformDeviceTestBindDevice() argument 219 PlatformDeviceTestReliability(struct PlatformDevice *device) PlatformDeviceTestReliability() argument 293 struct PlatformDevice device = {0}; PlatformDeviceTestExecute() local [all...] |
/drivers/hdf_core/framework/test/unittest/platform/common/ |
H A D | platform_device_test.c | 25 static int32_t PlatformDeviceTestSetName(struct PlatformDevice *device) in PlatformDeviceTestSetName() argument 31 ret = PlatformDeviceSetName(device, "platform_device_name_%d", 1); in PlatformDeviceTestSetName() 33 ret = strcmp(device->name, "platform_device_name_1"); in PlatformDeviceTestSetName() 37 PlatformDeviceClearName(device); in PlatformDeviceTestSetName() 38 CHECK_EQ_RETURN(device->name, NULL, HDF_FAILURE); in PlatformDeviceTestSetName() 41 ret = PlatformDeviceSetName(device, "platform_device_name"); in PlatformDeviceTestSetName() 43 ret = strcmp(device->name, "platform_device_name"); in PlatformDeviceTestSetName() 47 PlatformDeviceClearName(device); in PlatformDeviceTestSetName() 53 static int32_t PlatformDeviceTestGetDevice(struct PlatformDevice *device) in PlatformDeviceTestGetDevice() argument 61 device in PlatformDeviceTestGetDevice() 92 PlatformDeviceTestWaitEvent(struct PlatformDevice *device) PlatformDeviceTestWaitEvent() argument 120 PlatformDeviceTestAddDevice(struct PlatformDevice *device) PlatformDeviceTestAddDevice() argument 161 PlatformDeviceTestCreateService(struct PlatformDevice *device) PlatformDeviceTestCreateService() argument 180 PlatformDeviceTestBindDevice(struct PlatformDevice *device) PlatformDeviceTestBindDevice() argument 206 PlatformDeviceTestReliability(struct PlatformDevice *device) PlatformDeviceTestReliability() argument 282 struct PlatformDevice device = {0}; PlatformDeviceTestExecute() local [all...] |
/drivers/hdf_core/adapter/khdf/linux/platform/clock/ |
H A D | clock_adapter.c | 31 static int32_t ClockStart(struct ClockDevice *device) in ClockStart() argument 36 if (device->clk != NULL) { in ClockStart() 37 HDF_LOGI("device->clk already start\n"); in ClockStart() 41 if (IS_ERR_OR_NULL(device->deviceName)) { in ClockStart() 46 node = of_find_node_by_path(device->deviceName); in ClockStart() 52 clk = of_clk_get_by_name(node, device->clockName); in ClockStart() 58 device->clk = clk; in ClockStart() 62 static int32_t ClockLinuxSetRate(struct ClockDevice *device, uint32_t rate) in ClockLinuxSetRate() argument 67 clk = device->clk; in ClockLinuxSetRate() 76 static int32_t ClockStop(struct ClockDevice *device) in ClockStop() argument 94 ClockLinuxGetRate(struct ClockDevice *device, uint32_t *rate) ClockLinuxGetRate() argument 108 ClockLinuxDisable(struct ClockDevice *device) ClockLinuxDisable() argument 121 ClockLinuxEnable(struct ClockDevice *device) ClockLinuxEnable() argument 142 ClockLinuxSetParent(struct ClockDevice *device, struct ClockDevice *parent) ClockLinuxSetParent() argument 190 ClockLinuxGetParent(struct ClockDevice *device) ClockLinuxGetParent() argument 268 ClockParseAndDeviceAdd(struct HdfDeviceObject *device, struct DeviceResourceNode *node) ClockParseAndDeviceAdd() argument 299 LinuxClockInit(struct HdfDeviceObject *device) LinuxClockInit() argument 325 struct ClockDevice *device = NULL; ClockRemoveByNode() local 355 LinuxClockRelease(struct HdfDeviceObject *device) LinuxClockRelease() argument [all...] |
/drivers/hdf_core/framework/support/platform/include/fwk/ |
H A D | platform_device.h | 30 struct HdfDeviceObject *hdfDev; /* related to a hdf device object */ 33 int32_t number; /* number of the device instance */ 34 const char *name; /* name of the device instance */ 37 struct PlatformEvent event; /* platform event obj of this device */ 41 void *priv; /* private data of the device */ 45 * @brief Initialize a platform device. 47 * Initialize members of a platform device. 49 * @param device Indicates the pointer to the platform device. 53 int32_t PlatformDeviceInit(struct PlatformDevice *device); [all...] |
/drivers/hdf_core/framework/support/platform/include/clock/ |
H A D | clock_core.h | 43 int32_t (*start)(struct ClockDevice *device); 44 int32_t (*stop)(struct ClockDevice *device); 45 int32_t (*setRate)(struct ClockDevice *device, uint32_t rate); 46 int32_t (*getRate)(struct ClockDevice *device, uint32_t *rate); 47 int32_t (*disable)(struct ClockDevice *device); 48 int32_t (*enable)(struct ClockDevice *device); 49 struct ClockDevice *(*getParent)(struct ClockDevice *device); 50 int32_t (*setParent)(struct ClockDevice *device, struct ClockDevice *parent); 54 int32_t (*lock)(struct ClockDevice *device); 55 void (*unlock)(struct ClockDevice *device); [all...] |
/drivers/peripheral/camera/vdi_base/common/adapter/platform/hdf_driver/src/driver_adapter/src/ |
H A D | camera_control.cpp | 206 RetCode CameraControl::CameraEnumDevices(struct CameraFeature feature, struct DeviceaInfo &device) in CameraEnumDevices() argument 225 ret = ReadDeviceSbufData(feature.type, respData, device); in CameraEnumDevices() 286 int CameraControl::ReadSensorSbufData(struct HdfSBuf *respData, struct DeviceaInfo &device) in ReadSensorSbufData() argument 290 isFailed |= !HdfSbufReadUint8(respData, &device.sensor.mode); in ReadSensorSbufData() 291 isFailed |= strncpy_s(device.sensor.driverName, DRIVER_NAME_NUM, HdfSbufReadString(respData), DRIVER_NAME_NUM); in ReadSensorSbufData() 292 isFailed |= !HdfSbufReadUint8(respData, &device.sensor.id); in ReadSensorSbufData() 293 isFailed |= !HdfSbufReadUint8(respData, &device.sensor.exposure); in ReadSensorSbufData() 294 isFailed |= !HdfSbufReadUint8(respData, &device.sensor.mirror); in ReadSensorSbufData() 295 isFailed |= !HdfSbufReadUint8(respData, &device.sensor.gain); in ReadSensorSbufData() 300 device in ReadSensorSbufData() 310 ReadIspSbufData(struct HdfSBuf *respData, struct DeviceaInfo &device) ReadIspSbufData() argument 334 ReadVcmSbufData(struct HdfSBuf *respData, struct DeviceaInfo &device) ReadVcmSbufData() argument 354 ReadLensSbufData(struct HdfSBuf *respData, struct DeviceaInfo &device) ReadLensSbufData() argument 371 ReadFlashSbufData(struct HdfSBuf *respData, struct DeviceaInfo &device) ReadFlashSbufData() argument 389 ReadStreamSbufData(struct HdfSBuf *respData, struct DeviceaInfo &device) ReadStreamSbufData() argument 414 ReadDeviceSbufData(int type, struct HdfSBuf *respData, struct DeviceaInfo &device) ReadDeviceSbufData() argument [all...] |
/drivers/hdf_core/framework/model/audio/hdmi/src/ |
H A D | audio_hdmi_codec_adapter.c | 37 static int32_t AudioHdmiCodecDriverBind(struct HdfDeviceObject *device) in AudioHdmiCodecDriverBind() argument 42 if (device == NULL) { in AudioHdmiCodecDriverBind() 52 codecHost->device = device; in AudioHdmiCodecDriverBind() 53 device->service = &codecHost->service; in AudioHdmiCodecDriverBind() 59 static int32_t AudioHdmiCodecDriverInit(struct HdfDeviceObject *device) in AudioHdmiCodecDriverInit() argument 64 if (device == NULL) { in AudioHdmiCodecDriverInit() 65 AUDIO_DRIVER_LOG_ERR("device is NULL."); in AudioHdmiCodecDriverInit() 69 ret = CodecGetConfigInfo(device, &g_audioHdmiCodecData); in AudioHdmiCodecDriverInit() 75 if (CodecDaiGetPortConfigInfo(device, in AudioHdmiCodecDriverInit() 106 AudioHdmiCodecDriverRelease(struct HdfDeviceObject *device) AudioHdmiCodecDriverRelease() argument [all...] |
/drivers/hdf_core/adapter/platform/pwm/ |
H A D | pwm_wm.c | 65 struct PwmDevice *device, const struct DeviceResourceNode *resourceNode)
in GetPwmDeviceResource() 69 if (device == NULL || resourceNode == NULL) {
in GetPwmDeviceResource() 70 HDF_LOGE("resource or device is NULL\r\n");
in GetPwmDeviceResource() 74 resource = &device->resource;
in GetPwmDeviceResource() 99 static int32_t AttachPwmDevice(struct PwmDev *host, const struct HdfDeviceObject *device)
in AttachPwmDevice() argument 103 if (device == NULL || device->property == NULL || host == NULL) {
in AttachPwmDevice() 114 ret = GetPwmDeviceResource(pwmDevice, device->property);
in AttachPwmDevice() 125 static int32_t PwmDriverBind(struct HdfDeviceObject *device)
in PwmDriverBind() argument 129 if (device in PwmDriverBind() 64 GetPwmDeviceResource( struct PwmDevice *device, const struct DeviceResourceNode *resourceNode) GetPwmDeviceResource() argument 141 PwmDriverInit(struct HdfDeviceObject *device) PwmDriverInit() argument 179 PwmDriverRelease(struct HdfDeviceObject *device) PwmDriverRelease() argument [all...] |
/drivers/hdf_core/framework/support/platform/include/adc/ |
H A D | adc_core.h | 39 int32_t (*read)(struct AdcDevice *device, uint32_t channel, uint32_t *val); 40 int32_t (*start)(struct AdcDevice *device); 41 int32_t (*stop)(struct AdcDevice *device); 45 int32_t (*lock)(struct AdcDevice *device); 46 void (*unlock)(struct AdcDevice *device); 49 int32_t AdcDeviceAdd(struct AdcDevice *device); 51 void AdcDeviceRemove(struct AdcDevice *device); 55 void AdcDevicePut(struct AdcDevice *device); 57 int32_t AdcDeviceRead(struct AdcDevice *device, uint32_t channel, uint32_t *val); 59 int32_t AdcDeviceStart(struct AdcDevice *device); [all...] |
/drivers/hdf_core/framework/support/platform/include/dac/ |
H A D | dac_core.h | 39 int32_t (*write)(struct DacDevice *device, uint32_t channel, uint32_t val); 40 int32_t (*start)(struct DacDevice *device); 41 int32_t (*stop)(struct DacDevice *device); 45 int32_t (*lock)(struct DacDevice *device); 46 void (*unlock)(struct DacDevice *device); 49 int32_t DacDeviceAdd(struct DacDevice *device); 51 void DacDeviceRemove(struct DacDevice *device); 55 void DacDevicePut(const struct DacDevice *device); 57 int32_t DacDeviceWrite(struct DacDevice *device, uint32_t channel, uint32_t val); 59 int32_t DacDeviceStart(struct DacDevice *device); [all...] |
/drivers/hdf_core/framework/model/network/wifi/core/ |
H A D | hdf_wifi_core.c | 124 static int32_t HdfWlanGetConfig(const struct HdfDeviceObject *device) in HdfWlanGetConfig() argument 126 if (device == NULL) { in HdfWlanGetConfig() 130 if (HdfParseWlanConfig(device->property) != HDF_SUCCESS) { in HdfWlanGetConfig() 182 static int32_t HdfWlanDeinitInterface(struct HdfWlanDevice *device, const char *ifName, in HdfWlanDeinitInterface() argument 223 static int32_t HdfWlanInitInterface(struct HdfWlanDevice *device, struct HdfChipDriverFactory *factory, uint8_t index) in HdfWlanInitInterface() argument 231 chipDriver = factory->Build(device, index); in HdfWlanInitInterface() 244 netDev = AllocPlatformNetDevice(device); in HdfWlanInitInterface() 246 HDF_LOGE("%s:allocate net device failed!", __func__); in HdfWlanInitInterface() 256 data->device = device; in HdfWlanInitInterface() 279 HdfWlanDeinitInterfaces(struct HdfWlanDevice *device, struct HdfChipDriverFactory *chipDriverFact) HdfWlanDeinitInterfaces() argument 307 HdfWlanInitInterfaces(struct HdfWlanDevice *device, struct HdfChipDriverFactory *chipDriverFact) HdfWlanInitInterfaces() argument 322 ReleaseWlanDevice(struct HdfWlanDevice *device) ReleaseWlanDevice() argument 345 struct HdfWlanDevice *device = NULL; ProbeDevice() local 384 HdfWifiDeinitDevice(struct HdfWlanDevice *device) HdfWifiDeinitDevice() argument 409 HdfWifiInitDevice(struct HdfWlanDevice *device) HdfWifiInitDevice() argument 440 struct HdfDeviceObject *device = (struct HdfDeviceObject *)para; HdfWlanInitThread() local 488 HdfWlanScanAndInitThread(struct HdfDeviceObject *device) HdfWlanScanAndInitThread() argument 513 HdfWlanMainInit(struct HdfDeviceObject *device) HdfWlanMainInit() argument [all...] |
/drivers/hdf_core/adapter/platform/i2c/ |
H A D | i2c_wm.c | 31 uint16_t devAddr; /**< device addr */ 39 static int32_t i2cDriverBind(struct HdfDeviceObject *device); 40 static int32_t i2cDriverInit(struct HdfDeviceObject *device); 41 static void i2cDriverRelease(struct HdfDeviceObject *device); 62 static int32_t InitI2cDevice(struct I2cDevice *device) in InitI2cDevice() argument 67 if (device == NULL) { in InitI2cDevice() 68 HDF_LOGE("device is NULL\r\n"); in InitI2cDevice() 72 resource = &device->resource; in InitI2cDevice() 73 device->port = resource->port; in InitI2cDevice() 74 i2cPort = device in InitI2cDevice() 104 HostRestI2cDevice(struct I2cDevice *device) HostRestI2cDevice() argument 128 GetI2cDeviceResource(struct I2cDevice *device, const struct DeviceResourceNode *resourceNode) GetI2cDeviceResource() argument 174 AttachI2cDevice(struct I2cCntlr *host, const struct HdfDeviceObject *device) AttachI2cDevice() argument 207 i2cDriverInit(struct HdfDeviceObject *device) i2cDriverInit() argument 238 i2cDriverBind(struct HdfDeviceObject *device) i2cDriverBind() argument 247 i2cDriverRelease(struct HdfDeviceObject *device) i2cDriverRelease() argument 302 i2c_transfer(struct I2cDevice *device, struct I2cMsg *msgs, int16_t count) i2c_transfer() argument 330 struct I2cDevice *device = NULL; i2cHostTransfer() local [all...] |
/drivers/hdf_core/framework/sample/platform/uart/src/ |
H A D | uart_sample.c | 27 static int32_t SampleUartDriverBind(struct HdfDeviceObject *device); 28 static int32_t SampleUartDriverInit(struct HdfDeviceObject *device); 29 static void SampleUartDriverRelease(struct HdfDeviceObject *device); 88 struct UartDevice *device = NULL; in SampleUartHostWrite() local 95 device = (struct UartDevice *)host->priv; in SampleUartHostWrite() 96 if (device == NULL) { in SampleUartHostWrite() 97 HDF_LOGW("%s: device is NULL", __func__); in SampleUartHostWrite() 100 regMap = (struct UartRegisterMap *)device->resource.physBase; in SampleUartHostWrite() 109 struct UartDevice *device = NULL; in SampleUartHostSetBaud() local 118 device in SampleUartHostSetBaud() 139 struct UartDevice *device = NULL; SampleUartHostGetBaud() local 155 InitUartDevice(struct UartDevice *device) InitUartDevice() argument 183 GetUartDeviceResource(struct UartDevice *device, const struct DeviceResourceNode *resourceNode) GetUartDeviceResource() argument 233 AttachUartDevice(struct UartHost *host, struct HdfDeviceObject *device) AttachUartDevice() argument 257 DeinitUartDevice(struct UartDevice *device) DeinitUartDevice() argument 283 SampleUartDriverBind(struct HdfDeviceObject *device) SampleUartDriverBind() argument 301 SampleUartDriverInit(struct HdfDeviceObject *device) SampleUartDriverInit() argument 325 SampleUartDriverRelease(struct HdfDeviceObject *device) SampleUartDriverRelease() argument [all...] |
/drivers/hdf_core/framework/model/input/driver/touchscreen/ |
H A D | touch_ft5x06.c | 27 static int32_t ChipInit(ChipDevice *device) in ChipInit() argument 32 static int32_t ChipResume(ChipDevice *device) in ChipResume() argument 37 static int32_t ChipSuspend(ChipDevice *device) in ChipSuspend() argument 42 static int Ft5x06_EP00(ChipDevice *device, u8 *rdbuf) in Ft5x06_EP00() argument 46 device->chipCfg->chipVersion = EDT_M06; in Ft5x06_EP00() 63 static int Ft5x06_EP01(ChipDevice *device, u8 *rdbuf) in Ft5x06_EP01() argument 67 device->chipCfg->chipVersion = EDT_M12; in Ft5x06_EP01() 86 static int Ft5x06_Identify(ChipDevice *device, const InputI2cClient *i2cClient) in Ft5x06_Identify() argument 100 Ft5x06_EP00(device, rdbuf); in Ft5x06_Identify() 102 Ft5x06_EP01(device, rdbu in Ft5x06_Identify() 141 ChipDetect(ChipDevice *device) ChipDetect() argument 165 SetAbility(ChipDevice *device) SetAbility() argument 210 ParsePointData(ChipDevice *device, FrameData *frame, uint8_t *buf, uint8_t pointNum, int32_t version) ParsePointData() argument 264 ChipDataHandle(ChipDevice *device) ChipDataHandle() argument 350 ChipConfigInstance(struct HdfDeviceObject *device) ChipConfigInstance() argument 378 EdtFocalChipInit(struct HdfDeviceObject *device) EdtFocalChipInit() argument [all...] |