#include <linux/err.h>
#include <linux/device.h>
#include <linux/mailbox_client.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/slab.h>
#include "common.h"
struct scmi_mailbox { … };
#define client_to_scmi_mailbox(c) …
static void tx_prepare(struct mbox_client *cl, void *m)
{ … }
static void rx_callback(struct mbox_client *cl, void *m)
{ … }
static bool mailbox_chan_available(struct device_node *of_node, int idx)
{ … }
static int mailbox_chan_validate(struct device *cdev, int *a2p_rx_chan,
int *p2a_chan, int *p2a_rx_chan)
{ … }
static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev,
bool tx)
{ … }
static int mailbox_chan_free(int id, void *p, void *data)
{ … }
static int mailbox_send_message(struct scmi_chan_info *cinfo,
struct scmi_xfer *xfer)
{ … }
static void mailbox_mark_txdone(struct scmi_chan_info *cinfo, int ret,
struct scmi_xfer *__unused)
{ … }
static void mailbox_fetch_response(struct scmi_chan_info *cinfo,
struct scmi_xfer *xfer)
{ … }
static void mailbox_fetch_notification(struct scmi_chan_info *cinfo,
size_t max_len, struct scmi_xfer *xfer)
{ … }
static void mailbox_clear_channel(struct scmi_chan_info *cinfo)
{ … }
static bool
mailbox_poll_done(struct scmi_chan_info *cinfo, struct scmi_xfer *xfer)
{ … }
static const struct scmi_transport_ops scmi_mailbox_ops = …;
const struct scmi_desc scmi_mailbox_desc = …;