diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-12-21 20:36:04 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-12-21 20:36:04 +0000 |
commit | 886a1c5b10c444b7ea32adf0e932600184886ba3 (patch) | |
tree | cd93c6d6afedc7abcf6dab0c444ea5dec63c644f /sys/arch/zaurus/dev | |
parent | a5c6c38ac3744b7a3b50cbe6e65213711ae19006 (diff) |
sysctl machdep.lidsuspend=1 makes screen closures to cause a suspend.
(opening the screen does not yet wake the machine up, not yet sure if
that is even possible yet)
Diffstat (limited to 'sys/arch/zaurus/dev')
-rw-r--r-- | sys/arch/zaurus/dev/zaurus_kbd.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/arch/zaurus/dev/zaurus_kbd.c b/sys/arch/zaurus/dev/zaurus_kbd.c index 00e7fc16ccc..594055ba5c1 100644 --- a/sys/arch/zaurus/dev/zaurus_kbd.c +++ b/sys/arch/zaurus/dev/zaurus_kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zaurus_kbd.c,v 1.27 2005/12/20 18:53:09 deraadt Exp $ */ +/* $OpenBSD: zaurus_kbd.c,v 1.28 2005/12/21 20:36:03 deraadt Exp $ */ /* * Copyright (c) 2005 Dale Rahn <drahn@openbsd.org> * @@ -443,6 +443,7 @@ static int zkbdondown; /* on key is pressed */ static struct timeval zkbdontv = { 0, 0 }; /* last on key event */ const struct timeval zkbdhalttv = { 3, 0 }; /* 3s for safe shutdown */ const struct timeval zkbdsleeptv = { 0, 250000 }; /* .25s for suspend */ +extern int lid_suspend; #endif int @@ -497,11 +498,16 @@ zkbd_hinge(void *v) sc->sc_hinge = a | b; - if (sc->sc_hinge == 3) + if (sc->sc_hinge == 3) { +#if NAPM > 0 + if (lid_suspend) + apm_suspends++; +#endif lcd_blank(1); - else + } else lcd_blank(0); + return 1; } |