summaryrefslogtreecommitdiff
path: root/pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'pm.c')
-rw-r--r--pm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pm.c b/pm.c
index 32cfe59..90b7430 100644
--- a/pm.c
+++ b/pm.c
@@ -35,6 +35,7 @@
#define SHIFT_UNLOCK 4
#define SHIFT_UNLOCK_PARAMETER 12
#define SHIFT_CHANGE_STATE 8
+#define SHIFT_HOLD_KEY_BLOCK 16
#define TIMEOUT_RESET_BIT 0x80
struct pwr_msg {
@@ -113,6 +114,9 @@ API int pm_lock_state(unsigned int s_bits, unsigned int flag,
if (flag & GOTO_STATE_NOW)
/* if the flag is true, go to the locking state directly */
s_bits = s_bits | (s_bits << SHIFT_CHANGE_STATE);
+ if (flag & HOLD_KEY_BLOCK)
+ s_bits = s_bits | (1 << SHIFT_HOLD_KEY_BLOCK);
+
return send_msg(s_bits, timeout);
}