Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-19 Thread Jassi Brar
On 19 February 2014 01:17, Courtney Cavin wrote: > On Tue, Feb 18, 2014 at 08:06:55AM +0100, Jassi Brar wrote: >> >> >> +void *ipc_request_channel(struct ipc_client *cl) >> >> +{ > [...] >> >> + spin_lock_irqsave(&chan->lock, flags); >> >> + chan->msg_fr

Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-19 Thread Jassi Brar
Hi Kumar, On 19 February 2014 03:02, Kumar Gala wrote: > > On Feb 15, 2014, at 12:25 PM, 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

Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-18 Thread Kumar Gala
On Feb 15, 2014, at 12:25 PM, 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 expos

Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-18 Thread Courtney Cavin
On Tue, Feb 18, 2014 at 08:06:55AM +0100, Jassi Brar wrote: > On 18 February 2014 06:22, Courtney Cavin > wrote: > > On Sat, Feb 15, 2014 at 07:25:27PM +0100, Jassi Brar wrote: > > >> +request_token_t ipc_send_message(void *channel, void *mssg) > >> +{ > >> + struct ipc_chan *chan = (struc

Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-18 Thread Jassi Brar
On Tue, Feb 18, 2014 at 11:00 PM, Bjorn Andersson wrote: > On Mon, Feb 17, 2014 at 11:06 PM, Jassi Brar > wrote: >> Hi Courtney, >> >> On 18 February 2014 06:22, Courtney Cavin >> wrote: >>> On Sat, Feb 15, 2014 at 07:25:27PM +0100, Jassi Brar wrote: > [...] +struct ipc_client { >>> >>> I

Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-18 Thread Bjorn Andersson
On Mon, Feb 17, 2014 at 11:06 PM, Jassi Brar wrote: > Hi Courtney, > > On 18 February 2014 06:22, Courtney Cavin > wrote: >> On Sat, Feb 15, 2014 at 07:25:27PM +0100, Jassi Brar wrote: [...] >>> +struct ipc_client { >> >> I'm not so sure about the naming scheme here. This header is >> mailbox_c

Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-17 Thread Jassi Brar
Hi Courtney, On 18 February 2014 06:22, Courtney Cavin wrote: > On Sat, Feb 15, 2014 at 07:25:27PM +0100, Jassi Brar wrote: >> +request_token_t ipc_send_message(void *channel, void *mssg) >> +{ >> + struct ipc_chan *chan = (struct ipc_chan *)channel; >> + request_token_t t; >> + >> +

Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-17 Thread Courtney Cavin
On Sat, Feb 15, 2014 at 07:25:27PM +0100, 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

Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-16 Thread Greg KH
On Sun, Feb 16, 2014 at 12:06:44PM +0530, Jassi Brar wrote: > >> +void ipc_links_unregister(struct ipc_controller *ipc) > >> +{ > >> + struct ipc_con *t, *con = NULL; > >> + struct ipc_chan *chan; > >> + > >> + mutex_lock(&con_mutex); > >> + > >> + list_for_each_entry(t, &ipc_cons,

Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-15 Thread Jassi Brar
[merging replies in one post] On Sun, Feb 16, 2014 at 12:45 AM, Greg KH wrote: > On Sat, Feb 15, 2014 at 11:55:27PM +0530, Jassi Brar wrote: >> +/* >> + * Call for IPC controller drivers to register a controller, adding >> + * its channels/mailboxes to the global pool. >> + */ >> +int ipc_links_r

Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-15 Thread Greg KH
On Sat, Feb 15, 2014 at 11:55:27PM +0530, Jassi Brar wrote: > +/* > + * Call for IPC controller drivers to register a controller, adding > + * its channels/mailboxes to the global pool. > + */ > +int ipc_links_register(struct ipc_controller *ipc) > +{ > + int i, num_links, txdone; > + struc

Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-15 Thread Greg KH
On Sat, Feb 15, 2014 at 11:55:27PM +0530, Jassi Brar wrote: > +/* > + * After 'startup' and before 'shutdown', the IPC controller driver > + * notifies the API of data received over the link. > + * The controller driver should make sure the 'RTR' is de-asserted since > + * reception of the packet a

Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-15 Thread Greg KH
On Sat, Feb 15, 2014 at 11:55:27PM +0530, Jassi Brar wrote: > +typedef unsigned request_token_t; Ick. Why add a new typedef? And if you do need this, drop the "_t" on the end please. Why not just rely on an unsigned int? Or long? Do you really need a new type? thanks, greg k-h -- To unsubsc

Re: [PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-15 Thread Greg KH
On Sat, Feb 15, 2014 at 11:55:27PM +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

[PATCHv3 2/6] mailbox: Introduce a new common API

2014-02-15 Thread Jassi Brar
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 s