Staging: hv: add mouse driver
[deliverable/linux.git] / drivers / staging / hv / mousevsc_api.h
1 /*
2 * Copyright 2009 Citrix Systems, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * For clarity, the licensor of this program does not intend that a
19 * "derivative work" include code which compiles header information from
20 * this program.
21 *
22 * This code has been modified from its original by
23 * Hank Janssen <hjanssen@microsoft.com>
24 *
25 */
26
27 #ifndef _INPUTVSC_API_H_
28 #define _INPUTVSC_API_H_
29
30 #include "vmbus_api.h"
31
32 /*
33 * Defines
34 */
35 #define INPUTVSC_SEND_RING_BUFFER_SIZE 10*PAGE_SIZE
36 #define INPUTVSC_RECV_RING_BUFFER_SIZE 10*PAGE_SIZE
37
38
39 /*
40 * Data types
41 */
42 struct input_dev_info {
43 unsigned short VendorID;
44 unsigned short ProductID;
45 unsigned short VersionNumber;
46 char Name[128];
47 };
48
49 /* Represents the input vsc driver */
50 struct mousevsc_drv_obj {
51 struct hv_driver Base; // Must be the first field
52 /*
53 * This is set by the caller to allow us to callback when
54 * we receive a packet from the "wire"
55 */
56 void (*OnDeviceInfo)(struct hv_device *dev,
57 struct input_dev_info* info);
58 void (*OnInputReport)(struct hv_device *dev, void* packet, u32 len);
59 void (*OnReportDescriptor)(struct hv_device *dev,
60 void* packet, u32 len);
61 /* Specific to this driver */
62 int (*OnOpen)(struct hv_device *Device);
63 int (*OnClose)(struct hv_device *Device);
64 void *Context;
65 };
66
67
68 /*
69 * Interface
70 */
71 int mouse_vsc_initialize(struct hv_driver *drv);
72
73 #endif // _INPUTVSC_API_H_
This page took 0.051784 seconds and 5 git commands to generate.