Lines Matching defs:handle
71 static int scmi_power_attributes_get(const struct scmi_handle *handle,
78 ret = scmi_xfer_get_init(handle, PROTOCOL_ATTRIBUTES,
85 ret = scmi_do_xfer(handle, t);
93 scmi_xfer_put(handle, t);
98 scmi_power_domain_attributes_get(const struct scmi_handle *handle, u32 domain,
105 ret = scmi_xfer_get_init(handle, POWER_DOMAIN_ATTRIBUTES,
114 ret = scmi_do_xfer(handle, t);
124 scmi_xfer_put(handle, t);
129 scmi_power_state_set(const struct scmi_handle *handle, u32 domain, u32 state)
135 ret = scmi_xfer_get_init(handle, POWER_STATE_SET, SCMI_PROTOCOL_POWER,
145 ret = scmi_do_xfer(handle, t);
147 scmi_xfer_put(handle, t);
152 scmi_power_state_get(const struct scmi_handle *handle, u32 domain, u32 *state)
157 ret = scmi_xfer_get_init(handle, POWER_STATE_GET, SCMI_PROTOCOL_POWER,
164 ret = scmi_do_xfer(handle, t);
168 scmi_xfer_put(handle, t);
172 static int scmi_power_num_domains_get(const struct scmi_handle *handle)
174 struct scmi_power_info *pi = handle->power_priv;
179 static char *scmi_power_name_get(const struct scmi_handle *handle, u32 domain)
181 struct scmi_power_info *pi = handle->power_priv;
194 static int scmi_power_request_notify(const struct scmi_handle *handle,
201 ret = scmi_xfer_get_init(handle, POWER_STATE_NOTIFY,
210 ret = scmi_do_xfer(handle, t);
212 scmi_xfer_put(handle, t);
216 static int scmi_power_set_notify_enabled(const struct scmi_handle *handle,
221 ret = scmi_power_request_notify(handle, src_id, enable);
229 static void *scmi_power_fill_custom_report(const struct scmi_handle *handle,
263 static int scmi_power_protocol_init(struct scmi_handle *handle)
269 scmi_version_get(handle, SCMI_PROTOCOL_POWER, &version);
271 dev_dbg(handle->dev, "Power Version %d.%d\n",
274 pinfo = devm_kzalloc(handle->dev, sizeof(*pinfo), GFP_KERNEL);
278 scmi_power_attributes_get(handle, pinfo);
280 pinfo->dom_info = devm_kcalloc(handle->dev, pinfo->num_domains,
288 scmi_power_domain_attributes_get(handle, domain, dom);
291 scmi_register_protocol_events(handle,
298 handle->power_ops = &power_ops;
299 handle->power_priv = pinfo;