diff options
author | Huzefa Kankroliwala <huzefank@ti.com> | 2012-05-31 10:24:02 -0500 |
---|---|---|
committer | Xavier Boudet <x-boudet@ti.com> | 2012-11-05 14:24:58 +0100 |
commit | 85dab720cadfe1b313316abc354c0da6e4546053 (patch) | |
tree | 1bdcb8b77a94e298c01f20b13d49788fa3e89239 /arch | |
parent | 8f5391f8e3625a9c9cedc4c33e522075fd1765ef (diff) |
hwspinlock: modify API to select mutex or spinlock
In the current implementation of hwspinlock driver, if a client
wishes to use it's locking APIs from a context that may sleep it
results in a kernel warning backtrace since it uses spinlock
for locking within the driver. This patch modifies the
hwspin_lock_request API which passes an extra parameter to let
the client choose which lock the driver may use.
If a client wishes to call the hwspinlock APIs only from a context
that may sleep it can pass USE_MUTEX_LOCK parameter but if it wishes
to call it in interrupt context or any other context it can pass
USE_SPIN_LOCK parameter. In this case it will not be able to call
these APIs from a context that sleeps.
This was required to accomodate clients like I2C driver which
call these APIs from a context that may sleep.
Change-Id: Iefc0b266fa3ed702aad425d6000e4709c768a40c
Signed-off-by: Huzefa Kankroliwala <huzefank@ti.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions