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