~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/linux/acpi.h

Version: ~ [ 2.2.5 ] ~ [ 2.4.1 ] ~ [ 2.4.9 ] ~ [ 2.6.17.10 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *  acpi.h - ACPI driver interface
  3  *
  4  *  Copyright (C) 1999 Andrew Henroid
  5  *
  6  *  This program is free software; you can redistribute it and/or modify
  7  *  it under the terms of the GNU General Public License as published by
  8  *  the Free Software Foundation; either version 2 of the License, or
  9  *  (at your option) any later version.
 10  *
 11  *  This program is distributed in the hope that it will be useful,
 12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 14  *  GNU General Public License for more details.
 15  *
 16  *  You should have received a copy of the GNU General Public License
 17  *  along with this program; if not, write to the Free Software
 18  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 19  */
 20 
 21 #ifndef _LINUX_ACPI_H
 22 #define _LINUX_ACPI_H
 23 
 24 #include <linux/types.h>
 25 #include <linux/ioctl.h>
 26 #ifdef __KERNEL__
 27 #include <linux/sched.h>
 28 #include <linux/wait.h>
 29 #endif /* __KERNEL__ */
 30 
 31 typedef int acpi_sstate_t;
 32 
 33 /*
 34  * Device states
 35  */
 36 enum
 37 {
 38         ACPI_D0, /* fully-on */
 39         ACPI_D1, /* partial-on */
 40         ACPI_D2, /* partial-on */
 41         ACPI_D3, /* fully-off */
 42 };
 43 
 44 typedef int acpi_dstate_t;
 45 
 46 /* RSDP location */
 47 #define ACPI_BIOS_ROM_BASE (0x0e0000)
 48 #define ACPI_BIOS_ROM_END  (0x100000)
 49 
 50 /* Table signatures */
 51 #define ACPI_RSDP1_SIG 0x20445352 /* 'RSD ' */
 52 #define ACPI_RSDP2_SIG 0x20525450 /* 'PTR ' */
 53 #define ACPI_RSDT_SIG  0x54445352 /* 'RSDT' */
 54 #define ACPI_FADT_SIG  0x50434146 /* 'FACP' */
 55 #define ACPI_DSDT_SIG  0x54445344 /* 'DSDT' */
 56 #define ACPI_FACS_SIG  0x53434146 /* 'FACS' */
 57 
 58 #define ACPI_SIG_LEN            4
 59 #define ACPI_FADT_SIGNATURE     "FACP"
 60 
 61 /* PM1_STS/EN flags */
 62 #define ACPI_TMR    0x0001
 63 #define ACPI_BM     0x0010
 64 #define ACPI_GBL    0x0020
 65 #define ACPI_PWRBTN 0x0100
 66 #define ACPI_SLPBTN 0x0200
 67 #define ACPI_RTC    0x0400
 68 #define ACPI_WAK    0x8000
 69 
 70 /* PM1_CNT flags */
 71 #define ACPI_SCI_EN   0x0001
 72 #define ACPI_BM_RLD   0x0002
 73 #define ACPI_GBL_RLS  0x0004
 74 #define ACPI_SLP_TYP0 0x0400
 75 #define ACPI_SLP_TYP1 0x0800
 76 #define ACPI_SLP_TYP2 0x1000
 77 #define ACPI_SLP_EN   0x2000
 78 
 79 #define ACPI_SLP_TYP_MASK  0x1c00
 80 #define ACPI_SLP_TYP_SHIFT 10
 81 
 82 /* PM_TMR masks */
 83 #define ACPI_TMR_VAL_EXT 0x00000100
 84 #define ACPI_TMR_MASK    0x00ffffff
 85 #define ACPI_TMR_HZ      3580000 /* 3.58 MHz */
 86 
 87 /* strangess to avoid integer overflow */
 88 #define ACPI_MICROSEC_TO_TMR_TICKS(val) \
 89   (((val) * (ACPI_TMR_HZ / 10000)) / 100)
 90 #define ACPI_TMR_TICKS_TO_MICROSEC(ticks) \
 91   (((ticks) * 100) / (ACPI_TMR_HZ / 10000))
 92 
 93 /* PM2_CNT flags */
 94 #define ACPI_ARB_DIS 0x01
 95 
 96 /* FADT flags */
 97 #define ACPI_WBINVD       0x00000001
 98 #define ACPI_WBINVD_FLUSH 0x00000002
 99 #define ACPI_PROC_C1      0x00000004
100 #define ACPI_P_LVL2_UP    0x00000008
101 #define ACPI_PWR_BUTTON   0x00000010
102 #define ACPI_SLP_BUTTON   0x00000020
103 #define ACPI_FIX_RTC      0x00000040
104 #define ACPI_RTC_64       0x00000080
105 #define ACPI_TMR_VAL_EXT  0x00000100
106 #define ACPI_DCK_CAP      0x00000200
107 
108 /* FADT BOOT_ARCH flags */
109 #define FADT_BOOT_ARCH_LEGACY_DEVICES   0x0001
110 #define FADT_BOOT_ARCH_KBD_CONTROLLER   0x0002
111 
112 /* FACS flags */
113 #define ACPI_S4BIOS       0x00000001
114 
115 /* processor block offsets */
116 #define ACPI_P_CNT        0x00000000
117 #define ACPI_P_LVL2       0x00000004
118 #define ACPI_P_LVL3       0x00000005
119 
120 /* C-state latencies (microseconds) */
121 #define ACPI_MAX_P_LVL2_LAT 100
122 #define ACPI_MAX_P_LVL3_LAT 1000
123 #define ACPI_INFINITE_LAT   (~0UL)
124 
125 /*
126  * Sysctl declarations
127  */
128 
129 enum
130 {
131         CTL_ACPI = 10
132 };
133 
134 enum
135 {
136         ACPI_FADT = 1,
137         ACPI_DSDT,
138         ACPI_PM1_ENABLE,
139         ACPI_GPE_ENABLE,
140         ACPI_GPE_LEVEL,
141         ACPI_EVENT,
142         ACPI_P_BLK,
143         ACPI_ENTER_LVL2_LAT,
144         ACPI_ENTER_LVL3_LAT,
145         ACPI_P_LVL2_LAT,
146         ACPI_P_LVL3_LAT,
147         ACPI_C1_TIME,
148         ACPI_C2_TIME,
149         ACPI_C3_TIME,
150         ACPI_S0_SLP_TYP,
151         ACPI_S1_SLP_TYP,
152         ACPI_S5_SLP_TYP,
153         ACPI_SLEEP,
154         ACPI_FACS,
155         ACPI_XSDT,
156         ACPI_PMTIMER,
157         ACPI_BATTERY,
158 };
159 
160 #define ACPI_SLP_TYP_DISABLED   (~0UL)
161 
162 #endif /* _LINUX_ACPI_H */
163 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.