Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad98211b authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet
Browse files

mailbox.txt: standardize document format



Each text file under Documentation follows a different
format. Some doesn't even have titles!

Change its representation to follow the adopted standard,
using ReST markups for it to be parseable by Sphinx:

- Add markups for section titles;
- Use :Author: for authorship;
- Mark literal block as such and ident it.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 7b001bff
Loading
Loading
Loading
Loading
+97 −88
Original line number Diff line number Diff line
============================
The Common Mailbox Framework
		Jassi Brar <jaswinder.singh@linaro.org>
============================

:Author: Jassi Brar <jaswinder.singh@linaro.org>

This document aims to help developers write client and controller
drivers for the API. But before we start, let us note that the
@@ -13,12 +16,15 @@ similar copies of code written for each platform. Having said that,
nothing prevents the remote f/w to also be Linux based and use the
same api there. However none of that helps us locally because we only
ever deal at client's protocol level.

Some of the choices made during implementation are the result of this
peculiarity of this "common" framework.



	Part 1 - Controller Driver (See include/linux/mailbox_controller.h)
Controller Driver (See include/linux/mailbox_controller.h)
==========================================================


Allocate mbox_controller and the array of mbox_chan.
Populate mbox_chan_ops, except peek_data() all are mandatory.
@@ -30,12 +36,15 @@ the controller driver should set via 'txdone_irq' or 'txdone_poll'
or neither.


	Part 2 - Client Driver (See include/linux/mailbox_client.h)
Client Driver (See include/linux/mailbox_client.h)
==================================================


The client might want to operate in blocking mode (synchronously
send a message through before returning) or non-blocking/async mode (submit
a message and a callback function to the API and return immediately).

::

	struct demo_client {
		struct mbox_client cl;