| Samsung Internal API reference 2.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

driver.h
Go to the documentation of this file.
1
9 #ifndef __DRIVER_H__
10 #define __DRIVER_H__
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 #include <fops.h>
17 #include <tee_internal_api.h>
18
50 DSO_EXPORT int TEES_InitDriver(char *name, struct fops *fops, unsigned int drvid,
51 struct usr_drv_info **info);
52
96 DSO_EXPORT int TEES_RegisterIoctlDesc(struct usr_drv_info *info,
97 unsigned int cmd,
98 struct ioctl_desc *desc);
99
116 DSO_EXPORT int TEES_FiniDriver(struct usr_drv_info *info);
117
150 DSO_EXPORT int TEES_RegisterDriver(char *name, struct fops *fops, unsigned int drvid,
151 struct usr_drv_info **info) _deprecated_;
152
170 DSO_EXPORT int TEES_ReleaseDriver(struct usr_drv_info **info) _deprecated_;
171
173 int driver_cancel_handle(struct usr_drv_info *info, int sock_conn);
174 int driver_handle(struct usr_drv_info *info, int sock_conn);
218 DSO_EXPORT int TEES_CompleteRequest(struct drv_info *filp, long ret);
219
254 DSO_EXPORT void *TEES_AcquireUserBuffer(struct drv_info *filp, uint64_t addr,
255 const size_t size, int prot);
256
280 DSO_EXPORT int TEES_ReleaseUserBuffer(const void *addr, const size_t size);
281
282 #ifdef __cplusplus
283 }
284 #endif
285
286 #endif /* !__DRIVER_H__ */
287
TEES_RegisterIoctlDesc
int TEES_RegisterIoctlDesc(struct usr_drv_info *info, unsigned int cmd, struct ioctl_desc *desc)
Register an ioctl() cmd for driver.
TEES_InitDriver
int TEES_InitDriver(char *name, struct fops *fops, unsigned int drvid, struct usr_drv_info **info)
Register user driver in /dev/ directory under name, using mask of file operations fops and drvid of s...
TEES_CompleteRequest
int TEES_CompleteRequest(struct drv_info *filp, long ret)
Complete deferred request(read, write, etc.) to driver.
fops
Structure that contains file operations callbacks supported by the driver. If user wants the driver t...
Definition: fops.h:64
usr_drv_info
Structure that contains information describing the driver.
Definition: fops.h:90
TEES_FiniDriver
int TEES_FiniDriver(struct usr_drv_info *info)
Allow to release driver that was registered by using struct usr_drv_info.
ioctl_desc
Structure that template for ioctl() parameters parsing.
Definition: tbt.h:75
TEES_ReleaseDriver
int TEES_ReleaseDriver(struct usr_drv_info **info) _deprecated_
Allow to release driver that was registered by using struct usr_drv_info.
TEES_RegisterDriver
int TEES_RegisterDriver(char *name, struct fops *fops, unsigned int drvid, struct usr_drv_info **info) _deprecated_
Register user driver in /dev/ directory under name, using mask of file operations fops and drvid of s...
TEES_AcquireUserBuffer
void * TEES_AcquireUserBuffer(struct drv_info *filp, uint64_t addr, const size_t size, int prot)
Get shared mapped area to use as buffer. this API can not be used in read()/write() cmd for driver...
TEES_ReleaseUserBuffer
int TEES_ReleaseUserBuffer(const void *addr, const size_t size)
Deletes the shared mapped area for the specified address range.