[PATCH] CREDITS update
[linux-2.6/history.git] / include / asm-arm / apm.h
blob4d9f87418a46895bf9a1ae9a71ff951e6d489a6f
1 /* -*- linux-c -*-
3 * (C) 2003 zecke@handhelds.org
5 * GPL version 2
7 * based on arch/arm/kernel/apm.c
8 * factor out the information needed by architectures to provide
9 * apm status
13 #ifndef ARM_ASM_SA1100_APM_H
14 #define ARM_ASM_SA1100_APM_H
16 #include <linux/config.h>
18 #ifdef CONFIG_APM
21 #define APM_AC_OFFLINE 0
22 #define APM_AC_ONLINE 1
23 #define APM_AC_BACKUP 2
24 #define APM_AC_UNKNOWN 0xFF
26 #define APM_BATTERY_STATUS_HIGH 0
27 #define APM_BATTERY_STATUS_LOW 1
28 #define APM_BATTERY_STATUS_CRITICAL 2
29 #define APM_BATTERY_STATUS_CHARGING 3
30 #define APM_BATTERY_STATUS_UNKNOWN 0xFF
32 #define APM_BATTERY_LIFE_UNKNOWN 0xFFFF
33 #define APM_BATTERY_LIFE_MINUTES 0x8000
34 #define APM_BATTERY_LIFE_VALUE_MASK 0x7FFF
37 * This structure gets filled in by the machine specific 'get_power_status'
38 * implementation. Any fields which are not set default to a safe value.
40 struct apm_power_info {
41 unsigned char ac_line_status;
42 unsigned char battery_status;
43 unsigned char battery_flag;
44 unsigned char battery_life;
45 int time;
46 int units;
50 * This allows machines to provide their own "apm get power status" function.
52 extern void (*apm_get_power_status)(struct apm_power_info *);
53 #endif
56 #endif