Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
scmi_transport_api Struct Reference

SCMI transport driver operations. More...

#include <zephyr/drivers/firmware/scmi/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)
 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.

Detailed Description

SCMI transport driver operations.

This structure contains the set of operations to be implemented by all transport drivers.

Field Documentation

◆ channel_is_free

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.

Parameters
transportdevice
chanTX channel to query
Return values
0if successful
<0negative 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
transporttransport device
Return values
0is successful
<0negative errno code if failure

◆ read_message

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.

Parameters
transporttransport device
chanchannel used to receive the message
msgmessage to receive
Return values
0if successful
<0negative errno code if failure

◆ request_channel

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.

Note
this operation is optional
Parameters
transporttransport device
protoID of the protocol for which the channel is requested
txtrue if channel is TX, false if channel is RX
Return values
pointerto the channel bound to given protocol if successful
NULLif failure

◆ send_message

int(* scmi_transport_api::send_message) (const struct device *transport, struct scmi_channel *chan, struct scmi_message *msg)

Send a message to the platform.

Used to send a message to the platform over a given TX channel.

Parameters
transporttransport device
chanchannel used to send the message
msgmessage to send
Return values
0if successful
<0negative errno code if failure

◆ setup_chan

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.

Parameters
transporttransport device
chanchannel to prepare
txtrue if channel is TX, false if channel is RX
Return values
0if successful
<0negative errno code if failure

The documentation for this struct was generated from the following file: