Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/arch/hpcmips/vr Pull up revision 1.8 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/07050f572920
branches:  netbsd-1-5
changeset: 488904:07050f572920
user:      takemura <takemura%NetBSD.org@localhost>
date:      Sun Aug 06 04:32:24 2000 +0000

description:
Pull up revision 1.8 (requested by takemura)

New power management function.

diffstat:

 sys/arch/hpcmips/vr/vrpmu.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (39 lines):

diff -r a421623525ed -r 07050f572920 sys/arch/hpcmips/vr/vrpmu.c
--- a/sys/arch/hpcmips/vr/vrpmu.c       Sun Aug 06 04:27:36 2000 +0000
+++ b/sys/arch/hpcmips/vr/vrpmu.c       Sun Aug 06 04:32:24 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vrpmu.c,v 1.7 2000/04/03 04:32:00 sato Exp $   */
+/*     $NetBSD: vrpmu.c,v 1.7.4.1 2000/08/06 04:32:24 takemura Exp $   */
 
 /*
  * Copyright (c) 1999 M. Warner Losh.  All rights reserved.
@@ -43,8 +43,6 @@
 #include <hpcmips/vr/bcureg.h>
 #endif
 
-int vrpmu_pwstate = 1;
-
 #ifdef VRPMUDEBUG
 #define DEBUG_BOOT     0x1     /* boot time */
 #define DEBUG_INTR     0x2     /* intr */
@@ -290,13 +288,15 @@
        if (intstat1 & PMUINT_BATTINTR)
                ;
        if (intstat1 & PMUINT_POWERSW) {
-               vrpmu_pwstate = !vrpmu_pwstate;
+               /*
+                * you can't detect when the button is released
+                */
                config_hook_call(CONFIG_HOOK_BUTTONEVENT,
                                 CONFIG_HOOK_BUTTONEVENT_POWER,
-                                (void*)vrpmu_pwstate);
-               config_hook_call(CONFIG_HOOK_POWERCONTROL,
-                                CONFIG_HOOK_POWERCONTROL_LCD,
-                                (void*)vrpmu_pwstate);
+                                (void*)1 /* on */);
+               config_hook_call(CONFIG_HOOK_BUTTONEVENT,
+                                CONFIG_HOOK_BUTTONEVENT_POWER,
+                                (void*)0 /* off */);
        }
 
        if (intstat2 & PMUINT_GPIO12)



Home | Main Index | Thread Index | Old Index