Re: [PATCH 1/4] omap mailbox: extend API to take a callback param

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> -----Original Message-----
>> From: linux-omap-owner@xxxxxxxxxxxxxxx [mailto:linux-omap-
>> owner@xxxxxxxxxxxxxxx] On Behalf Of Ohad Ben-Cohen
>> Sent: Tuesday, June 22, 2010 7:12 PM
>> To: linux-omap@xxxxxxxxxxxxxxx
>> 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-kanigeri2@xxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux