2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _LIBDEVICE_H
2N/A#define _LIBDEVICE_H
2N/A
2N/A#include <sys/sunddi.h>
2N/A#include <sys/ddi_impldefs.h>
2N/A#include <sys/devctl.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#define DC_EXCL 0x01
2N/A#define DC_RDONLY 0x02
2N/A
2N/Atypedef struct devctl_dummy_struct *devctl_hdl_t;
2N/Atypedef struct devctl_dummy_ddef *devctl_ddef_t;
2N/A
2N/A
2N/Adevctl_hdl_t
2N/Adevctl_device_acquire(char *devfs_path, uint_t flags);
2N/A
2N/Adevctl_hdl_t
2N/Adevctl_bus_acquire(char *devfs_path, uint_t flags);
2N/A
2N/Adevctl_hdl_t
2N/Adevctl_ap_acquire(char *devfs_path, uint_t flags);
2N/A
2N/Adevctl_hdl_t
2N/Adevctl_pm_dev_acquire(char *devfs_path, uint_t flags);
2N/A
2N/Adevctl_hdl_t
2N/Adevctl_pm_bus_acquire(char *devfs_path, uint_t flags);
2N/A
2N/Avoid
2N/Adevctl_release(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_device_offline(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_device_remove(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_pm_raisepower(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_pm_changepowerlow(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_pm_changepowerhigh(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_pm_idlecomponent(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_pm_busycomponent(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_pm_testbusy(devctl_hdl_t hdl, uint_t *busyp);
2N/A
2N/Aint
2N/Adevctl_pm_failsuspend(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_pm_bus_teststrict(devctl_hdl_t hdl, uint_t *strict);
2N/A
2N/Aint
2N/Adevctl_pm_device_changeonresume(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_pm_device_no_lower_power(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_pm_bus_no_invol(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_pm_device_promprintf(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_device_online(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_device_reset(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_device_getstate(devctl_hdl_t hdl, uint_t *statep);
2N/A
2N/Aint
2N/Adevctl_bus_quiesce(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_bus_unquiesce(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_bus_reset(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_bus_resetall(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_bus_getstate(devctl_hdl_t hdl, uint_t *statep);
2N/A
2N/Aint
2N/Adevctl_bus_configure(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_bus_unconfigure(devctl_hdl_t hdl);
2N/A
2N/Aint
2N/Adevctl_ap_insert(devctl_hdl_t, nvlist_t *);
2N/A
2N/Aint
2N/Adevctl_ap_remove(devctl_hdl_t, nvlist_t *);
2N/A
2N/Aint
2N/Adevctl_ap_connect(devctl_hdl_t, nvlist_t *);
2N/A
2N/Aint
2N/Adevctl_ap_disconnect(devctl_hdl_t, nvlist_t *);
2N/A
2N/Aint
2N/Adevctl_ap_configure(devctl_hdl_t, nvlist_t *);
2N/A
2N/Aint
2N/Adevctl_ap_unconfigure(devctl_hdl_t, nvlist_t *);
2N/A
2N/Aint
2N/Adevctl_ap_getstate(devctl_hdl_t, nvlist_t *, devctl_ap_state_t *);
2N/A
2N/Adevctl_ddef_t
2N/Adevctl_ddef_alloc(char *, int);
2N/A
2N/Avoid
2N/Adevctl_ddef_free(devctl_ddef_t);
2N/A
2N/Aint
2N/Adevctl_ddef_int(devctl_ddef_t, char *, int32_t);
2N/A
2N/Aint
2N/Adevctl_ddef_int_array(devctl_ddef_t, char *, int, int32_t *);
2N/A
2N/Aint
2N/Adevctl_ddef_string(devctl_ddef_t ddef_hdl, char *, char *);
2N/A
2N/Aint
2N/Adevctl_ddef_string_array(devctl_ddef_t, char *, int, char **);
2N/A
2N/Aint
2N/Adevctl_ddef_byte_array(devctl_ddef_t, char *, int, uchar_t *);
2N/A
2N/Aint
2N/Adevctl_bus_dev_create(devctl_hdl_t, devctl_ddef_t, uint_t, devctl_hdl_t *);
2N/A
2N/Achar *
2N/Adevctl_get_pathname(devctl_hdl_t, char *, size_t);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _LIBDEVICE_H */