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
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.
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]
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <sys/sunddi.h>
33 #include <sys/ddi_impldefs.h>
34 #include <sys/devctl.h>
41 #define DC_RDONLY 0x02
43 typedef struct devctl_dummy_struct
*devctl_hdl_t
;
44 typedef struct devctl_dummy_ddef
*devctl_ddef_t
;
48 devctl_device_acquire(char *devfs_path
, uint_t flags
);
51 devctl_bus_acquire(char *devfs_path
, uint_t flags
);
54 devctl_ap_acquire(char *devfs_path
, uint_t flags
);
57 devctl_pm_dev_acquire(char *devfs_path
, uint_t flags
);
60 devctl_pm_bus_acquire(char *devfs_path
, uint_t flags
);
63 devctl_release(devctl_hdl_t hdl
);
66 devctl_device_offline(devctl_hdl_t hdl
);
69 devctl_device_remove(devctl_hdl_t hdl
);
72 devctl_pm_raisepower(devctl_hdl_t hdl
);
75 devctl_pm_changepowerlow(devctl_hdl_t hdl
);
78 devctl_pm_changepowerhigh(devctl_hdl_t hdl
);
81 devctl_pm_idlecomponent(devctl_hdl_t hdl
);
84 devctl_pm_busycomponent(devctl_hdl_t hdl
);
87 devctl_pm_testbusy(devctl_hdl_t hdl
, uint_t
*busyp
);
90 devctl_pm_failsuspend(devctl_hdl_t hdl
);
93 devctl_pm_bus_teststrict(devctl_hdl_t hdl
, uint_t
*strict
);
96 devctl_pm_device_changeonresume(devctl_hdl_t hdl
);
99 devctl_pm_device_no_lower_power(devctl_hdl_t hdl
);
102 devctl_pm_bus_no_invol(devctl_hdl_t hdl
);
105 devctl_pm_device_promprintf(devctl_hdl_t hdl
);
108 devctl_device_online(devctl_hdl_t hdl
);
111 devctl_device_reset(devctl_hdl_t hdl
);
114 devctl_device_getstate(devctl_hdl_t hdl
, uint_t
*statep
);
117 devctl_bus_quiesce(devctl_hdl_t hdl
);
120 devctl_bus_unquiesce(devctl_hdl_t hdl
);
123 devctl_bus_reset(devctl_hdl_t hdl
);
126 devctl_bus_resetall(devctl_hdl_t hdl
);
129 devctl_bus_getstate(devctl_hdl_t hdl
, uint_t
*statep
);
132 devctl_bus_configure(devctl_hdl_t hdl
);
135 devctl_bus_unconfigure(devctl_hdl_t hdl
);
138 devctl_ap_insert(devctl_hdl_t
, nvlist_t
*);
141 devctl_ap_remove(devctl_hdl_t
, nvlist_t
*);
144 devctl_ap_connect(devctl_hdl_t
, nvlist_t
*);
147 devctl_ap_disconnect(devctl_hdl_t
, nvlist_t
*);
150 devctl_ap_configure(devctl_hdl_t
, nvlist_t
*);
153 devctl_ap_unconfigure(devctl_hdl_t
, nvlist_t
*);
156 devctl_ap_getstate(devctl_hdl_t
, nvlist_t
*, devctl_ap_state_t
*);
159 devctl_ddef_alloc(char *, int);
162 devctl_ddef_free(devctl_ddef_t
);
165 devctl_ddef_int(devctl_ddef_t
, char *, int32_t);
168 devctl_ddef_int_array(devctl_ddef_t
, char *, int, int32_t *);
171 devctl_ddef_string(devctl_ddef_t ddef_hdl
, char *, char *);
174 devctl_ddef_string_array(devctl_ddef_t
, char *, int, char **);
177 devctl_ddef_byte_array(devctl_ddef_t
, char *, int, uchar_t
*);
180 devctl_bus_dev_create(devctl_hdl_t
, devctl_ddef_t
, uint_t
, devctl_hdl_t
*);
183 devctl_get_pathname(devctl_hdl_t
, char *, size_t);
189 #endif /* _LIBDEVICE_H */