Staging: hv: add mouse driver
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / staging / hv / vmbus_hid_protocol.h
blob65f3001e62022d6f319e5b02e830fc354552b673
1 /*
2 * Copyright (c) 2009, Microsoft Corporation.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 * Place - Suite 330, Boston, MA 02111-1307 USA.
17 * Authors:
18 * Hank Janssen <hjanssen@microsoft.com>
20 #ifndef _VMBUS_HID_PROTOCOL_
21 #define _VMBUS_HID_PROTOCOL_
23 /* The maximum size of a synthetic input message. */
24 #define SYNTHHID_MAX_INPUT_REPORT_SIZE 16
27 * Current version
29 * History:
30 * Beta, RC < 2008/1/22 1,0
31 * RC > 2008/1/22 2,0
33 #define SYNTHHID_INPUT_VERSION_MAJOR 2
34 #define SYNTHHID_INPUT_VERSION_MINOR 0
35 #define SYNTHHID_INPUT_VERSION_DWORD (SYNTHHID_INPUT_VERSION_MINOR | \
36 (SYNTHHID_INPUT_VERSION_MAJOR << 16))
39 #pragma pack(push,1)
42 * Message types in the synthetic input protocol
44 enum synthhid_msg_type
46 SynthHidProtocolRequest,
47 SynthHidProtocolResponse,
48 SynthHidInitialDeviceInfo,
49 SynthHidInitialDeviceInfoAck,
50 SynthHidInputReport,
51 SynthHidMax
56 * Basic message structures.
58 typedef struct
60 enum synthhid_msg_type Type; /* Type of the enclosed message */
61 u32 Size; /* Size of the enclosed message
62 * (size of the data payload)
64 } SYNTHHID_MESSAGE_HEADER, *PSYNTHHID_MESSAGE_HEADER;
66 typedef struct
68 SYNTHHID_MESSAGE_HEADER Header;
69 char Data[1]; /* Enclosed message */
70 } SYNTHHID_MESSAGE, *PSYNTHHID_MESSAGE;
72 typedef union
74 struct {
75 u16 Minor;
76 u16 Major;
79 u32 AsDWord;
80 } SYNTHHID_VERSION, *PSYNTHHID_VERSION;
83 * Protocol messages
85 typedef struct
87 SYNTHHID_MESSAGE_HEADER Header;
88 SYNTHHID_VERSION VersionRequested;
89 } SYNTHHID_PROTOCOL_REQUEST, *PSYNTHHID_PROTOCOL_REQUEST;
91 typedef struct
93 SYNTHHID_MESSAGE_HEADER Header;
94 SYNTHHID_VERSION VersionRequested;
95 unsigned char Approved;
96 } SYNTHHID_PROTOCOL_RESPONSE, *PSYNTHHID_PROTOCOL_RESPONSE;
98 typedef struct
100 SYNTHHID_MESSAGE_HEADER Header;
101 struct input_dev_info HidDeviceAttributes;
102 unsigned char HidDescriptorInformation[1];
103 } SYNTHHID_DEVICE_INFO, *PSYNTHHID_DEVICE_INFO;
105 typedef struct
107 SYNTHHID_MESSAGE_HEADER Header;
108 unsigned char Reserved;
109 } SYNTHHID_DEVICE_INFO_ACK, *PSYNTHHID_DEVICE_INFO_ACK;
111 typedef struct
113 SYNTHHID_MESSAGE_HEADER Header;
114 char ReportBuffer[1];
115 } SYNTHHID_INPUT_REPORT, *PSYNTHHID_INPUT_REPORT;
117 #pragma pack(pop)
119 #endif /* _VMBUS_HID_PROTOCOL_ */