Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Add and organize some comments. Add also ACPI_D...



details:   https://anonhg.NetBSD.org/src/rev/a451391fb7f9
branches:  trunk
changeset: 755530:a451391fb7f9
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Tue Jun 08 16:55:02 2010 +0000

description:
Add and organize some comments. Add also ACPI_DEVICE_EJECT constant to
indicate "ejectable" devices such as docking stations.

diffstat:

 sys/dev/acpi/acpivar.h |  29 ++++++++++++++++-------------
 1 files changed, 16 insertions(+), 13 deletions(-)

diffs (67 lines):

diff -r 34777068983d -r a451391fb7f9 sys/dev/acpi/acpivar.h
--- a/sys/dev/acpi/acpivar.h    Tue Jun 08 16:49:53 2010 +0000
+++ b/sys/dev/acpi/acpivar.h    Tue Jun 08 16:55:02 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpivar.h,v 1.56 2010/06/07 01:45:27 pgoyette Exp $    */
+/*     $NetBSD: acpivar.h,v 1.57 2010/06/08 16:55:02 jruoho Exp $      */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -57,20 +57,14 @@
  * This structure is used to attach the ACPI "bus".
  */
 struct acpibus_attach_args {
-       bus_space_tag_t aa_iot;         /* PCI I/O space tag */
-       bus_space_tag_t aa_memt;        /* PCI MEM space tag */
-       pci_chipset_tag_t aa_pc;        /* PCI chipset */
-       int aa_pciflags;                /* PCI bus flags */
-       isa_chipset_tag_t aa_ic;        /* ISA chipset */
+       bus_space_tag_t          aa_iot;        /* PCI I/O space tag */
+       bus_space_tag_t          aa_memt;       /* PCI MEM space tag */
+       pci_chipset_tag_t        aa_pc;         /* PCI chipset */
+       int                      aa_pciflags;   /* PCI bus flags */
+       isa_chipset_tag_t        aa_ic;         /* ISA chipset */
 };
 
 /*
- * ACPI driver capabilities.
- */
-#define ACPI_DEVICE_POWER              __BIT(0)
-#define ACPI_DEVICE_WAKEUP             __BIT(1)
-
-/*
  * PCI information for ACPI device nodes that correspond to PCI devices.
  */
 struct acpi_pci_info {
@@ -94,6 +88,9 @@
  *     ad_notify       NULL if there is no notify handler
  *     ad_devinfo      never NULL
  *     ad_handle       never NULL
+ *
+ * Each ACPI device node is associated with its handle. The function
+ * acpi_get_node() can be used to get the node structure from a handle.
  */
 struct acpi_devnode {
        device_t                 ad_device;     /* Device */
@@ -115,6 +112,13 @@
 };
 
 /*
+ * ACPI driver capabilities.
+ */
+#define ACPI_DEVICE_POWER      __BIT(0)        /* Support for D-states  */
+#define ACPI_DEVICE_WAKEUP     __BIT(1)        /* Support for wake-up */
+#define ACPI_DEVICE_EJECT      __BIT(2)        /* Support for "ejection" */
+
+/*
  * Software state of the ACPI subsystem.
  */
 struct acpi_softc {
@@ -166,7 +170,6 @@
  *     acpi_irq        Interrupt Request
  *     acpi_drq        DMA request
  */
-
 struct acpi_io {
        SIMPLEQ_ENTRY(acpi_io) ar_list;
        int             ar_index;



Home | Main Index | Thread Index | Old Index