android 休眠与唤醒
s3c6410 android 总有一个非限时锁阻止进入suspend
在内核中添加打印的:
has_wake_lock_locked()中添加
static long has_wake_lock_locked(int type)
{
struct wake_lock *lock, *n;
long max_timeout = 0;
BUG_ON(type >= WAKE_LOCK_TYPE_COUNT);
list_for_each_entry_safe(lock, n, &active_wake_locks[type], link) {
if (lock->flags & WAKE_LOCK_AUTO_EXPIRE) {//超时锁
long timeout = lock->expires - jiffies;
if (timeout <= 0)
expire_wake_lock(lock);
else if (timeout > max_timeout)
max_timeout = timeout;
} else
{
printk("lockname = %s,lockflag = ox%x\n, type= %d\n",lock->name,lock->flags,type);return -1;
}
}
return max_timeout;
}