Add and organize some comments. Add also ACPI_DEVICE_EJECT constant to

indicate "ejectable" devices such as docking stations.
This commit is contained in:
jruoho 2010-06-08 16:55:02 +00:00
parent 5f7d603c37
commit c51a135130

View File

@ -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. * Copyright 2001 Wasabi Systems, Inc.
@ -57,19 +57,13 @@
* This structure is used to attach the ACPI "bus". * This structure is used to attach the ACPI "bus".
*/ */
struct acpibus_attach_args { struct acpibus_attach_args {
bus_space_tag_t aa_iot; /* PCI I/O space tag */ bus_space_tag_t aa_iot; /* PCI I/O space tag */
bus_space_tag_t aa_memt; /* PCI MEM space tag */ bus_space_tag_t aa_memt; /* PCI MEM space tag */
pci_chipset_tag_t aa_pc; /* PCI chipset */ pci_chipset_tag_t aa_pc; /* PCI chipset */
int aa_pciflags; /* PCI bus flags */ int aa_pciflags; /* PCI bus flags */
isa_chipset_tag_t aa_ic; /* ISA chipset */ 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. * PCI information for ACPI device nodes that correspond to PCI devices.
*/ */
@ -94,6 +88,9 @@ struct acpi_pci_info {
* ad_notify NULL if there is no notify handler * ad_notify NULL if there is no notify handler
* ad_devinfo never NULL * ad_devinfo never NULL
* ad_handle 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 { struct acpi_devnode {
device_t ad_device; /* Device */ device_t ad_device; /* Device */
@ -114,6 +111,13 @@ struct acpi_devnode {
SIMPLEQ_HEAD(, acpi_devnode) ad_child_head; SIMPLEQ_HEAD(, acpi_devnode) ad_child_head;
}; };
/*
* 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. * Software state of the ACPI subsystem.
*/ */
@ -166,7 +170,6 @@ struct acpi_attach_args {
* acpi_irq Interrupt Request * acpi_irq Interrupt Request
* acpi_drq DMA request * acpi_drq DMA request
*/ */
struct acpi_io { struct acpi_io {
SIMPLEQ_ENTRY(acpi_io) ar_list; SIMPLEQ_ENTRY(acpi_io) ar_list;
int ar_index; int ar_index;