Lines Matching refs:ph
68 static int scmi_reset_attributes_get(const struct scmi_protocol_handle *ph, in scmi_reset_attributes_get() argument
75 ret = ph->xops->xfer_get_init(ph, PROTOCOL_ATTRIBUTES, in scmi_reset_attributes_get()
80 ret = ph->xops->do_xfer(ph, t); in scmi_reset_attributes_get()
86 ph->xops->xfer_put(ph, t); in scmi_reset_attributes_get()
91 scmi_reset_domain_attributes_get(const struct scmi_protocol_handle *ph, in scmi_reset_domain_attributes_get() argument
98 ret = ph->xops->xfer_get_init(ph, RESET_DOMAIN_ATTRIBUTES, in scmi_reset_domain_attributes_get()
106 ret = ph->xops->do_xfer(ph, t); in scmi_reset_domain_attributes_get()
118 ph->xops->xfer_put(ph, t); in scmi_reset_domain_attributes_get()
122 static int scmi_reset_num_domains_get(const struct scmi_protocol_handle *ph) in scmi_reset_num_domains_get() argument
124 struct scmi_reset_info *pi = ph->get_priv(ph); in scmi_reset_num_domains_get()
129 static char *scmi_reset_name_get(const struct scmi_protocol_handle *ph, in scmi_reset_name_get() argument
132 struct scmi_reset_info *pi = ph->get_priv(ph); in scmi_reset_name_get()
139 static int scmi_reset_latency_get(const struct scmi_protocol_handle *ph, in scmi_reset_latency_get() argument
142 struct scmi_reset_info *pi = ph->get_priv(ph); in scmi_reset_latency_get()
148 static int scmi_domain_reset(const struct scmi_protocol_handle *ph, u32 domain, in scmi_domain_reset() argument
154 struct scmi_reset_info *pi = ph->get_priv(ph); in scmi_domain_reset()
160 ret = ph->xops->xfer_get_init(ph, RESET, sizeof(*dom), 0, &t); in scmi_domain_reset()
170 ret = ph->xops->do_xfer_with_response(ph, t); in scmi_domain_reset()
172 ret = ph->xops->do_xfer(ph, t); in scmi_domain_reset()
174 ph->xops->xfer_put(ph, t); in scmi_domain_reset()
178 static int scmi_reset_domain_reset(const struct scmi_protocol_handle *ph, in scmi_reset_domain_reset() argument
181 return scmi_domain_reset(ph, domain, AUTONOMOUS_RESET, in scmi_reset_domain_reset()
186 scmi_reset_domain_assert(const struct scmi_protocol_handle *ph, u32 domain) in scmi_reset_domain_assert() argument
188 return scmi_domain_reset(ph, domain, EXPLICIT_RESET_ASSERT, in scmi_reset_domain_assert()
193 scmi_reset_domain_deassert(const struct scmi_protocol_handle *ph, u32 domain) in scmi_reset_domain_deassert() argument
195 return scmi_domain_reset(ph, domain, 0, ARCH_COLD_RESET); in scmi_reset_domain_deassert()
207 static int scmi_reset_notify(const struct scmi_protocol_handle *ph, in scmi_reset_notify() argument
215 ret = ph->xops->xfer_get_init(ph, RESET_NOTIFY, sizeof(*cfg), 0, &t); in scmi_reset_notify()
223 ret = ph->xops->do_xfer(ph, t); in scmi_reset_notify()
225 ph->xops->xfer_put(ph, t); in scmi_reset_notify()
229 static int scmi_reset_set_notify_enabled(const struct scmi_protocol_handle *ph, in scmi_reset_set_notify_enabled() argument
234 ret = scmi_reset_notify(ph, src_id, enable); in scmi_reset_set_notify_enabled()
243 scmi_reset_fill_custom_report(const struct scmi_protocol_handle *ph, in scmi_reset_fill_custom_report() argument
263 static int scmi_reset_get_num_sources(const struct scmi_protocol_handle *ph) in scmi_reset_get_num_sources() argument
265 struct scmi_reset_info *pinfo = ph->get_priv(ph); in scmi_reset_get_num_sources()
294 static int scmi_reset_protocol_init(const struct scmi_protocol_handle *ph) in scmi_reset_protocol_init() argument
300 ph->xops->version_get(ph, &version); in scmi_reset_protocol_init()
302 dev_dbg(ph->dev, "Reset Version %d.%d\n", in scmi_reset_protocol_init()
305 pinfo = devm_kzalloc(ph->dev, sizeof(*pinfo), GFP_KERNEL); in scmi_reset_protocol_init()
309 scmi_reset_attributes_get(ph, pinfo); in scmi_reset_protocol_init()
311 pinfo->dom_info = devm_kcalloc(ph->dev, pinfo->num_domains, in scmi_reset_protocol_init()
319 scmi_reset_domain_attributes_get(ph, domain, dom); in scmi_reset_protocol_init()
323 return ph->set_priv(ph, pinfo); in scmi_reset_protocol_init()