4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22
23 /*
24 * Copyright (c) 1999-2000 by Sun Microsystems, Inc.
25 * All rights reserved.
26 */
27
28 #ifndef _SYS_HOTPLUG_HPCSVC_H
29 #define _SYS_HOTPLUG_HPCSVC_H
30
31 #pragma ident "%Z%%M% %I% %E% SMI"
32
33 #include <sys/hotplug/hpctrl.h>
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /* flags for event handling */
40 #define HPC_EVENT_NORMAL 0 /* normal, queued event handling */
41 #define HPC_EVENT_SYNCHRONOUS 1 /* unqueued sync. event handling */
42
43 #ifdef __STDC__
44 extern int hpc_nexus_register_bus(dev_info_t *dip,
45 int (* callback)(dev_info_t *dip, hpc_slot_t handle,
46 hpc_slot_info_t *slot_info, int slot_state),
47 uint_t flags);
48 extern int hpc_nexus_unregister_bus(dev_info_t *dip);
49 extern int hpc_nexus_connect(hpc_slot_t handle, void *data, uint_t flags);
50 extern int hpc_nexus_disconnect(hpc_slot_t handle, void *data, uint_t flags);
51 extern int hpc_nexus_insert(hpc_slot_t handle, void *data, uint_t flags);
52 extern int hpc_nexus_remove(hpc_slot_t handle, void *data, uint_t flags);
53 extern int hpc_nexus_control(hpc_slot_t handle, int request, caddr_t arg);
54 extern int hpc_install_event_handler(hpc_slot_t handle, uint_t event_mask,
55 int (*event_handler)(caddr_t, uint_t), caddr_t arg);
56 extern int hpc_remove_event_handler(hpc_slot_t handle);
57 #else
58 extern int hpc_nexus_register_bus();
59 extern int hpc_nexus_unregister_bus();
60 extern int hpc_nexus_connect();
61 extern int hpc_nexus_disconnect();
62 extern int hpc_nexus_insert();
63 extern int hpc_nexus_remove();
64 extern int hpc_nexus_control();
65 extern int hpc_install_event_handler();
66 #endif
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif /* _SYS_HOTPLUG_HPCSVC_H */
|
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22
23 /*
24 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25 *
26 * Copyright (c) 1999-2000 by Sun Microsystems, Inc.
27 * All rights reserved.
28 */
29
30 #ifndef _SYS_HOTPLUG_HPCSVC_H
31 #define _SYS_HOTPLUG_HPCSVC_H
32
33 #include <sys/hotplug/hpctrl.h>
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /* flags for event handling */
40 #define HPC_EVENT_NORMAL 0 /* normal, queued event handling */
41 #define HPC_EVENT_SYNCHRONOUS 1 /* unqueued sync. event handling */
42
43 extern int hpc_nexus_register_bus(dev_info_t *dip,
44 int (* callback)(dev_info_t *dip, hpc_slot_t handle,
45 hpc_slot_info_t *slot_info, int slot_state),
46 uint_t flags);
47 extern int hpc_nexus_unregister_bus(dev_info_t *dip);
48 extern int hpc_nexus_connect(hpc_slot_t handle, void *data, uint_t flags);
49 extern int hpc_nexus_disconnect(hpc_slot_t handle, void *data, uint_t flags);
50 extern int hpc_nexus_insert(hpc_slot_t handle, void *data, uint_t flags);
51 extern int hpc_nexus_remove(hpc_slot_t handle, void *data, uint_t flags);
52 extern int hpc_nexus_control(hpc_slot_t handle, int request, caddr_t arg);
53 extern int hpc_install_event_handler(hpc_slot_t handle, uint_t event_mask,
54 int (*event_handler)(caddr_t, uint_t), caddr_t arg);
55 extern int hpc_remove_event_handler(hpc_slot_t handle);
56
57 #ifdef __cplusplus
58 }
59 #endif
60
61 #endif /* _SYS_HOTPLUG_HPCSVC_H */
|