4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright (c) 2009-2010, Intel Corporation.
23 * All rights reserved.
28 #include <sys/types.h>
29 #include <sys/dditypes.h> /* needed for definition of dev_info_t */
30 #include <sys/mutex.h>
38 #define ACPINEX_INSTANCE_MAX (1 << 10)
39 #define ACPINEX_INSTANCE_MASK (ACPINEX_INSTANCE_MAX - 1)
40 #define ACPINEX_INSTANCE_SHIFT 8
41 #define ACPINEX_MINOR_TYPE_MASK ((1 << ACPINEX_INSTANCE_SHIFT) - 1)
42 #define ACPINEX_DEVCTL_MINOR ((1 << ACPINEX_INSTANCE_SHIFT) - 1)
44 #define ACPINEX_MAKE_DEVCTL_MINOR(instance) \
45 (((instance) << ACPINEX_INSTANCE_SHIFT) | ACPINEX_DEVCTL_MINOR)
46 #define ACPINEX_IS_DEVCTL(minor) \
47 (((minor) & ACPINEX_MINOR_TYPE_MASK) == ACPINEX_DEVCTL_MINOR)
49 #define ACPINEX_GET_INSTANCE(minor) ((minor) >> ACPINEX_INSTANCE_SHIFT)
51 extern int acpinex_debug
;
52 #define ACPINEX_DEBUG(lvl, ...) \
53 if (acpinex_debug) cmn_err((lvl), __VA_ARGS__)
55 /* Softstate structure for acpinex instance. */
60 ddi_iblock_cookie_t ans_fm_ibc
;
62 char ans_path
[MAXPATHLEN
];
63 } acpinex_softstate_t
;
65 extern void acpinex_event_init(void);
66 extern void acpinex_event_fini(void);
67 extern int acpinex_event_scan(acpinex_softstate_t
*, boolean_t
);
75 #endif /* _ACPI_NEXUS_H */