These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / staging / unisys / visorinput / ultrainputreport.h
1 /* Copyright (C) 2010 - 2015 UNISYS CORPORATION
2  * All rights reserved.
3  *
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.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11  * NON INFRINGEMENT.  See the GNU General Public License for more
12  * details.
13  */
14
15 #ifndef __SPAR_ULTRAINPUTREPORT_H__
16 #define __SPAR_ULTRAINPUTREPORT_H__
17
18 #include <linux/types.h>
19
20 #include "ultrainputreport.h"
21
22 /* Identifies mouse and keyboard activity which is specified by the firmware to
23  *  the host using the cmsimpleinput protocol.  @ingroup coretypes
24  */
25 enum ultra_inputaction {
26         inputaction_none = 0,
27         inputaction_xy_motion = 1,      /* only motion; arg1=x, arg2=y */
28         inputaction_mouse_button_down = 2, /* arg1: 1=left,2=center,3=right */
29         inputaction_mouse_button_up = 3, /* arg1: 1=left,2=center,3=right */
30         inputaction_mouse_button_click = 4, /* arg1: 1=left,2=center,3=right */
31         inputaction_mouse_button_dclick = 5, /* arg1: 1=left,2=center,
32                                                 3=right */
33         inputaction_wheel_rotate_away = 6, /* arg1: wheel rotation away from
34                                               user */
35         inputaction_wheel_rotate_toward = 7, /* arg1: wheel rotation toward
36                                                 user */
37         inputaction_set_max_xy = 8,     /* set screen maxXY; arg1=x, arg2=y */
38         inputaction_key_down = 64,      /* arg1: scancode, as follows:
39                                            If arg1 <= 0xff, it's a 1-byte
40                                            scancode and arg1 is that scancode.
41                                            If arg1 > 0xff, it's a 2-byte
42                                            scanecode, with the 1st byte in the
43                                            low 8 bits, and the 2nd byte in the
44                                            high 8 bits.  E.g., the right ALT key
45                                            would appear as x'38e0'. */
46         inputaction_key_up = 65,        /* arg1: scancode (in same format as
47                                            inputaction_keyDown) */
48         inputaction_set_locking_key_state = 66,
49                                         /* arg1: scancode (in same format
50                                                  as inputaction_keyDown);
51                                                  MUST refer to one of the
52                                                  locking keys, like capslock,
53                                                  numlock, or scrolllock
54                                            arg2: 1 iff locking key should be
55                                                  in the LOCKED position
56                                                  (e.g., light is ON) */
57         inputaction_key_down_up = 67,   /* arg1: scancode (in same format
58                                                  as inputaction_keyDown) */
59         inputaction_last
60 };
61
62 struct ultra_inputactivity {
63         u16 action;
64         u16 arg1;
65         u16 arg2;
66         u16 arg3;
67 } __packed;
68
69 struct ultra_inputreport {
70         u64 seq_no;
71         struct ultra_inputactivity activity;
72 } __packed;
73
74 #endif