Lines Matching full:handle
55 static int scmi_reset_attributes_get(const struct scmi_handle *handle, in scmi_reset_attributes_get() argument
62 ret = scmi_xfer_get_init(handle, PROTOCOL_ATTRIBUTES, in scmi_reset_attributes_get()
67 ret = scmi_do_xfer(handle, t); in scmi_reset_attributes_get()
73 scmi_xfer_put(handle, t); in scmi_reset_attributes_get()
78 scmi_reset_domain_attributes_get(const struct scmi_handle *handle, u32 domain, in scmi_reset_domain_attributes_get() argument
85 ret = scmi_xfer_get_init(handle, RESET_DOMAIN_ATTRIBUTES, in scmi_reset_domain_attributes_get()
94 ret = scmi_do_xfer(handle, t); in scmi_reset_domain_attributes_get()
106 scmi_xfer_put(handle, t); in scmi_reset_domain_attributes_get()
110 static int scmi_reset_num_domains_get(const struct scmi_handle *handle) in scmi_reset_num_domains_get() argument
112 struct scmi_reset_info *pi = handle->reset_priv; in scmi_reset_num_domains_get()
117 static char *scmi_reset_name_get(const struct scmi_handle *handle, u32 domain) in scmi_reset_name_get() argument
119 struct scmi_reset_info *pi = handle->reset_priv; in scmi_reset_name_get()
125 static int scmi_reset_latency_get(const struct scmi_handle *handle, u32 domain) in scmi_reset_latency_get() argument
127 struct scmi_reset_info *pi = handle->reset_priv; in scmi_reset_latency_get()
133 static int scmi_domain_reset(const struct scmi_handle *handle, u32 domain, in scmi_domain_reset() argument
139 struct scmi_reset_info *pi = handle->reset_priv; in scmi_domain_reset()
145 ret = scmi_xfer_get_init(handle, RESET, SCMI_PROTOCOL_RESET, in scmi_domain_reset()
156 ret = scmi_do_xfer_with_response(handle, t); in scmi_domain_reset()
158 ret = scmi_do_xfer(handle, t); in scmi_domain_reset()
160 scmi_xfer_put(handle, t); in scmi_domain_reset()
164 static int scmi_reset_domain_reset(const struct scmi_handle *handle, u32 domain) in scmi_reset_domain_reset() argument
166 return scmi_domain_reset(handle, domain, AUTONOMOUS_RESET, in scmi_reset_domain_reset()
171 scmi_reset_domain_assert(const struct scmi_handle *handle, u32 domain) in scmi_reset_domain_assert() argument
173 return scmi_domain_reset(handle, domain, EXPLICIT_RESET_ASSERT, in scmi_reset_domain_assert()
178 scmi_reset_domain_deassert(const struct scmi_handle *handle, u32 domain) in scmi_reset_domain_deassert() argument
180 return scmi_domain_reset(handle, domain, 0, ARCH_COLD_RESET); in scmi_reset_domain_deassert()
192 static int scmi_reset_protocol_init(struct scmi_handle *handle) in scmi_reset_protocol_init() argument
198 scmi_version_get(handle, SCMI_PROTOCOL_RESET, &version); in scmi_reset_protocol_init()
200 dev_dbg(handle->dev, "Reset Version %d.%d\n", in scmi_reset_protocol_init()
203 pinfo = devm_kzalloc(handle->dev, sizeof(*pinfo), GFP_KERNEL); in scmi_reset_protocol_init()
207 scmi_reset_attributes_get(handle, pinfo); in scmi_reset_protocol_init()
209 pinfo->dom_info = devm_kcalloc(handle->dev, pinfo->num_domains, in scmi_reset_protocol_init()
217 scmi_reset_domain_attributes_get(handle, domain, dom); in scmi_reset_protocol_init()
220 handle->reset_ops = &reset_ops; in scmi_reset_protocol_init()
221 handle->reset_priv = pinfo; in scmi_reset_protocol_init()