Lines Matching refs:ph
64 static int scmi_base_attributes_get(const struct scmi_protocol_handle *ph) in scmi_base_attributes_get() argument
69 struct scmi_revision_info *rev = ph->get_priv(ph); in scmi_base_attributes_get()
71 ret = ph->xops->xfer_get_init(ph, PROTOCOL_ATTRIBUTES, in scmi_base_attributes_get()
76 ret = ph->xops->do_xfer(ph, t); in scmi_base_attributes_get()
83 ph->xops->xfer_put(ph, t); in scmi_base_attributes_get()
97 scmi_base_vendor_id_get(const struct scmi_protocol_handle *ph, bool sub_vendor) in scmi_base_vendor_id_get() argument
103 struct scmi_revision_info *rev = ph->get_priv(ph); in scmi_base_vendor_id_get()
116 ret = ph->xops->xfer_get_init(ph, cmd, 0, size, &t); in scmi_base_vendor_id_get()
120 ret = ph->xops->do_xfer(ph, t); in scmi_base_vendor_id_get()
124 ph->xops->xfer_put(ph, t); in scmi_base_vendor_id_get()
139 scmi_base_implementation_version_get(const struct scmi_protocol_handle *ph) in scmi_base_implementation_version_get() argument
144 struct scmi_revision_info *rev = ph->get_priv(ph); in scmi_base_implementation_version_get()
146 ret = ph->xops->xfer_get_init(ph, BASE_DISCOVER_IMPLEMENT_VERSION, in scmi_base_implementation_version_get()
151 ret = ph->xops->do_xfer(ph, t); in scmi_base_implementation_version_get()
157 ph->xops->xfer_put(ph, t); in scmi_base_implementation_version_get()
172 scmi_base_implementation_list_get(const struct scmi_protocol_handle *ph, in scmi_base_implementation_list_get() argument
180 struct device *dev = ph->dev; in scmi_base_implementation_list_get()
182 ret = ph->xops->xfer_get_init(ph, BASE_DISCOVER_LIST_PROTOCOLS, in scmi_base_implementation_list_get()
195 ret = ph->xops->do_xfer(ph, t); in scmi_base_implementation_list_get()
210 ph->xops->reset_rx_to_maxsz(ph, t); in scmi_base_implementation_list_get()
213 ph->xops->xfer_put(ph, t); in scmi_base_implementation_list_get()
230 static int scmi_base_discover_agent_get(const struct scmi_protocol_handle *ph, in scmi_base_discover_agent_get() argument
237 ret = ph->xops->xfer_get_init(ph, BASE_DISCOVER_AGENT, in scmi_base_discover_agent_get()
244 ret = ph->xops->do_xfer(ph, t); in scmi_base_discover_agent_get()
250 ph->xops->xfer_put(ph, t); in scmi_base_discover_agent_get()
255 static int scmi_base_error_notify(const struct scmi_protocol_handle *ph, in scmi_base_error_notify() argument
263 ret = ph->xops->xfer_get_init(ph, BASE_NOTIFY_ERRORS, in scmi_base_error_notify()
271 ret = ph->xops->do_xfer(ph, t); in scmi_base_error_notify()
273 ph->xops->xfer_put(ph, t); in scmi_base_error_notify()
277 static int scmi_base_set_notify_enabled(const struct scmi_protocol_handle *ph, in scmi_base_set_notify_enabled() argument
282 ret = scmi_base_error_notify(ph, enable); in scmi_base_set_notify_enabled()
289 static void *scmi_base_fill_custom_report(const struct scmi_protocol_handle *ph, in scmi_base_fill_custom_report() argument
341 static int scmi_base_protocol_init(const struct scmi_protocol_handle *ph) in scmi_base_protocol_init() argument
347 struct device *dev = ph->dev; in scmi_base_protocol_init()
348 struct scmi_revision_info *rev = scmi_revision_area_get(ph); in scmi_base_protocol_init()
350 ret = ph->xops->version_get(ph, &version); in scmi_base_protocol_init()
360 ph->set_priv(ph, rev); in scmi_base_protocol_init()
362 scmi_base_attributes_get(ph); in scmi_base_protocol_init()
363 scmi_base_vendor_id_get(ph, false); in scmi_base_protocol_init()
364 scmi_base_vendor_id_get(ph, true); in scmi_base_protocol_init()
365 scmi_base_implementation_version_get(ph); in scmi_base_protocol_init()
366 scmi_base_implementation_list_get(ph, prot_imp); in scmi_base_protocol_init()
368 scmi_setup_protocol_implemented(ph, prot_imp); in scmi_base_protocol_init()
377 scmi_base_discover_agent_get(ph, id, name); in scmi_base_protocol_init()