patch-2.3.30 linux/include/linux/acpi.h

Next file: linux/include/linux/bootmem.h
Previous file: linux/include/asm-sparc64/sfp-machine.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.29/linux/include/linux/acpi.h linux/include/linux/acpi.h
@@ -23,36 +23,39 @@
 
 #include <linux/types.h>
 #include <linux/ioctl.h>
-
 #ifdef __KERNEL__
-
 #include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/wait.h>
+#endif /* __KERNEL__ */
 
 /*
- * Device types
+ * System sleep states
  */
 enum
 {
-	ACPI_SYS_DEV,	/* system device (fan, KB controller, ...) */
-	ACPI_PCI_DEV,	/* generic PCI device */
-	ACPI_PCI_BUS,	/* PCI bus */
-	ACPI_ISA_DEV,	/* generic ISA device */
-	ACPI_ISA_BUS,	/* ISA bus */
-	ACPI_USB_DEV,	/* generic USB device */
-	ACPI_USB_HUB,	/* USB hub device */
-	ACPI_USB_CTRL,	/* USB controller */
-	ACPI_SCSI_DEV,	/* generic SCSI device */
-	ACPI_SCSI_CTRL, /* SCSI controller */
+	ACPI_S0, /* working */
+	ACPI_S1, /* sleep */
+	ACPI_S2, /* sleep */
+	ACPI_S3, /* sleep */
+	ACPI_S4, /* non-volatile sleep */
+	ACPI_S5, /* soft-off */
 };
 
-typedef int acpi_dev_t;
+typedef int acpi_sstate_t;
 
 /*
- * Device addresses
+ * Device states
  */
-#define ACPI_PCI_ADR(dev) ((dev)->bus->number << 16 | (dev)->devfn)
+enum
+{
+	ACPI_D0, /* fully-on */
+	ACPI_D1, /* partial-on */
+	ACPI_D2, /* partial-on */
+	ACPI_D3, /* fully-off */
+};
+
+typedef int acpi_dstate_t;
 
 /*
  * HID (PnP) values
@@ -71,33 +74,31 @@
 
 typedef int acpi_hid_t;
 
+#ifdef __KERNEL__
+
 /*
- * Device states
+ * Device types
  */
 enum
 {
-	ACPI_D0, /* fully-on */
-	ACPI_D1, /* partial-on */
-	ACPI_D2, /* partial-on */
-	ACPI_D3, /* fully-off */
+	ACPI_SYS_DEV,	/* system device (fan, KB controller, ...) */
+	ACPI_PCI_DEV,	/* generic PCI device */
+	ACPI_PCI_BUS,	/* PCI bus */
+	ACPI_ISA_DEV,	/* generic ISA device */
+	ACPI_ISA_BUS,	/* ISA bus */
+	ACPI_USB_DEV,	/* generic USB device */
+	ACPI_USB_HUB,	/* USB hub device */
+	ACPI_USB_CTRL,	/* USB controller */
+	ACPI_SCSI_DEV,	/* generic SCSI device */
+	ACPI_SCSI_CTRL, /* SCSI controller */
 };
 
-typedef int acpi_dstate_t;
+typedef int acpi_dev_t;
 
 /*
- * System sleep states
+ * Device addresses
  */
-enum
-{
-	ACPI_S0, /* working */
-	ACPI_S1, /* sleep */
-	ACPI_S2, /* sleep */
-	ACPI_S3, /* sleep */
-	ACPI_S4, /* non-volatile sleep */
-	ACPI_S5, /* soft-off */
-};
-
-typedef int acpi_sstate_t;
+#define ACPI_PCI_ADR(dev) ((dev)->bus->number << 16 | (dev)->devfn)
 
 struct acpi_dev;
 
@@ -136,7 +137,7 @@
 
 #ifdef CONFIG_ACPI
 
-extern wait_queue_head_t acpi_idle_wait;
+extern wait_queue_head_t acpi_control_wait;
 
 /*
  * Register a device with the ACPI subsystem
@@ -168,8 +169,8 @@
 {
 	if (dev) {
 		dev->idle = jiffies;
-		if (waitqueue_active(&acpi_idle_wait))
-			wake_up(&acpi_idle_wait);
+		if (waitqueue_active(&acpi_control_wait))
+			wake_up(&acpi_control_wait);
 	}
 }
 
@@ -361,7 +362,10 @@
 	ACPI_P_BLK,
 	ACPI_P_LVL2_LAT,
 	ACPI_P_LVL3_LAT,
+	ACPI_S0_SLP_TYP,
+	ACPI_S1_SLP_TYP,
 	ACPI_S5_SLP_TYP,
+	ACPI_SLEEP,
 };
 
 #define ACPI_SLP_TYP_DISABLED	(~0UL)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)