Lines Matching refs:agent
156 static int open_session(struct scmi_optee_agent *agent, u32 *tee_session) in open_session() argument
158 struct device *dev = agent->dev; in open_session()
166 ret = tee_client_open_session(agent->tee_ctx, &arg, NULL); in open_session()
177 static void close_session(struct scmi_optee_agent *agent, u32 tee_session) in close_session() argument
179 tee_client_close_session(agent->tee_ctx, tee_session); in close_session()
182 static int get_capabilities(struct scmi_optee_agent *agent) in get_capabilities() argument
190 ret = open_session(agent, &tee_session); in get_capabilities()
200 ret = tee_client_invoke_func(agent->tee_ctx, &arg, param); in get_capabilities()
202 close_session(agent, tee_session); in get_capabilities()
205 dev_err(agent->dev, "Can't get capabilities: %d / %#x\n", ret, arg.ret); in get_capabilities()
212 dev_err(agent->dev, "OP-TEE SCMI PTA doesn't support SMT and MSG\n"); in get_capabilities()
216 agent->caps = caps; in get_capabilities()
553 struct scmi_optee_agent *agent; in scmi_optee_service_probe() local
567 agent = devm_kzalloc(dev, sizeof(*agent), GFP_KERNEL); in scmi_optee_service_probe()
568 if (!agent) { in scmi_optee_service_probe()
573 agent->dev = dev; in scmi_optee_service_probe()
574 agent->tee_ctx = tee_ctx; in scmi_optee_service_probe()
575 INIT_LIST_HEAD(&agent->channel_list); in scmi_optee_service_probe()
576 mutex_init(&agent->mu); in scmi_optee_service_probe()
578 ret = get_capabilities(agent); in scmi_optee_service_probe()
584 scmi_optee_private = agent; in scmi_optee_service_probe()
596 struct scmi_optee_agent *agent = scmi_optee_private; in scmi_optee_service_remove() local
607 tee_client_close_context(agent->tee_ctx); in scmi_optee_service_remove()