Lines Matching full:agent

37 	 * already identified and bound to channel handle in both SCMI agent
61 * SCMI shm information are 0 if agent expects to use OP-TEE regular SHM
118 * @link: Reference in agent's channel list
142 * @channel_list: List of all created channels for the agent
158 static int open_session(struct scmi_optee_agent *agent, u32 *tee_session) in open_session() argument
160 struct device *dev = agent->dev; in open_session()
168 ret = tee_client_open_session(agent->tee_ctx, &arg, NULL); in open_session()
179 static void close_session(struct scmi_optee_agent *agent, u32 tee_session) in close_session() argument
181 tee_client_close_session(agent->tee_ctx, tee_session); in close_session()
184 static int get_capabilities(struct scmi_optee_agent *agent) in get_capabilities() argument
192 ret = open_session(agent, &tee_session); in get_capabilities()
202 ret = tee_client_invoke_func(agent->tee_ctx, &arg, param); in get_capabilities()
204 close_session(agent, tee_session); in get_capabilities()
207 dev_err(agent->dev, "Can't get capabilities: %d / %#x\n", ret, arg.ret); in get_capabilities()
214 dev_err(agent->dev, "OP-TEE SCMI PTA doesn't support SMT and MSG\n"); in get_capabilities()
218 agent->caps = caps; in get_capabilities()
531 struct scmi_optee_agent *agent; in scmi_optee_service_probe() local
545 agent = devm_kzalloc(dev, sizeof(*agent), GFP_KERNEL); in scmi_optee_service_probe()
546 if (!agent) { in scmi_optee_service_probe()
551 agent->dev = dev; in scmi_optee_service_probe()
552 agent->tee_ctx = tee_ctx; in scmi_optee_service_probe()
553 INIT_LIST_HEAD(&agent->channel_list); in scmi_optee_service_probe()
554 mutex_init(&agent->mu); in scmi_optee_service_probe()
556 ret = get_capabilities(agent); in scmi_optee_service_probe()
560 /* Ensure agent resources are all visible before scmi_optee_private is */ in scmi_optee_service_probe()
562 scmi_optee_private = agent; in scmi_optee_service_probe()
580 struct scmi_optee_agent *agent = scmi_optee_private; in scmi_optee_service_remove() local
593 tee_client_close_context(agent->tee_ctx); in scmi_optee_service_remove()