/drivers/hdf_core/adapter/khdf/liteos/osal/src/ |
H A D | osal_cdev.c | 48 static int OsalCdevOpen(struct file *filep) in OsalCdevOpen() argument 50 struct drv_data *drvData = (struct drv_data *)filep->f_vnode->data; in OsalCdevOpen() 52 return dev->opsImpl->open(dev, filep); in OsalCdevOpen() 55 static int OsalCdevRelease(struct file *filep) in OsalCdevRelease() argument 57 if (filep == NULL || filep->f_vnode == NULL) { in OsalCdevRelease() 60 struct drv_data *drvData = (struct drv_data *)filep->f_vnode->data; in OsalCdevRelease() 62 return dev->opsImpl->release(dev, filep); in OsalCdevRelease() 65 static ssize_t OsalCdevRead(struct file *filep, char *buffer, size_t buflen) in OsalCdevRead() argument 67 if (filep in OsalCdevRead() 75 OsalCdevWrite(struct file *filep, const char *buffer, size_t buflen) OsalCdevWrite() argument 85 OsalCdevSeek(struct file *filep, off_t offset, int whence) OsalCdevSeek() argument 95 OsalCdevIoctl(struct file *filep, int cmd, unsigned long arg) OsalCdevIoctl() argument 105 OsalCdevPoll(struct file *filep, poll_table *fds) OsalCdevPoll() argument 176 OsalSetFilePriv(struct file *filep, void *priv) OsalSetFilePriv() argument 183 OsalGetFilePriv(struct file *filep) OsalGetFilePriv() argument [all...] |
/drivers/hdf_core/framework/include/osal/ |
H A D | osal_cdev.h | 26 int64_t (*seek)(struct file *filep, int64_t offset, int whence); 27 ssize_t (*read)(struct file *filep, char __user *buffer, size_t buflen, int64_t *offset); 28 ssize_t (*write)(struct file *filep, const char __user *buffer, size_t buflen, int64_t *offset); 29 unsigned int (*poll)(struct file *filep, poll_table *pollTable); 30 long (*ioctl)(struct file *filep, unsigned int cmd, unsigned long arg); 31 int (*open)(struct OsalCdev *cdev, struct file *filep); 32 int (*release)(struct OsalCdev *cdev, struct file *filep); 42 void OsalSetFilePriv(struct file *filep, void *priv); 43 void *OsalGetFilePriv(struct file *filep);
|
/drivers/hdf_core/framework/sample/platform/uart/src/ |
H A D | uart_dev_sample.c | 20 static int32_t UartSampleDevOpen(struct file *filep) in UartSampleDevOpen() argument 24 if (filep == NULL || filep->f_vnode == NULL) { in UartSampleDevOpen() 27 struct drv_data *drv = (struct drv_data *)filep->f_vnode->data; in UartSampleDevOpen() 37 static int32_t UartSampleRelease(struct file *filep) in UartSampleRelease() argument 41 if (filep == NULL || filep->f_vnode == NULL) { in UartSampleRelease() 44 struct drv_data *drv = (struct drv_data *)filep->f_vnode->data; in UartSampleRelease() 54 static ssize_t UartSampleRead(struct file *filep, char *buf, size_t count) in UartSampleRead() argument 59 if (filep in UartSampleRead() 82 UartSampleWrite(struct file *filep, const char *buf, size_t count) UartSampleWrite() argument 112 UartSampleDevIoctl(struct file *filep, int32_t cmd, unsigned long arg) UartSampleDevIoctl() argument [all...] |
/drivers/hdf_core/adapter/khdf/liteos/platform/src/ |
H A D | uart_dev.c | 42 static int32_t UartDevOpen(struct file *filep) in UartDevOpen() argument 46 if (filep == NULL || filep->f_vnode == NULL) { in UartDevOpen() 47 HDF_LOGE("UartDevOpen: filep or f_vnode is null!"); in UartDevOpen() 50 struct drv_data *drv = (struct drv_data *)filep->f_vnode->data; in UartDevOpen() 55 static int32_t UartDevRelease(struct file *filep) in UartDevRelease() argument 59 if (filep == NULL || filep->f_vnode == NULL) { in UartDevRelease() 60 HDF_LOGE("UartDevRelease: filep or f_vnode is null!"); in UartDevRelease() 63 struct drv_data *drv = (struct drv_data *)filep in UartDevRelease() 69 UartDevRead(struct file *filep, char *buf, size_t count) UartDevRead() argument 100 UartDevWrite(struct file *filep, const char *buf, size_t count) UartDevWrite() argument 150 UartDevIoctl(struct file *filep, int32_t cmd, unsigned long arg) UartDevIoctl() argument 197 uartdev_poll(struct file *filep, poll_table *table) uartdev_poll() argument [all...] |
H A D | gpio_dev.c | 41 static int GpioOpen(struct file *filep) in GpioOpen() argument 43 (void)filep; in GpioOpen() 47 static int GpioClose(struct file *filep) in GpioClose() argument 49 (void)filep; in GpioClose() 99 static int GpioIoctl(struct file *filep, int cmd, unsigned long arg) in GpioIoctl() argument 112 if (filep == NULL || filep->f_vnode == NULL || filep->f_vnode->data == NULL) { in GpioIoctl() 117 drvData = (struct drv_data *)filep->f_vnode->data; in GpioIoctl()
|
H A D | i2c_dev.c | 178 static ssize_t I2cFsRead(struct file *filep, char *buf, size_t count) in I2cFsRead() argument 182 struct I2cClient *client = filep->f_priv; in I2cFsRead() 223 static ssize_t I2cFsWrite(struct file *filep, const char *buf, size_t count) in I2cFsWrite() argument 227 struct I2cClient *client = filep->f_priv; in I2cFsWrite() 296 static int I2cFsIoctl(struct file *filep, int cmd, unsigned long arg) in I2cFsIoctl() argument 299 struct I2cClient *client = filep->f_priv; in I2cFsIoctl() 346 static int I2cFsOpen(struct file *filep) in I2cFsOpen() argument 353 if (filep == NULL || filep->f_vnode == NULL || filep in I2cFsOpen() 378 I2cFsClose(struct file *filep) I2cFsClose() argument 399 I2cFsMap(struct file* filep, LosVmMapRegion *region) I2cFsMap() argument [all...] |
H A D | spi_dev.c | 42 static struct SpiDev *SpiDevGetDevFromFilep(struct file *filep) in SpiDevGetDevFromFilep() argument 44 if (filep == NULL) { in SpiDevGetDevFromFilep() 45 HDF_LOGE("SpiDevGetDevFromFilep: filep is invalid!"); in SpiDevGetDevFromFilep() 49 struct Vnode *vnode = filep->f_vnode; in SpiDevGetDevFromFilep() 59 static int32_t SpiDevOpen(struct file *filep) in SpiDevOpen() argument 63 dev = SpiDevGetDevFromFilep(filep); in SpiDevOpen() 72 static ssize_t SpiDevRead(struct file *filep, char *buf, size_t size) in SpiDevRead() argument 83 dev = SpiDevGetDevFromFilep(filep); in SpiDevRead() 109 static ssize_t SpiDevWrite(struct file *filep, const char *buf, size_t size) in SpiDevWrite() argument 120 dev = SpiDevGetDevFromFilep(filep); in SpiDevWrite() 350 SpiDevIoctl(struct file *filep, int32_t cmd, unsigned long arg) SpiDevIoctl() argument [all...] |
/drivers/hdf_core/adapter/khdf/linux/osal/src/ |
H A D | osal_cdev.c | 156 static loff_t OsalCdevSeek(struct file* filep, loff_t offset, int whence) in OsalCdevSeek() argument 158 struct OsalCdev* dev = container_of(filep->f_inode->i_cdev, struct OsalCdev, cdev); in OsalCdevSeek() 159 return dev->opsImpl->seek(filep, offset, whence); in OsalCdevSeek() 162 static ssize_t OsalCdevRead(struct file* filep, char __user* buf, size_t buflen, loff_t* offset) in OsalCdevRead() argument 164 struct OsalCdev* dev = container_of(filep->f_inode->i_cdev, struct OsalCdev, cdev); in OsalCdevRead() 165 return dev->opsImpl->read(filep, buf, buflen, offset); in OsalCdevRead() 168 static ssize_t OsalCdevWrite(struct file* filep, const char __user* buf, size_t buflen, loff_t* offset) in OsalCdevWrite() argument 170 struct OsalCdev* dev = container_of(filep->f_inode->i_cdev, struct OsalCdev, cdev); in OsalCdevWrite() 171 return dev->opsImpl->write(filep, buf, buflen, offset); in OsalCdevWrite() 174 static unsigned int OsalCdevPoll(struct file* filep, struc argument 180 OsalCdevIoctl(struct file* filep, unsigned int cmd, unsigned long arg) OsalCdevIoctl() argument 186 OsalCdevOpen(struct inode* inode, struct file* filep) OsalCdevOpen() argument 192 OsalCdevRelease(struct inode* inode, struct file* filep) OsalCdevRelease() argument 265 OsalSetFilePriv(struct file* filep, void* priv) OsalSetFilePriv() argument 271 OsalGetFilePriv(struct file* filep) OsalGetFilePriv() argument [all...] |
/drivers/hdf_core/adapter/khdf/liteos/model/storage/src/mtd/ |
H A D | mtd_char_lite.c | 55 static int MtdCharOpen(FAR struct file *filep) in MtdCharOpen() argument 59 if (filep == NULL || filep->f_vnode == NULL || filep->f_vnode->data == NULL) { in MtdCharOpen() 60 HDF_LOGE("MtdCharOpen: filep is NULL or f_vnode of filep is null or data of f_vnode is null!"); in MtdCharOpen() 63 drv = (struct drv_data *)filep->f_vnode->data; in MtdCharOpen() 87 filep->f_pos = 0; in MtdCharOpen() 88 filep->f_priv = (void *)mfi; in MtdCharOpen() 96 static int MtdCharClose(FAR struct file *filep) in MtdCharClose() argument 119 MtdCharRead(FAR struct file *filep, FAR char *buffer, size_t buflen) MtdCharRead() argument 179 MtdCharWrite(FAR struct file *filep, FAR const char *buffer, size_t buflen) MtdCharWrite() argument 239 MtdCharLseek(FAR struct file *filep, off_t offset, int whence) MtdCharLseek() argument 371 MtdCharIoctl(FAR struct file *filep, int cmd, unsigned long arg) MtdCharIoctl() argument 423 MtdCharMap(FAR struct file* filep, FAR LosVmMapRegion *region) MtdCharMap() argument [all...] |
/drivers/hdf_core/adapter/khdf/linux/platform/mipi_dsi/ |
H A D | mipi_tx_dev.c | 243 static uint8_t GetIdFromFilep(struct file *filep) in GetIdFromFilep() argument 246 if (filep == NULL) { in GetIdFromFilep() 247 HDF_LOGE("GetIdFromFilep: filep is invalid!"); in GetIdFromFilep() 251 if (filep->private_data == NULL) { in GetIdFromFilep() 256 id = (uint8_t)(filep->private_data); in GetIdFromFilep() 265 static struct MipiDsiCntlr *GetCntlrFromFilep(struct file *filep) in GetCntlrFromFilep() argument 268 if (filep == NULL) { in GetCntlrFromFilep() 269 HDF_LOGE("GetCntlrFromFilep: filep is invalid!"); in GetCntlrFromFilep() 277 static struct semaphore *GetSemaFromFilep(struct file *filep) in GetSemaFromFilep() argument 280 if (filep in GetSemaFromFilep() 289 GetCfgFromFilep(struct file *filep) GetCfgFromFilep() argument 494 MipiDsiDevIoctl(struct file *filep, unsigned int cmd, unsigned long arg) MipiDsiDevIoctl() argument 546 MipiDsiDevOpen(struct inode *inode, struct file *filep) MipiDsiDevOpen() argument 559 MipiDsiDevRelease(struct inode *inode, struct file *filep) MipiDsiDevRelease() argument [all...] |
/drivers/liteos/hievent/src/ |
H A D | hievent_driver.c | 88 int HieventOpen(struct file *filep) in HieventOpen() argument 90 (void)filep; in HieventOpen() 94 int HieventClose(struct file *filep) in HieventClose() argument 96 (void)filep; in HieventClose() 160 static ssize_t HieventRead(struct file *filep, char *buffer, size_t bufLen) in HieventRead() argument 165 (void)filep; in HieventRead() 323 static ssize_t HieventWrite(struct file *filep, in HieventWrite() argument 326 (void)filep; in HieventWrite() 330 static int HieventPoll(struct file *filep, poll_table *fds) in HieventPoll() argument 332 (void)filep; in HieventPoll() 339 HieventIoctl(struct file *filep, int cmd, unsigned long arg) HieventIoctl() argument [all...] |
/drivers/hdf_core/framework/support/platform/include/uart/ |
H A D | uart_core.h | 44 int32_t (*pollEvent)(struct UartHost *host, void *filep, void *table); 136 static inline int32_t UartHostPollEvent(struct UartHost *host, void *filep, void *table) in UartHostPollEvent() argument 141 return host->method->pollEvent(host, filep, table); in UartHostPollEvent()
|
/drivers/hdf_core/framework/core/adapter/vnode/src/ |
H A D | hdf_vnode_adapter.c | 565 static long HdfVNodeAdapterIoctl(struct file *filep, unsigned int cmd, unsigned long arg) in HdfVNodeAdapterIoctl() argument 567 struct HdfVNodeAdapterClient *client = (struct HdfVNodeAdapterClient *)OsalGetFilePriv(filep); in HdfVNodeAdapterIoctl() 648 int HdfVNodeAdapterOpen(struct OsalCdev *cdev, struct file *filep) in HdfVNodeAdapterOpen() argument 662 OsalSetFilePriv(filep, client); in HdfVNodeAdapterOpen() 675 static unsigned int HdfVNodeAdapterPoll(struct file *filep, poll_table *wait) in HdfVNodeAdapterPoll() argument 678 struct HdfVNodeAdapterClient *client = (struct HdfVNodeAdapterClient *)OsalGetFilePriv(filep); in HdfVNodeAdapterPoll() 683 poll_wait(filep, &client->pollWait, wait); in HdfVNodeAdapterPoll() 700 static int HdfVNodeAdapterClose(struct OsalCdev *cdev, struct file *filep) in HdfVNodeAdapterClose() argument 704 client = (struct HdfVNodeAdapterClient *)OsalGetFilePriv(filep); in HdfVNodeAdapterClose() 710 OsalSetFilePriv(filep, NUL in HdfVNodeAdapterClose() [all...] |
/drivers/hdf_core/adapter/khdf/linux/platform/mipi_csi/ |
H A D | mipi_csi_dev.c | 227 static long MipiRxIoctl(struct file *filep, unsigned int cmd, unsigned long arg) in MipiRxIoctl() argument 236 (void)filep; in MipiRxIoctl() 292 static long MipiRxCompatIoctl(struct file *filep, unsigned int cmd, unsigned long arg) in MipiRxCompatIoctl() argument 294 return MipiRxIoctl(filep, cmd, arg); in MipiRxCompatIoctl() 1138 static int MipiRxOpen(struct inode *inode, struct file *filep) in MipiRxOpen() argument 1141 (void)filep; in MipiRxOpen() 1149 static int MipiRxRelease(struct inode *inode, struct file *filep) in MipiRxRelease() argument 1152 (void)filep; in MipiRxRelease()
|
/drivers/hdf_core/adapter/platform/uart/ |
H A D | uart_gr5xx.c | 476 static int32_t UartHostDevPollEvent(struct UartHost *host, void *filep, void *table) in UartHostDevPollEvent() argument 481 (void)filep; in UartHostDevPollEvent()
|