devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lubomir Rintel <lkundrak@v3.sk>
To: Jassi Brar <jaswinder.singh@linaro.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv7 2/5] mailbox: Introduce framework for mailbox
Date: Fri, 20 Jun 2014 20:05:16 +0200	[thread overview]
Message-ID: <1403287516.7614.9.camel@odvarok.lan> (raw)
In-Reply-To: <1402592479-7244-1-git-send-email-jaswinder.singh@linaro.org>

On Thu, 2014-06-12 at 22:31 +0530, Jassi Brar wrote:
> Introduce common framework for client/protocol drivers and
> controller drivers of Inter-Processor-Communication (IPC).
> 
> Client driver developers should have a look at
>  include/linux/mailbox_client.h to understand the part of
> the API exposed to client drivers.
> Similarly controller driver developers should have a look
> at include/linux/mailbox_controller.h
>
> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>

> +/**
> + * mbox_chan_received_data - A way for controller driver to push data
> + *				received from remote to the upper layer.
> + * @chan: Pointer to the mailbox channel on which RX happened.
> + * @data: Client specific message typecasted as void *

It's "mssg", not "data".

> +static struct mbox_chan *
> +of_mbox_index_xlate(struct mbox_controller *mbox,
> +				const struct of_phandle_args *sp)

The line break here is inconsistent with how the rest of the file is
formatted.

> +/**
> + * struct mbox_controller - Controller of a class of communication chans
> + * @dev:		Device backing this controller
> + * @controller_name:	Literal name of the controller.
> + * @ops:		Operators that work on each communication chan
> + * @chans:		Null terminated array of chans.

This needs to be updated for current API. It's neither not NULL
terminated nor and array and num_chans documentation is missing.

> + * @txdone_irq:		Indicates if the controller can report to API when
> + *			the last transmitted data was read by the remote.
> + *			Eg, if it has some TX ACK irq.
> + * @txdone_poll:	If the controller can read but not report the TX
> + *			done. Ex, some register shows the TX status but
> + *			no interrupt rises. Ignored if 'txdone_irq' is set.
> + * @txpoll_period:	If 'txdone_poll' is in effect, the API polls for
> + *			last TX's status after these many millisecs
> + */
> +struct mbox_controller {
> +	struct device *dev;
> +	struct mbox_chan_ops *ops;
> +	struct mbox_chan *chans;
> +	int num_chans;
> +	bool txdone_irq;
> +	bool txdone_poll;
> +	unsigned txpoll_period;
> +	struct mbox_chan *(*of_xlate)(struct mbox_controller *mbox,
> +					const struct of_phandle_args *sp);
> +	/*
> +	 * If the controller supports only TXDONE_BY_POLL,
> +	 * this timer polls all the links for txdone.
> +	 */
> +	struct timer_list poll;
> +	unsigned period;
> +	/* Hook to add to the global controller list */
> +	struct list_head node;
> +};

Thank you,
Lubo

  parent reply	other threads:[~2014-06-20 18:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12 16:58 [PATCHv7 0/5] Common Mailbox Framework Jassi Brar
2014-06-12 17:00 ` [PATCHv7 1/5] mailbox: rename pl320-ipc specific mailbox.h Jassi Brar
2014-06-12 17:01 ` [PATCHv7 3/5] Mailbox: Generic: Specify mailbox api bindings Jassi Brar
     [not found] ` <1402592317-7043-1-git-send-email-jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-06-12 17:01   ` [PATCHv7 2/5] mailbox: Introduce framework for mailbox Jassi Brar
     [not found]     ` <1402592479-7244-1-git-send-email-jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-06-13 20:40       ` Mark Brown
2014-06-18  0:27       ` Kevin Hilman
     [not found]         ` <7hionz9i5e.fsf-4poPxKt068f/PtFMR13I2A@public.gmane.org>
2014-06-18  8:33           ` Jassi Brar
     [not found]             ` <CAJe_ZhcuOa39Db_tE4JupY74aze02=v1FWzduFD0sO15nMrKvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-18 17:03               ` Kevin Hilman
2014-06-19  2:55                 ` Jassi Brar
2014-06-19 12:14                   ` Ashwin Chaugule
2014-06-19 12:36                   ` Sudeep Holla
2014-06-19 18:17     ` Sudeep Holla
2014-06-19 19:03       ` Matt Porter
2014-06-19 20:29         ` Jassi Brar
2014-06-19 20:40           ` Matt Porter
2014-06-20 15:25         ` Sudeep Holla
2014-06-19 20:21       ` Jassi Brar
2014-06-20 16:07         ` Sudeep Holla
2014-06-20 16:30           ` Jassi Brar
2014-06-20 16:58             ` Sudeep Holla
2014-06-20 18:05     ` Lubomir Rintel [this message]
2014-06-22 10:56     ` Lubomir Rintel
2014-06-12 17:02   ` [PATCHv7 4/5] mailbox: Fix deleteing poll timer Jassi Brar
2014-06-12 17:02   ` [PATCHv7 5/5] MAINTAINERS: Add maintainer entry for Mailbox API Jassi Brar
2014-06-30 16:16   ` [PATCHv7 0/5] Common Mailbox Framework Lubomir Rintel
2014-06-30 16:22     ` Jassi Brar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403287516.7614.9.camel@odvarok.lan \
    --to=lkundrak@v3.sk \
    --cc=devicetree@vger.kernel.org \
    --cc=jaswinder.singh@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).