hidvar.h revision 5321cfb734b02bb580e9ecd9ec0e7f5e53571e23
1N/A * The contents of this file are subject to the terms of the 1N/A * Common Development and Distribution License (the "License"). 1N/A * You may not use this file except in compliance with the License. 1N/A * See the License for the specific language governing permissions 1N/A * and limitations under the License. 1N/A * When distributing Covered Code, include this CDDL HEADER in each 1N/A * If applicable, add the following below this CDDL HEADER, with the 1N/A * fields enclosed by brackets "[]" replaced with your own identifying 1N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 1N/A * Use is subject to license terms. 1N/A * HID : This header file contains the internal structures 1N/A * and variable definitions used in hid driver. 1N/A * HID USB device state management : 1N/A * ONLINE-----1--->SUSPENDED----2---->ONLINE 1N/A * +-----3--->DISCONNECTED----4----->ONLINE 1N/A * +-----7--->POWERED DOWN----8----->POWER CHANGE---9--->ONLINE 1N/A * +---3--->DISCONNECTED 1N/A * POWERED DOWN----1--->SUSPENDED------2----->POWERED DOWN 1N/A * +---------3----->DISCONNECTED-------4----->POWERED DOWN 1N/A * 2 = CPR RESUME (with original device) 1N/A * 4 = Original Device Plugged in 1N/A * 5 = CPR RESUME (with device disconnected or with a wrong device) 1N/A * 6 = CPR SUSPEND on a disconnected device 1N/A * 7 = Device idles for time T & transitions to low power state 1N/A * 8 = Remote wakeup by device OR Application kicking off IO to device 1N/A * This results in a Transistion state till PM calls the power 1N/A * entry point to raise the power level of the device 1N/A * 9 = Device entry point called to raise power level of the device 1N/A/* Boot Interface Subclass for HID devices */ 1N/A/* Boot protocol values for keyboard and mouse */ 1N/A * If the hid descriptor is not valid, the following values are 1N/A * Flags for the default pipe. 1N/A * Hid interrupt pipe states. Interrupt pipe 1N/A * can be in only one of these states : 1N/A * open--1-->data_transferring--1-->open 1N/A * 1 = interrupt pipe callback 1N/A/* HID mctl processing return codes */ 1N/A/* Data is being sent up */ 1N/A/* HID Protocol Requests */ 1N/A#
define SET_IDLE 0x0a /* bRequest value to set idle request */ 1N/A#
define DURATION (0<<
8)
/* no. of repeat reports (HID 7.2.4) */ 1N/A /* this is the bit mask of the power states that device has */ 1N/A /* wakeup and power transistion capabilites of an interface */ 1N/A /* flag to indicate if driver is about to raise power level */ 1N/A /* current power level the device is in */ 1N/A /* mblk indicating that the device has powered up */ 1N/A * multiple queue support 1N/A /* device state flag */ 1N/A /* outstanding requests on the default pipe */ 1N/A /* hid driver is attached to this interface */ 1N/A /* Pipe policy for the interrupt pipe is saved here */ 1N/A * This field is only used if the device provides polled input 1N/A * This is state information for the usba layer. 1N/A * This is the buffer that the raw characters are stored in. 1N/A /* handle for outputting messages */ 1N/A * This is the list of STREAMS queues built upon the device. Only 1N/A * one queue on this list is active at any time - the list head. 1N/A * Once the active queue is closed, the next one on the list 1N/A * will be activated. The USB pipes will be closed if all queues 1N/A/* warlock directives, stable data */ 1N/A * The hid_polled_console_info field is a handle from usba. The 1N/A * handle is used when the kernel is in the single thread mode 1N/A * so the field is tagged with this note. 1N/A * structure for argument for callback routine for async 1N/A * data transfer through default pipe. 1N/A /* Pointer to the write queue from which the message comes from */ 1N/A /* Message to be sent up to the stream */ 1N/A /* Pointer to the original mblk_t received from hid_wput() */ 1N/A /* Request that caused this callback to happen */ 1N/A * An instance of this structure is created per command down to the 1N/A * device. The control callback is not executed until the call is 1N/A * made into usba, so there is no danger of a callback happening when 1N/A * the fields of the structure are being set. 1N/A * An instance of this structure is created per command down to the 1N/A * device. The callback is not executed until the call is 1N/A * made into usba, so there is no danger of a callback happening when 1N/A * the fields of the structure are being set. 1N/A/* Value for hid_streams_flags */ 1N/A/* hid_close will wait 60 secons for callbacks to be over */ 1N/A/* define a timeout for draining requests on the default control pipe */ 1N/A/* To support PM on SUN mice of later revisions */ 1N/A * Debug message Masks 1N/A * Define states local to hid driver 1N/A/* define for retrying control requests */ 1N/A#
endif /* _SYS_USB_HIDVAR_H */