Lines Matching refs:ph
109 struct scmi_protocol_handle ph; member
112 #define ph_to_pi(h) container_of(h, struct scmi_protocol_instance, ph)
719 static void xfer_put(const struct scmi_protocol_handle *ph, in xfer_put() argument
722 const struct scmi_protocol_instance *pi = ph_to_pi(ph); in xfer_put()
754 static int do_xfer(const struct scmi_protocol_handle *ph, in do_xfer() argument
759 const struct scmi_protocol_instance *pi = ph_to_pi(ph); in do_xfer()
846 static void reset_rx_to_maxsz(const struct scmi_protocol_handle *ph, in reset_rx_to_maxsz() argument
849 const struct scmi_protocol_instance *pi = ph_to_pi(ph); in reset_rx_to_maxsz()
867 static int do_xfer_with_response(const struct scmi_protocol_handle *ph, in do_xfer_with_response() argument
875 ret = do_xfer(ph, xfer); in do_xfer_with_response()
902 static int xfer_get_init(const struct scmi_protocol_handle *ph, in xfer_get_init() argument
908 const struct scmi_protocol_instance *pi = ph_to_pi(ph); in xfer_get_init()
946 static int version_get(const struct scmi_protocol_handle *ph, u32 *version) in version_get() argument
952 ret = xfer_get_init(ph, PROTOCOL_VERSION, 0, sizeof(*version), &t); in version_get()
956 ret = do_xfer(ph, t); in version_get()
962 xfer_put(ph, t); in version_get()
974 static int scmi_set_protocol_priv(const struct scmi_protocol_handle *ph, in scmi_set_protocol_priv() argument
977 struct scmi_protocol_instance *pi = ph_to_pi(ph); in scmi_set_protocol_priv()
991 static void *scmi_get_protocol_priv(const struct scmi_protocol_handle *ph) in scmi_get_protocol_priv() argument
993 const struct scmi_protocol_instance *pi = ph_to_pi(ph); in scmi_get_protocol_priv()
1019 scmi_revision_area_get(const struct scmi_protocol_handle *ph) in scmi_revision_area_get() argument
1021 const struct scmi_protocol_instance *pi = ph_to_pi(ph); in scmi_revision_area_get()
1065 pi->ph.dev = handle->dev; in scmi_alloc_init_protocol_instance()
1066 pi->ph.xops = &xfer_ops; in scmi_alloc_init_protocol_instance()
1067 pi->ph.set_priv = scmi_set_protocol_priv; in scmi_alloc_init_protocol_instance()
1068 pi->ph.get_priv = scmi_get_protocol_priv; in scmi_alloc_init_protocol_instance()
1071 ret = pi->proto->instance_init(&pi->ph); in scmi_alloc_init_protocol_instance()
1086 &pi->ph, in scmi_alloc_init_protocol_instance()
1186 pi->proto->instance_deinit(&pi->ph); in scmi_protocol_release()
1201 void scmi_setup_protocol_implemented(const struct scmi_protocol_handle *ph, in scmi_setup_protocol_implemented() argument
1204 const struct scmi_protocol_instance *pi = ph_to_pi(ph); in scmi_setup_protocol_implemented()
1257 struct scmi_protocol_handle **ph) in scmi_devm_protocol_get() argument
1263 if (!ph) in scmi_devm_protocol_get()
1281 *ph = &pi->ph; in scmi_devm_protocol_get()