13#ifndef _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_TRANSPORT_H_
14#define _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_TRANSPORT_H_
207scmi_transport_request_channel(
const struct device *transport,
223static inline int scmi_transport_init(
const struct device *transport)
229 return api->init(transport);
238static inline int scmi_transport_setup_chan(
const struct device *transport,
245 if (!api || !api->setup_chan) {
249 return api->setup_chan(transport, chan, tx);
255static inline int scmi_transport_send_message(
const struct device *transport,
263 if (!api || !api->send_message) {
267 return api->send_message(transport, chan, msg, use_polling);
273static inline int scmi_transport_read_message(
const struct device *transport,
280 if (!api || !api->read_message) {
284 return api->read_message(transport, chan, msg);
290static inline bool scmi_transport_channel_is_free(
const struct device *transport,
296 if (!api || !api->channel_is_free) {
300 return api->channel_is_free(transport, chan);
312int scmi_core_transport_init(
const struct device *transport);
void(* scmi_channel_cb)(struct scmi_channel *chan)
Callback function for message replies.
Definition transport.h:43
#define ENOSYS
Function not implemented.
Definition errno.h:82
#define NULL
Definition iar_missing_defs.h:20
#define bool
Definition stdbool.h:13
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Runtime device structure (in ROM) per driver instance.
Definition device.h:513
const void * api
Address of the API structure exposed by the device instance.
Definition device.h:519
Mutex Structure.
Definition kernel.h:3402
Semaphore structure.
Definition kernel.h:3607
SCMI channel structure.
Definition transport.h:53
void * data
channel private data
Definition transport.h:55
scmi_channel_cb cb
callback function.
Definition transport.h:62
SCMI message structure.
Definition protocol.h:110
SCMI transport driver operations.
Definition transport.h:91
int(* init)(const struct device *transport)
Initialize the transport driver.
Definition transport.h:105
int(* setup_chan)(const struct device *transport, struct scmi_channel *chan, bool tx)
Prepare a channel for communication.
Definition transport.h:142
struct scmi_channel *(* request_channel)(const struct device *transport, uint32_t proto, bool tx)
Request a channel dynamically.
Definition transport.h:197
bool(* channel_is_free)(const struct device *transport, struct scmi_channel *chan)
Check if a TX channel is free.
Definition transport.h:177
int(* read_message)(const struct device *transport, struct scmi_channel *chan, struct scmi_message *msg)
Read a message from the platform.
Definition transport.h:159
int(* send_message)(const struct device *transport, struct scmi_channel *chan, struct scmi_message *msg, bool use_polling)
Send a message to the platform.
Definition transport.h:124