:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / drivers / bus / acpi / ospm / include / bn.h
1 /******************************************************************************
2  *
3  * Module Name: bn.h
4  *   $Revision$
5  *
6  *****************************************************************************/
7
8 /*
9  *  Copyright (C) 2000, 2001 Andrew Grover
10  *
11  *  This program is free software; you can redistribute it and/or modify
12  *  it under the terms of the GNU General Public License as published by
13  *  the Free Software Foundation; either version 2 of the License, or
14  *  (at your option) any later version.
15  *
16  *  This program is distributed in the hope that it will be useful,
17  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  *  GNU General Public License for more details.
20  *
21  *  You should have received a copy of the GNU General Public License
22  *  along with this program; if not, write to the Free Software
23  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24  */
25
26
27 #ifndef __BN_H__
28 #define __BN_H__
29
30 #include <actypes.h>
31 #include <acexcep.h>
32 #include <bm.h>
33
34
35 /*****************************************************************************
36  *                            Types & Other Defines
37  *****************************************************************************/
38
39 /*
40  * Notifications:
41  * ---------------------
42  */
43 #define BN_NOTIFY_STATUS_CHANGE         ((BM_NOTIFY) 0x80)
44
45 /*
46  * Types:
47  * ------
48  */
49 #define BN_TYPE_POWER_BUTTON            (0x01)
50 #define BN_TYPE_POWER_BUTTON_FIXED      (0x02)
51 #define BN_TYPE_SLEEP_BUTTON            (0x03)
52 #define BN_TYPE_SLEEP_BUTTON_FIXED      (0x04)
53 #define BN_TYPE_LID_SWITCH              (0x05)
54
55 /*
56  * Hardware IDs:
57  * -------------
58  * TODO: Power and Sleep button HIDs also exist in <bm.h>.  Should all
59  *       HIDs (ACPI well-known devices) exist in one place (e.g. 
60  *       acpi_hid.h)?
61  */
62 #define BN_HID_POWER_BUTTON             "PNP0C0C"
63 #define BN_HID_SLEEP_BUTTON             "PNP0C0E"
64 #define BN_HID_LID_SWITCH               "PNP0C0D"
65
66 /*
67  * /proc Entries:
68  * --------------
69  */
70 #define BN_PROC_ROOT                    "button"
71 #define BN_PROC_POWER_BUTTON            "power"
72 #define BN_PROC_SLEEP_BUTTON            "sleep"
73 #define BN_PROC_LID_SWITCH              "lid"
74
75 /*
76  * Device Context:
77  * ---------------
78  */
79 typedef struct
80 {
81         BM_HANDLE               device_handle;
82         ACPI_HANDLE             acpi_handle;
83         u32                     type;
84 } BN_CONTEXT;
85
86
87 /******************************************************************************
88  *                              Function Prototypes
89  *****************************************************************************/
90
91 ACPI_STATUS
92 bn_initialize (void);
93
94 ACPI_STATUS
95 bn_terminate (void);
96
97 ACPI_STATUS
98 bn_notify_fixed (
99         void                    *context);
100
101 ACPI_STATUS
102 bn_notify (
103         u32                     notify_type,
104         u32                     device,
105         void                    **context);
106
107 ACPI_STATUS
108 bn_request(
109         BM_REQUEST              *request_info,
110         void                    *context);
111
112
113 #endif  /* __BN_H__ */