diff options
author | Suman Anna <s-anna@ti.com> | 2015-03-04 21:01:14 -0500 |
---|---|---|
committer | Ohad Ben-Cohen <ohad@wizery.com> | 2015-05-02 02:54:30 -0400 |
commit | fb7737e949e31d8a71acee6bbb670f32dbd2a2c0 (patch) | |
tree | 57ba40cfa05ca8a34211f3cbd97f77625beeed0a /Documentation | |
parent | 0ce8cf2f31d661a27b7656e791acacb86eb58739 (diff) |
hwspinlock/core: add device tree support
This patch adds a new OF-friendly API of_hwspin_lock_get_id()
for hwspinlock clients to use/request locks from a hwspinlock
device instantiated through a device-tree blob. This new API
can be used by hwspinlock clients to get the id for a specific
lock using the phandle + args specifier, so that it can be
requested using the available hwspin_lock_request_specific()
API.
Signed-off-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
[small comment clarification]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/hwspinlock.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/hwspinlock.txt b/Documentation/hwspinlock.txt index 62f7d4ea6e26..61c1ee98e59f 100644 --- a/Documentation/hwspinlock.txt +++ b/Documentation/hwspinlock.txt | |||
@@ -48,6 +48,16 @@ independent, drivers. | |||
48 | ids for predefined purposes. | 48 | ids for predefined purposes. |
49 | Should be called from a process context (might sleep). | 49 | Should be called from a process context (might sleep). |
50 | 50 | ||
51 | int of_hwspin_lock_get_id(struct device_node *np, int index); | ||
52 | - retrieve the global lock id for an OF phandle-based specific lock. | ||
53 | This function provides a means for DT users of a hwspinlock module | ||
54 | to get the global lock id of a specific hwspinlock, so that it can | ||
55 | be requested using the normal hwspin_lock_request_specific() API. | ||
56 | The function returns a lock id number on success, -EPROBE_DEFER if | ||
57 | the hwspinlock device is not yet registered with the core, or other | ||
58 | error values. | ||
59 | Should be called from a process context (might sleep). | ||
60 | |||
51 | int hwspin_lock_free(struct hwspinlock *hwlock); | 61 | int hwspin_lock_free(struct hwspinlock *hwlock); |
52 | - free a previously-assigned hwspinlock; returns 0 on success, or an | 62 | - free a previously-assigned hwspinlock; returns 0 on success, or an |
53 | appropriate error code on failure (e.g. -EINVAL if the hwspinlock | 63 | appropriate error code on failure (e.g. -EINVAL if the hwspinlock |