The driver's main purpose is to support the porting of the open source
component optee_client (https://github.com/OP-TEE/optee_client) to nttux.
The basic function of the driver module is to convert the REE application layer data and send it to the TEE through rpmsg.
The main functions include
1 driver registration.
we need to register a device driver(/dev/tee0) through optee_register function.
2 open the driver
3 ioctl the driver
The ioctl command passes different parameters and commands, and interacts with the TEE through rpmsg.
4 close the driver
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Like rpmsgdev and rpmsgmtd, rpmsgblk allow the local cpu to
access the block device in the remote cpu.
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
Before this commit, each rpmsgdev server only manages one file
no matter how many times the client opened.
It can't work fine with some complex drivers, such as input driver
(keyboard, touchscreen and button), because input driver will alloc
a new private open structure for every open operation to make sure
all the applications don't miss data when input driver is used by
multiple applications.
This commit solves this problem by making the files in server and
client be one-to-one.
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>