SCMI transport driver operations.
More...
#include <zephyr/drivers/firmware/scmi/transport.h>
SCMI transport driver operations.
This structure contains the set of operations to be implemented by all transport drivers.
◆ channel_is_free
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.
- Parameters
-
| transport | device |
| chan | TX channel to query |
- Return values
-
| 0 | if successful |
| <0 | negative errno code if failure |
◆ init
| 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.
- Note
- this operation is optional.
- Parameters
-
| transport | transport device |
- Return values
-
| 0 | is successful |
| <0 | negative errno code if failure |
◆ read_message
Read a message from the platform.
Used to read/receive a message from the platform over a given RX channel.
- Parameters
-
| transport | transport device |
| chan | channel used to receive the message |
| msg | message to receive |
- Return values
-
| 0 | if successful |
| <0 | negative errno code if failure |
◆ request_channel
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.
- Note
- this operation is optional
- Parameters
-
| 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 |
- Return values
-
| pointer | to the channel bound to given protocol if successful |
| NULL | if failure |
◆ send_message
Send a message to the platform.
Used to send a message to the platform over a given TX channel.
- Parameters
-
| transport | transport device |
| chan | channel used to send the message |
| msg | message to send |
- Return values
-
| 0 | if successful |
| <0 | negative errno code if failure |
◆ setup_chan
Prepare a channel for communication.
Perform any sort of initialization required by a channel to be able to send or receive data.
- Parameters
-
| transport | transport device |
| chan | channel to prepare |
| tx | true if channel is TX, false if channel is RX |
- Return values
-
| 0 | if successful |
| <0 | negative errno code if failure |
The documentation for this struct was generated from the following file: