[PATCHv6 4/5] hwspinlock/core: add common OF helpers
From: Ohad Ben-Cohen <hidden>
Date: 2014-11-14 20:05:30
Also in:
linux-devicetree, linux-omap, lkml
From: Ohad Ben-Cohen <hidden>
Date: 2014-11-14 20:05:30
Also in:
linux-devicetree, linux-omap, lkml
On Fri, Nov 14, 2014 at 7:09 PM, Suman Anna [off-list ref] wrote:
quoted
It seems to me that hwspin_lock_request_specific failures should be used by clients to defer their probing. Why wouldn't such a simple solution work?
Because the API always returns NULL on failures and there is no way for the clients to figure out if the lock id passed is invalid or the bank containing the lock is not registered.
It seems to me this may always be the case - lock ids may be wrong and there's no way to fully validate them. Let's start with the simpler approach where hwspin_lock_request_specific failures are used by clients to defer their probing. If a real use case will require changes we can always do that later, though it seems to me the only gain by changing this API is to catch a small subset of fatal DT mistakes which will anyway be caught very early in the development. Thanks, Ohad.