Lines Matching refs:ph
72 static int scmi_power_attributes_get(const struct scmi_protocol_handle *ph, in scmi_power_attributes_get() argument
79 ret = ph->xops->xfer_get_init(ph, PROTOCOL_ATTRIBUTES, in scmi_power_attributes_get()
86 ret = ph->xops->do_xfer(ph, t); in scmi_power_attributes_get()
94 ph->xops->xfer_put(ph, t); in scmi_power_attributes_get()
99 scmi_power_domain_attributes_get(const struct scmi_protocol_handle *ph, in scmi_power_domain_attributes_get() argument
106 ret = ph->xops->xfer_get_init(ph, POWER_DOMAIN_ATTRIBUTES, in scmi_power_domain_attributes_get()
114 ret = ph->xops->do_xfer(ph, t); in scmi_power_domain_attributes_get()
124 ph->xops->xfer_put(ph, t); in scmi_power_domain_attributes_get()
128 static int scmi_power_state_set(const struct scmi_protocol_handle *ph, in scmi_power_state_set() argument
135 ret = ph->xops->xfer_get_init(ph, POWER_STATE_SET, sizeof(*st), 0, &t); in scmi_power_state_set()
144 ret = ph->xops->do_xfer(ph, t); in scmi_power_state_set()
146 ph->xops->xfer_put(ph, t); in scmi_power_state_set()
150 static int scmi_power_state_get(const struct scmi_protocol_handle *ph, in scmi_power_state_get() argument
156 ret = ph->xops->xfer_get_init(ph, POWER_STATE_GET, sizeof(u32), sizeof(u32), &t); in scmi_power_state_get()
162 ret = ph->xops->do_xfer(ph, t); in scmi_power_state_get()
166 ph->xops->xfer_put(ph, t); in scmi_power_state_get()
170 static int scmi_power_num_domains_get(const struct scmi_protocol_handle *ph) in scmi_power_num_domains_get() argument
172 struct scmi_power_info *pi = ph->get_priv(ph); in scmi_power_num_domains_get()
177 static char *scmi_power_name_get(const struct scmi_protocol_handle *ph, in scmi_power_name_get() argument
180 struct scmi_power_info *pi = ph->get_priv(ph); in scmi_power_name_get()
193 static int scmi_power_request_notify(const struct scmi_protocol_handle *ph, in scmi_power_request_notify() argument
200 ret = ph->xops->xfer_get_init(ph, POWER_STATE_NOTIFY, in scmi_power_request_notify()
209 ret = ph->xops->do_xfer(ph, t); in scmi_power_request_notify()
211 ph->xops->xfer_put(ph, t); in scmi_power_request_notify()
215 static int scmi_power_set_notify_enabled(const struct scmi_protocol_handle *ph, in scmi_power_set_notify_enabled() argument
220 ret = scmi_power_request_notify(ph, src_id, enable); in scmi_power_set_notify_enabled()
229 scmi_power_fill_custom_report(const struct scmi_protocol_handle *ph, in scmi_power_fill_custom_report() argument
249 static int scmi_power_get_num_sources(const struct scmi_protocol_handle *ph) in scmi_power_get_num_sources() argument
251 struct scmi_power_info *pinfo = ph->get_priv(ph); in scmi_power_get_num_sources()
281 static int scmi_power_protocol_init(const struct scmi_protocol_handle *ph) in scmi_power_protocol_init() argument
287 ph->xops->version_get(ph, &version); in scmi_power_protocol_init()
289 dev_dbg(ph->dev, "Power Version %d.%d\n", in scmi_power_protocol_init()
292 pinfo = devm_kzalloc(ph->dev, sizeof(*pinfo), GFP_KERNEL); in scmi_power_protocol_init()
296 scmi_power_attributes_get(ph, pinfo); in scmi_power_protocol_init()
298 pinfo->dom_info = devm_kcalloc(ph->dev, pinfo->num_domains, in scmi_power_protocol_init()
306 scmi_power_domain_attributes_get(ph, domain, dom); in scmi_power_protocol_init()
311 return ph->set_priv(ph, pinfo); in scmi_power_protocol_init()