On Tue, Nov 11, 2014 at 05:33:28PM +0100, Arnd Bergmann wrote:
On Tuesday 11 November 2014 19:27:07 Jassi Brar wrote:
In even simpler terms.... I prefer controller specific encoding(0x50434300) instead of controller specific api (pcc_mbox_request_channel). For a different class of controller, it is much cleaner to define a new encoding as compared to another xyz_mbox_request_channel() api.
The problem with this approach is that it still leaves the interface as controller specific, because the client now has to know that it must pass the PCC identifier instead of an index.
Further to what Arnd is saying here what all these various patterns for looking up PCC mailboxes are saying to me is that whatever we're doing there's probably a place for a helper API that implements them; even if it's just a thin inline wrapper in a header somewhere it saves everyone having to get it right and means if we do get a DT binding or whatever they all magically end up with support.