ac.h 2.27 KB
Newer Older
Linus Torvalds's avatar
Linus Torvalds committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
/*****************************************************************************
 *
 * Module Name: ac.h
 *   $Revision: 6 $
 *
 *****************************************************************************/

/*
 *  Copyright (C) 2000, 2001 Andrew Grover
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */


#ifndef __AC_H__
#define __AC_H__

#include <actypes.h>
#include <acexcep.h>
#include <bm.h>


/*****************************************************************************
 *                            Types & Other Defines
 *****************************************************************************/

/*
 * Notifications:
 * --------------
 */
#define AC_NOTIFY_STATUS_CHANGE	((BM_NOTIFY) 0x80)

/*
 * Hardware IDs:
 * -------------
 */
#define AC_HID_AC_ADAPTER	"ACPI0003"


/*
 * Device Context:
 * ---------------
 */
typedef struct
{
	BM_HANDLE		device_handle;
Linus Torvalds's avatar
Linus Torvalds committed
59
	acpi_handle		acpi_handle;
Linus Torvalds's avatar
Linus Torvalds committed
60 61 62 63 64 65 66 67 68
	char			uid[9];
	u32 			is_online;
} AC_CONTEXT;


/*****************************************************************************
 *                              Function Prototypes
 *****************************************************************************/

Linus Torvalds's avatar
Linus Torvalds committed
69
acpi_status
Linus Torvalds's avatar
Linus Torvalds committed
70 71
ac_initialize (void);

Linus Torvalds's avatar
Linus Torvalds committed
72
acpi_status
Linus Torvalds's avatar
Linus Torvalds committed
73 74
ac_terminate (void);

Linus Torvalds's avatar
Linus Torvalds committed
75
acpi_status
Linus Torvalds's avatar
Linus Torvalds committed
76 77 78 79 80
ac_notify (
	u32			notify_type,
	u32 			device,
	void			**context);

Linus Torvalds's avatar
Linus Torvalds committed
81
acpi_status
Linus Torvalds's avatar
Linus Torvalds committed
82 83 84 85 86 87
ac_request(
	BM_REQUEST		*request_info,
	void			*context);

/* AC Adapter Driver OSL */

Linus Torvalds's avatar
Linus Torvalds committed
88
acpi_status
Linus Torvalds's avatar
Linus Torvalds committed
89 90 91
ac_osl_add_device (
	AC_CONTEXT		*ac_adapter);

Linus Torvalds's avatar
Linus Torvalds committed
92
acpi_status
Linus Torvalds's avatar
Linus Torvalds committed
93 94 95
ac_osl_remove_device (
	AC_CONTEXT		*ac_adapter);

Linus Torvalds's avatar
Linus Torvalds committed
96
acpi_status
Linus Torvalds's avatar
Linus Torvalds committed
97 98 99 100 101 102
ac_osl_generate_event (
	u32			event,
	AC_CONTEXT		*ac_adapter);


#endif	/* __AC_H__ */