Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\autosleep.c Create Date:2022-07-28 10:04:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:pm_autosleep_set_state

Proto:int pm_autosleep_set_state(suspend_state_t state)

Type:int

Parameter:

TypeParameterName
suspend_state_tstate
94  If state >= PM_SUSPEND_MAX Then Return -EINVAL
98  __pm_stay_awake(autosleep_ws)
100  mutex_lock( & Note: it is only safe to mutex_lock(&autosleep_lock) if a wakeup_source* is active, otherwise a deadlock with try_to_suspend() is possible.* Alternatively mutex_lock_interruptible() can be used. This will then fail)
102  autosleep_state = state
104  __pm_relax(autosleep_ws)
106  If state > PM_SUSPEND_ON Then
107  pm_wakep_autosleep_enabled(true)
108  queue_up_suspend_work()
109  Else
110  pm_wakep_autosleep_enabled(false)
113  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
114  Return 0