File: /usr/src/linux/drivers/acpi/ospm/include/ac.h

1     /*****************************************************************************
2      *
3      * Module Name: ac.h
4      *   $Revision: 6 $
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 __AC_H__
28     #define __AC_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 AC_NOTIFY_STATUS_CHANGE	((BM_NOTIFY) 0x80)
44     
45     /*
46      * Hardware IDs:
47      * -------------
48      */
49     #define AC_HID_AC_ADAPTER	"ACPI0003"
50     
51     
52     /*
53      * Device Context:
54      * ---------------
55      */
56     typedef struct
57     {
58     	BM_HANDLE		device_handle;
59     	acpi_handle		acpi_handle;
60     	char			uid[9];
61     	u32 			is_online;
62     } AC_CONTEXT;
63     
64     
65     /*****************************************************************************
66      *                              Function Prototypes
67      *****************************************************************************/
68     
69     acpi_status
70     ac_initialize (void);
71     
72     acpi_status
73     ac_terminate (void);
74     
75     acpi_status
76     ac_notify (
77     	u32			notify_type,
78     	u32 			device,
79     	void			**context);
80     
81     acpi_status
82     ac_request(
83     	BM_REQUEST		*request_info,
84     	void			*context);
85     
86     /* AC Adapter Driver OSL */
87     
88     acpi_status
89     ac_osl_add_device (
90     	AC_CONTEXT		*ac_adapter);
91     
92     acpi_status
93     ac_osl_remove_device (
94     	AC_CONTEXT		*ac_adapter);
95     
96     acpi_status
97     ac_osl_generate_event (
98     	u32			event,
99     	AC_CONTEXT		*ac_adapter);
100     
101     
102     #endif	/* __AC_H__ */
103