Commit bac41a2f authored by Sameer Wadgaonkar's avatar Sameer Wadgaonkar Committed by Greg Kroah-Hartman

staging: unisys: visorinput: removed enum in ultrainputreport.h to match driver namespace

Removed enum ultra_inputaction in ultrainputreport.h and changed
elements to #defnes.
Signed-off-by: default avatarSameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c2093c80
......@@ -17,26 +17,23 @@
#include <linux/types.h>
/* Identifies mouse and keyboard activity which is specified by the firmware to
* the host using the cmsimpleinput protocol. @ingroup coretypes
/* These defines identify mouse and keyboard activity which is specified by the
* firmware to the host using the cmsimpleinput protocol. @ingroup coretypes
*/
enum ultra_inputaction {
inputaction_none = 0,
inputaction_xy_motion = 1, /* only motion; arg1=x, arg2=y */
inputaction_mouse_button_down = 2, /* arg1: 1=left,2=center,3=right */
inputaction_mouse_button_up = 3, /* arg1: 1=left,2=center,3=right */
inputaction_mouse_button_click = 4, /* arg1: 1=left,2=center,3=right */
inputaction_mouse_button_dclick = 5, /* arg1: 1=left,2=center,
#define INPUTACTION_XY_MOTION 1 /* only motion; arg1=x, arg2=y */
#define INPUTACTION_MOUSE_BUTTON_DOWN 2 /* arg1: 1=left,2=center,3=right */
#define INPUTACTION_MOUSE_BUTTON_UP 3 /* arg1: 1=left,2=center,3=right */
#define INPUTACTION_MOUSE_BUTTON_CLICK 4 /* arg1: 1=left,2=center,3=right */
#define INPUTACTION_MOUSE_BUTTON_DCLICK 5 /* arg1: 1=left,2=center,
* 3=right
*/
inputaction_wheel_rotate_away = 6, /* arg1: wheel rotation away from
#define INPUTACTION_WHEEL_ROTATE_AWAY 6 /* arg1: wheel rotation away from
* user
*/
inputaction_wheel_rotate_toward = 7, /* arg1: wheel rotation toward
#define INPUTACTION_WHEEL_ROTATE_TOWARD 7 /* arg1: wheel rotation toward
* user
*/
inputaction_set_max_xy = 8, /* set screen maxXY; arg1=x, arg2=y */
inputaction_key_down = 64, /* arg1: scancode, as follows:
#define INPUTACTION_KEY_DOWN 64 /* arg1: scancode, as follows:
* If arg1 <= 0xff, it's a 1-byte
* scancode and arg1 is that scancode.
* If arg1 > 0xff, it's a 2-byte
......@@ -45,10 +42,10 @@ enum ultra_inputaction {
* high 8 bits. E.g., the right ALT key
* would appear as x'38e0'.
*/
inputaction_key_up = 65, /* arg1: scancode (in same format as
#define INPUTACTION_KEY_UP 65 /* arg1: scancode (in same format as
* inputaction_keyDown)
*/
inputaction_set_locking_key_state = 66,
#define INPUTACTION_SET_LOCKING_KEY_STATE 66
/* arg1: scancode (in same format
* as inputaction_keyDown);
* MUST refer to one of the
......@@ -58,11 +55,9 @@ enum ultra_inputaction {
* in the LOCKED position
* (e.g., light is ON)
*/
inputaction_key_down_up = 67, /* arg1: scancode (in same format
#define INPUTACTION_KEY_DOWN_UP 67 /* arg1: scancode (in same format
* as inputaction_keyDown)
*/
inputaction_last
};
struct visor_inputactivity {
u16 action;
......
......@@ -582,46 +582,46 @@ visorinput_channel_interrupt(struct visor_device *dev)
scancode = r.activity.arg1;
keycode = scancode_to_keycode(scancode);
switch (r.activity.action) {
case inputaction_key_down:
case INPUTACTION_KEY_DOWN:
input_report_key(visorinput_dev, keycode, 1);
input_sync(visorinput_dev);
break;
case inputaction_key_up:
case INPUTACTION_KEY_UP:
input_report_key(visorinput_dev, keycode, 0);
input_sync(visorinput_dev);
break;
case inputaction_key_down_up:
case INPUTACTION_KEY_DOWN_UP:
input_report_key(visorinput_dev, keycode, 1);
input_sync(visorinput_dev);
input_report_key(visorinput_dev, keycode, 0);
input_sync(visorinput_dev);
break;
case inputaction_set_locking_key_state:
case INPUTACTION_SET_LOCKING_KEY_STATE:
handle_locking_key(visorinput_dev, keycode,
r.activity.arg2);
break;
case inputaction_xy_motion:
case INPUTACTION_XY_MOTION:
xmotion = r.activity.arg1;
ymotion = r.activity.arg2;
input_report_abs(visorinput_dev, ABS_X, xmotion);
input_report_abs(visorinput_dev, ABS_Y, ymotion);
input_sync(visorinput_dev);
break;
case inputaction_mouse_button_down:
case INPUTACTION_MOUSE_BUTTON_DOWN:
button = calc_button(r.activity.arg1);
if (button < 0)
break;
input_report_key(visorinput_dev, button, 1);
input_sync(visorinput_dev);
break;
case inputaction_mouse_button_up:
case INPUTACTION_MOUSE_BUTTON_UP:
button = calc_button(r.activity.arg1);
if (button < 0)
break;
input_report_key(visorinput_dev, button, 0);
input_sync(visorinput_dev);
break;
case inputaction_mouse_button_click:
case INPUTACTION_MOUSE_BUTTON_CLICK:
button = calc_button(r.activity.arg1);
if (button < 0)
break;
......@@ -631,7 +631,7 @@ visorinput_channel_interrupt(struct visor_device *dev)
input_report_key(visorinput_dev, button, 0);
input_sync(visorinput_dev);
break;
case inputaction_mouse_button_dclick:
case INPUTACTION_MOUSE_BUTTON_DCLICK:
button = calc_button(r.activity.arg1);
if (button < 0)
break;
......@@ -642,11 +642,11 @@ visorinput_channel_interrupt(struct visor_device *dev)
input_sync(visorinput_dev);
}
break;
case inputaction_wheel_rotate_away:
case INPUTACTION_WHEEL_ROTATE_AWAY:
input_report_rel(visorinput_dev, REL_WHEEL, 1);
input_sync(visorinput_dev);
break;
case inputaction_wheel_rotate_toward:
case INPUTACTION_WHEEL_ROTATE_TOWARD:
input_report_rel(visorinput_dev, REL_WHEEL, -1);
input_sync(visorinput_dev);
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment