Lines Matching full:handle

155 static int scmi_perf_attributes_get(const struct scmi_handle *handle,  in scmi_perf_attributes_get()  argument
162 ret = scmi_xfer_get_init(handle, PROTOCOL_ATTRIBUTES, in scmi_perf_attributes_get()
169 ret = scmi_do_xfer(handle, t); in scmi_perf_attributes_get()
180 scmi_xfer_put(handle, t); in scmi_perf_attributes_get()
185 scmi_perf_domain_attributes_get(const struct scmi_handle *handle, u32 domain, in scmi_perf_domain_attributes_get() argument
192 ret = scmi_xfer_get_init(handle, PERF_DOMAIN_ATTRIBUTES, in scmi_perf_domain_attributes_get()
201 ret = scmi_do_xfer(handle, t); in scmi_perf_domain_attributes_get()
225 scmi_xfer_put(handle, t); in scmi_perf_domain_attributes_get()
237 scmi_perf_describe_levels_get(const struct scmi_handle *handle, u32 domain, in scmi_perf_describe_levels_get() argument
248 ret = scmi_xfer_get_init(handle, PERF_DESCRIBE_LEVELS, in scmi_perf_describe_levels_get()
261 ret = scmi_do_xfer(handle, t); in scmi_perf_describe_levels_get()
268 dev_err(handle->dev, "No. of OPPs exceeded MAX_OPPS"); in scmi_perf_describe_levels_get()
279 dev_dbg(handle->dev, "Level %d Power %d Latency %dus\n", in scmi_perf_describe_levels_get()
291 scmi_xfer_put(handle, t); in scmi_perf_describe_levels_get()
331 static int scmi_perf_mb_limits_set(const struct scmi_handle *handle, u32 domain, in scmi_perf_mb_limits_set() argument
338 ret = scmi_xfer_get_init(handle, PERF_LIMITS_SET, SCMI_PROTOCOL_PERF, in scmi_perf_mb_limits_set()
348 ret = scmi_do_xfer(handle, t); in scmi_perf_mb_limits_set()
350 scmi_xfer_put(handle, t); in scmi_perf_mb_limits_set()
354 static int scmi_perf_limits_set(const struct scmi_handle *handle, u32 domain, in scmi_perf_limits_set() argument
357 struct scmi_perf_info *pi = handle->perf_priv; in scmi_perf_limits_set()
367 return scmi_perf_mb_limits_set(handle, domain, max_perf, min_perf); in scmi_perf_limits_set()
370 static int scmi_perf_mb_limits_get(const struct scmi_handle *handle, u32 domain, in scmi_perf_mb_limits_get() argument
377 ret = scmi_xfer_get_init(handle, PERF_LIMITS_GET, SCMI_PROTOCOL_PERF, in scmi_perf_mb_limits_get()
384 ret = scmi_do_xfer(handle, t); in scmi_perf_mb_limits_get()
392 scmi_xfer_put(handle, t); in scmi_perf_mb_limits_get()
396 static int scmi_perf_limits_get(const struct scmi_handle *handle, u32 domain, in scmi_perf_limits_get() argument
399 struct scmi_perf_info *pi = handle->perf_priv; in scmi_perf_limits_get()
408 return scmi_perf_mb_limits_get(handle, domain, max_perf, min_perf); in scmi_perf_limits_get()
411 static int scmi_perf_mb_level_set(const struct scmi_handle *handle, u32 domain, in scmi_perf_mb_level_set() argument
418 ret = scmi_xfer_get_init(handle, PERF_LEVEL_SET, SCMI_PROTOCOL_PERF, in scmi_perf_mb_level_set()
428 ret = scmi_do_xfer(handle, t); in scmi_perf_mb_level_set()
430 scmi_xfer_put(handle, t); in scmi_perf_mb_level_set()
434 static int scmi_perf_level_set(const struct scmi_handle *handle, u32 domain, in scmi_perf_level_set() argument
437 struct scmi_perf_info *pi = handle->perf_priv; in scmi_perf_level_set()
446 return scmi_perf_mb_level_set(handle, domain, level, poll); in scmi_perf_level_set()
449 static int scmi_perf_mb_level_get(const struct scmi_handle *handle, u32 domain, in scmi_perf_mb_level_get() argument
455 ret = scmi_xfer_get_init(handle, PERF_LEVEL_GET, SCMI_PROTOCOL_PERF, in scmi_perf_mb_level_get()
463 ret = scmi_do_xfer(handle, t); in scmi_perf_mb_level_get()
467 scmi_xfer_put(handle, t); in scmi_perf_mb_level_get()
471 static int scmi_perf_level_get(const struct scmi_handle *handle, u32 domain, in scmi_perf_level_get() argument
474 struct scmi_perf_info *pi = handle->perf_priv; in scmi_perf_level_get()
482 return scmi_perf_mb_level_get(handle, domain, level, poll); in scmi_perf_level_get()
495 scmi_perf_domain_desc_fc(const struct scmi_handle *handle, u32 domain, in scmi_perf_domain_desc_fc() argument
512 ret = scmi_xfer_get_init(handle, PERF_DESCRIBE_FASTCHANNEL, in scmi_perf_domain_desc_fc()
522 ret = scmi_do_xfer(handle, t); in scmi_perf_domain_desc_fc()
534 addr = devm_ioremap(handle->dev, phys_addr, size); in scmi_perf_domain_desc_fc()
540 db = devm_kzalloc(handle->dev, sizeof(*db), GFP_KERNEL); in scmi_perf_domain_desc_fc()
547 addr = devm_ioremap(handle->dev, phys_addr, size); in scmi_perf_domain_desc_fc()
560 scmi_xfer_put(handle, t); in scmi_perf_domain_desc_fc()
563 static void scmi_perf_domain_init_fc(const struct scmi_handle *handle, in scmi_perf_domain_init_fc() argument
568 fc = devm_kzalloc(handle->dev, sizeof(*fc), GFP_KERNEL); in scmi_perf_domain_init_fc()
572 scmi_perf_domain_desc_fc(handle, domain, PERF_LEVEL_SET, in scmi_perf_domain_init_fc()
574 scmi_perf_domain_desc_fc(handle, domain, PERF_LEVEL_GET, in scmi_perf_domain_init_fc()
576 scmi_perf_domain_desc_fc(handle, domain, PERF_LIMITS_SET, in scmi_perf_domain_init_fc()
578 scmi_perf_domain_desc_fc(handle, domain, PERF_LIMITS_GET, in scmi_perf_domain_init_fc()
595 static int scmi_dvfs_device_opps_add(const struct scmi_handle *handle, in scmi_dvfs_device_opps_add() argument
602 struct scmi_perf_info *pi = handle->perf_priv; in scmi_dvfs_device_opps_add()
627 static int scmi_dvfs_transition_latency_get(const struct scmi_handle *handle, in scmi_dvfs_transition_latency_get() argument
631 struct scmi_perf_info *pi = handle->perf_priv; in scmi_dvfs_transition_latency_get()
642 static int scmi_dvfs_freq_set(const struct scmi_handle *handle, u32 domain, in scmi_dvfs_freq_set() argument
645 struct scmi_perf_info *pi = handle->perf_priv; in scmi_dvfs_freq_set()
648 return scmi_perf_level_set(handle, domain, freq / dom->mult_factor, in scmi_dvfs_freq_set()
652 static int scmi_dvfs_freq_get(const struct scmi_handle *handle, u32 domain, in scmi_dvfs_freq_get() argument
657 struct scmi_perf_info *pi = handle->perf_priv; in scmi_dvfs_freq_get()
660 ret = scmi_perf_level_get(handle, domain, &level, poll); in scmi_dvfs_freq_get()
667 static int scmi_dvfs_est_power_get(const struct scmi_handle *handle, u32 domain, in scmi_dvfs_est_power_get() argument
670 struct scmi_perf_info *pi = handle->perf_priv; in scmi_dvfs_est_power_get()
707 static int scmi_perf_protocol_init(struct scmi_handle *handle) in scmi_perf_protocol_init() argument
713 scmi_version_get(handle, SCMI_PROTOCOL_PERF, &version); in scmi_perf_protocol_init()
715 dev_dbg(handle->dev, "Performance Version %d.%d\n", in scmi_perf_protocol_init()
718 pinfo = devm_kzalloc(handle->dev, sizeof(*pinfo), GFP_KERNEL); in scmi_perf_protocol_init()
722 scmi_perf_attributes_get(handle, pinfo); in scmi_perf_protocol_init()
724 pinfo->dom_info = devm_kcalloc(handle->dev, pinfo->num_domains, in scmi_perf_protocol_init()
732 scmi_perf_domain_attributes_get(handle, domain, dom); in scmi_perf_protocol_init()
733 scmi_perf_describe_levels_get(handle, domain, dom); in scmi_perf_protocol_init()
736 scmi_perf_domain_init_fc(handle, domain, &dom->fc_info); in scmi_perf_protocol_init()
739 handle->perf_ops = &perf_ops; in scmi_perf_protocol_init()
740 handle->perf_priv = pinfo; in scmi_perf_protocol_init()