[PATCH v4 09/14] mailbox: Add Gunyah message queue mailbox
Bjorn Andersson
andersson at kernel.org
Thu Sep 29 09:59:08 PDT 2022
On Wed, Sep 28, 2022 at 12:56:28PM -0700, Elliot Berman wrote:
[..]
> diff --git a/drivers/mailbox/gunyah-msgq.c b/drivers/mailbox/gunyah-msgq.c
[..]
> +static int gh_msgq_send_data(struct mbox_chan *chan, void *data)
> +{
> + struct gunyah_msgq *msgq = mbox_chan_to_msgq(chan);
> + struct gunyah_msgq_tx_data *msgq_data = data;
The mailbox framework abstracts hardware mailboxes and @data
should be the data to be written to the hardware.
Using the void * to pass composite data types means that the client and
provider are tightly coupled and as such the mailbox framework does not
provide you any abstraction.
You also only expose a single channel, so a direct function call between
the two specific drivers would be a better fit.
Regards,
Bjorn
More information about the linux-arm-kernel
mailing list