>> -----Original Message-----
>> From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
>> ow...@vger.kernel.org] On Behalf Of Ohad Ben-Cohen
>> Sent: Tuesday, June 22, 2010 7:12 PM
>> To: linux-omap@vger.kernel.org
>> Cc: Hiroshi Doyu; Ramirez Luna, Omar; Ohad Ben-Cohen
>> Subject: [PATCH 1/4] omap mailbox: extend API to take a callback param
>>
>> Let mailbox users set the callback pointer via the
>> omap_mbox_get API, instead of having users directly
>> manipulating the mailbox structures.


On Thu, Jun 24, 2010 at 6:02 PM, Kanigeri, Hari <h-kanige...@ti.com> wrote:
> Looks good.

PCMIIW: from your other mail, I now understand that on OMAP4 you call
omap_mbox_get several times to allow several concurrent mbox senders.

If that's the case, this new API concept is a bit broken: it should
allow several senders to call it, but will only support a single rx
callback (probably by ignoring NULL callbacks, but that's not really
safe).

We have two options here:

1. do not extend omap_mbox_get to get a callback. instead, add a new
API that explicitely sets the callback pointer.

2. do extend omap_mbox_get to get a callback, but then employ
something like a notifier chain of callbacks, essentially supporting
multiple callbacks. this will allow a more flexible API, something
that Hiroshi also wanted.

I like (2) better.

What do you think ?

Thanks,
Ohad.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to