usb_as.h revision e272e4c8df90e762ecb6a6564503bb2cb1e2027d
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_USB_AS_H
#define _SYS_USB_AS_H
#ifdef __cplusplus
extern "C" {
#endif
/* driver specific macros */
#define USB_AS_HIWATER (AM_MAX_QUEUED_MSGS_SIZE)
/* this structure is built from the descriptors */
typedef struct usb_as_alt_descr {
typedef struct usb_as_power {
void *aspm_state; /* points back to usb_as_state */
int aspm_pm_busy; /* device busy accounting */
/* this is the bit mask of the power states that device has */
/* wakeup and power transistion capabilites of an interface */
/* current power level the device is in */
/* usb_as soft state */
typedef struct usb_as_state {
/* mblk containing the current control command */
/* serialization */
/* registration data */
/* info from descriptors per alternate */
/* pipe handle */
/* See below for flags */
/* Isoc pipe stuff */
void * usb_as_ahdl;
/* registration data */
/* debug support */
char dstr[64];
/* warlock directives, stable data */
typedef struct usb_as_tq_arg {
int usb_as_tq_arg_cr;
/* Default pipe states */
#define USB_AS_DEF_AVAILABLE 0
#define USB_AS_DEF_INUSE 1
#define USB_AS_DEF_UNAVAILABLE 2
/*
* If a command has been initiated, the close callback should know
* how it finished. If there has been an error and ex cb initiaited
* the async pipe close, an M_ERROR should be sent up. If no error and
* default xfer cb had initiated close, M_CTL should be sent up. In
* some other cases, close callback may not send anything up.
*/
#define USB_AS_SEND_MERR 1
#define USB_AS_SEND_MCTL 2
#define USB_AS_SEND_NONE 3
/*
*/
#define USB_AS_IDLE 0
#define USB_AS_ACTIVE 1
#define USB_AS_PLAY_PAUSED 2
#define USB_AS_STOP_POLLING_STARTED 3
/*
* Define constants needed for isoc transfer
*/
#define USB_AS_N_FRAMES 8
#define USB_AS_MAX_REQUEST_COUNT 3
/*
* usb_as turns the M_CTL request into a request control request on the
* default pipe. usb_as needs the following information in the usb_as_req_t
* structure. See the details below for specific values for each command.
*/
typedef struct usb_as_req {
} usb_as_req_t;
/* status */
#define USB_AS_OPEN 1
#define USB_AS_DISMANTLING 2
/* minor node */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_USB_AS_H */