Lines Matching +full:tx +full:- +full:channel
4 * SPDX-License-Identifier: Apache-2.0
32 * @param chan pointer to SCMI channel on which the reply
39 * @brief SCMI channel structure
41 * An SCMI channel is a medium through which a protocol
47 * channel lock. This is meant to be initialized
50 * through a channel at a given moment.
59 /** channel private data */
68 /** is the channel ready to be used by a protocol? */
79 bool tx);
86 uint32_t proto, bool tx);
90 * @brief Request an SCMI channel dynamically
93 * static channel allocation, the SCMI core will try to bind
94 * a channel to a protocol dynamically using this function.
95 * Note that no setup needs to be performed on the channel
96 * in this function as the core will also call the channel
102 * requesting the channel
103 * @param tx true if the channel is TX, false if RX
105 * @retval pointer to SCMI channel that's to be bound
111 uint32_t proto, bool tx) in scmi_transport_request_channel() argument
114 (const struct scmi_transport_api *)transport->api; in scmi_transport_request_channel()
116 if (api->request_channel) { in scmi_transport_request_channel()
117 return api->request_channel(transport, proto, tx); in scmi_transport_request_channel()
145 (const struct scmi_transport_api *)transport->api; in scmi_transport_init()
147 if (api->init) { in scmi_transport_init()
148 return api->init(transport); in scmi_transport_init()
155 * @brief Setup an SCMI channel
157 * Before being able to send/receive messages, an SCMI channel needs
159 * successfully, an SCMI protocol will be able to use this channel
164 * @param chan pointer to SCMI channel to be prepared
165 * @param tx true if the channel is TX, false if RX
172 bool tx) in scmi_transport_setup_chan() argument
175 (const struct scmi_transport_api *)transport->api; in scmi_transport_setup_chan()
177 if (!api || !api->setup_chan) { in scmi_transport_setup_chan()
178 return -ENOSYS; in scmi_transport_setup_chan()
181 return api->setup_chan(transport, chan, tx); in scmi_transport_setup_chan()
185 * @brief Send an SCMI channel
187 * Send an SCMI message using given SCMI channel. This function is
192 * @param chan pointer to SCMI channel on which the message
204 (const struct scmi_transport_api *)transport->api; in scmi_transport_send_message()
206 if (!api || !api->send_message) { in scmi_transport_send_message()
207 return -ENOSYS; in scmi_transport_send_message()
210 return api->send_message(transport, chan, msg); in scmi_transport_send_message()
218 * @param chan pointer to SCMI channel on which the message
230 (const struct scmi_transport_api *)transport->api; in scmi_transport_read_message()
232 if (!api || !api->read_message) { in scmi_transport_read_message()
233 return -ENOSYS; in scmi_transport_read_message()
236 return api->read_message(transport, chan, msg); in scmi_transport_read_message()
240 * @brief Check if an SCMI channel is free
244 * @param chan pointer to SCMI channel the query is to be
254 (const struct scmi_transport_api *)transport->api; in scmi_transport_channel_is_free()
256 if (!api || !api->channel_is_free) { in scmi_transport_channel_is_free()
257 return -ENOSYS; in scmi_transport_channel_is_free()
260 return api->channel_is_free(transport, chan); in scmi_transport_channel_is_free()