#include <linux/err.h>
#include <linux/key-type.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/tee_drv.h>
#include <linux/uuid.h>
#include <keys/trusted_tee.h>
#define DRIVER_NAME …
#define TA_CMD_GET_RANDOM …
#define TA_CMD_SEAL …
#define TA_CMD_UNSEAL …
struct trusted_key_tee_private { … };
static struct trusted_key_tee_private pvt_data;
static int trusted_tee_seal(struct trusted_key_payload *p, char *datablob)
{ … }
static int trusted_tee_unseal(struct trusted_key_payload *p, char *datablob)
{ … }
static int trusted_tee_get_random(unsigned char *key, size_t key_len)
{ … }
static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data)
{ … }
static int trusted_key_probe(struct device *dev)
{ … }
static int trusted_key_remove(struct device *dev)
{ … }
static const struct tee_client_device_id trusted_key_id_table[] = …;
MODULE_DEVICE_TABLE(tee, trusted_key_id_table);
static struct tee_client_driver trusted_key_driver = …;
static int trusted_tee_init(void)
{ … }
static void trusted_tee_exit(void)
{ … }
struct trusted_key_ops trusted_key_tee_ops = …;