[PATCH 1/3] omap mailbox: extend API to take a callback param
From: ext Ohad Ben-Cohen o...@wizery.com Let mailbox users set the callback pointer via the omap_mbox_get API, instead of having users directly manipulating the mailbox structures. Signed-off-by: Ohad Ben-Cohen o...@wizery.com Signed-off-by: Hiroshi DOYU hiroshi.d...@nokia.com --- arch/arm/plat-omap/include/plat/mailbox.h |2 +- arch/arm/plat-omap/mailbox.c |4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h index 9976565..0b45664 100644 --- a/arch/arm/plat-omap/include/plat/mailbox.h +++ b/arch/arm/plat-omap/include/plat/mailbox.h @@ -62,7 +62,7 @@ struct omap_mbox { int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg); void omap_mbox_init_seq(struct omap_mbox *); -struct omap_mbox *omap_mbox_get(const char *); +struct omap_mbox *omap_mbox_get(const char *name, int (*callback)(void *)); void omap_mbox_put(struct omap_mbox *); int omap_mbox_register(struct device *parent, struct omap_mbox **); diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index d2fafb8..14b716d 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c @@ -305,7 +305,7 @@ static void omap_mbox_fini(struct omap_mbox *mbox) } } -struct omap_mbox *omap_mbox_get(const char *name) +struct omap_mbox *omap_mbox_get(const char *name, int (*callback)(void *)) { struct omap_mbox *mbox; int ret; @@ -324,6 +324,8 @@ struct omap_mbox *omap_mbox_get(const char *name) if (ret) return ERR_PTR(-ENODEV); + mbox-rxq-callback = callback; + return mbox; } EXPORT_SYMBOL(omap_mbox_get); -- 1.7.1.rc2 -- 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
Re: [PATCH 1/3] omap mailbox: extend API to take a callback param
Hi Hiroshi, Please consider waiting with pulling of these three patches. After discussions in l-o, we realized some more work is needed to support OMAP4 multiple senders scenarios. Such work can completely replace these 3 patches (retaining their functionality but adding multiple senders/receivers support). Thanks, Ohad. On Fri, Jul 2, 2010 at 3:05 PM, Hiroshi DOYU hiroshi.d...@nokia.com wrote: From: ext Ohad Ben-Cohen o...@wizery.com Let mailbox users set the callback pointer via the omap_mbox_get API, instead of having users directly manipulating the mailbox structures. Signed-off-by: Ohad Ben-Cohen o...@wizery.com Signed-off-by: Hiroshi DOYU hiroshi.d...@nokia.com --- arch/arm/plat-omap/include/plat/mailbox.h | 2 +- arch/arm/plat-omap/mailbox.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h index 9976565..0b45664 100644 --- a/arch/arm/plat-omap/include/plat/mailbox.h +++ b/arch/arm/plat-omap/include/plat/mailbox.h @@ -62,7 +62,7 @@ struct omap_mbox { int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg); void omap_mbox_init_seq(struct omap_mbox *); -struct omap_mbox *omap_mbox_get(const char *); +struct omap_mbox *omap_mbox_get(const char *name, int (*callback)(void *)); void omap_mbox_put(struct omap_mbox *); int omap_mbox_register(struct device *parent, struct omap_mbox **); diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index d2fafb8..14b716d 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c @@ -305,7 +305,7 @@ static void omap_mbox_fini(struct omap_mbox *mbox) } } -struct omap_mbox *omap_mbox_get(const char *name) +struct omap_mbox *omap_mbox_get(const char *name, int (*callback)(void *)) { struct omap_mbox *mbox; int ret; @@ -324,6 +324,8 @@ struct omap_mbox *omap_mbox_get(const char *name) if (ret) return ERR_PTR(-ENODEV); + mbox-rxq-callback = callback; + return mbox; } EXPORT_SYMBOL(omap_mbox_get); -- 1.7.1.rc2 -- 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 -- 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
Re: [PATCH 1/3] omap mailbox: extend API to take a callback param
From: ext Ohad Ben-Cohen o...@wizery.com Subject: Re: [PATCH 1/3] omap mailbox: extend API to take a callback param Date: Fri, 2 Jul 2010 14:16:29 +0200 Hi Hiroshi, Please consider waiting with pulling of these three patches. After discussions in l-o, we realized some more work is needed to support OMAP4 multiple senders scenarios. Such work can completely replace these 3 patches (retaining their functionality but adding multiple senders/receivers support). Ok. It would be nice if you send patches to LOML and LAKML too for next time. -- 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
Re: [PATCH 1/3] omap mailbox: extend API to take a callback param
On Fri, Jul 2, 2010 at 3:23 PM, Hiroshi DOYU hiroshi.d...@nokia.com wrote: It would be nice if you send patches to LOML and LAKML too for next time. Sure. -- 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 -- 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