|
Zephyr Project API 4.3.99
A Scalable Open Source RTOS
|
SCMI transport driver operations. More...
#include <transport.h>
Data Fields | |
| int(* | init )(const struct device *transport) |
| Initialize the transport driver. | |
| int(* | send_message )(const struct device *transport, struct scmi_channel *chan, struct scmi_message *msg, bool use_polling) |
| Send a message to the platform. | |
| int(* | setup_chan )(const struct device *transport, struct scmi_channel *chan, bool tx) |
| Prepare a channel for communication. | |
| int(* | read_message )(const struct device *transport, struct scmi_channel *chan, struct scmi_message *msg) |
| Read a message from the platform. | |
| bool(* | channel_is_free )(const struct device *transport, struct scmi_channel *chan) |
| Check if a TX channel is free. | |
| struct scmi_channel *(* | request_channel )(const struct device *transport, uint32_t proto, bool tx) |
| Request a channel dynamically. | |
SCMI transport driver operations.
This structure contains the set of operations to be implemented by all transport drivers.
| bool(* scmi_transport_api::channel_is_free) (const struct device *transport, struct scmi_channel *chan) |
Check if a TX channel is free.
Used to check if a TX channel allows sending data to the platform. If a message was previously sent to the platform, it is assumed that this function will indicate the availability of the message's reply.
| transport | device |
| chan | TX channel to query |
| 0 | if successful |
| <0 | negative errno code if failure |
| int(* scmi_transport_api::init) (const struct device *transport) |
Initialize the transport driver.
This operation can be left unimplemented if the driver requires no initialization.
| transport | transport device |
| 0 | is successful |
| <0 | negative errno code if failure |
| int(* scmi_transport_api::read_message) (const struct device *transport, struct scmi_channel *chan, struct scmi_message *msg) |
Read a message from the platform.
Used to read/receive a message from the platform over a given RX channel.
| transport | transport device |
| chan | channel used to receive the message |
| msg | message to receive |
| 0 | if successful |
| <0 | negative errno code if failure |
| struct scmi_channel *(* scmi_transport_api::request_channel) (const struct device *transport, uint32_t proto, bool tx) |
Request a channel dynamically.
If
CONFIG_ARM_SCMI_TRANSPORT_HAS_STATIC_CHANNELS
is enabled, this operation will be used to dynamically request a channel and bind it to a given protocol. Otherwise, operation can be left unimplemented.
| transport | transport device |
| proto | ID of the protocol for which the channel is requested |
| tx | true if channel is TX, false if channel is RX |
| pointer | to the channel bound to given protocol if successful |
| NULL | if failure |
| int(* scmi_transport_api::send_message) (const struct device *transport, struct scmi_channel *chan, struct scmi_message *msg, bool use_polling) |
Send a message to the platform.
Used to send a message to the platform over a given TX channel.
use_polling parameter and must comply with it.| transport | transport device |
| chan | channel used to send the message |
| msg | message to send |
| use_polling | true if polling should be enabled, false otherwise |
| 0 | if successful |
| <0 | negative errno code if failure |
| int(* scmi_transport_api::setup_chan) (const struct device *transport, struct scmi_channel *chan, bool tx) |
Prepare a channel for communication.
Perform any sort of initialization required by a channel to be able to send or receive data.
| transport | transport device |
| chan | channel to prepare |
| tx | true if channel is TX, false if channel is RX |
| 0 | if successful |
| <0 | negative errno code if failure |