So to get started with the IOCTL's needed between TEE clients in user space and the generic driver. Have the different use cases in back of your mind when thinking about this.
Here are three IOC's needed. What else?
IOCTL's: TEE_IOC_CMD TEE_IOC_SHM_ALLOC TEE_IOC_SHM_FREE