lkml.org 
[lkml]   [2005]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/6] Add support for H-Wheel on Microsoft Explorer and Logitech MX mice
Date
From
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/for-linus

===================================================================

ChangeSet@1.1970, 2005-01-11 17:45:14+01:00, vojtech@silver.ucw.cz
input: Add support for H-Wheel on Microsoft Explorer and Logitech MX
USB HID mice.

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>


hid-debug.h | 24 ++++++++++++++----------
hid-input.c | 12 +++++++++---
hid.h | 1 +
3 files changed, 24 insertions(+), 13 deletions(-)

===================================================================

diff -Nru a/drivers/usb/input/hid-debug.h b/drivers/usb/input/hid-debug.h
--- a/drivers/usb/input/hid-debug.h 2005-01-27 17:48:14 +01:00
+++ b/drivers/usb/input/hid-debug.h 2005-01-27 17:48:14 +01:00
@@ -81,15 +81,21 @@
{0, 0x8b, "SystemMenuLeft"},
{0, 0x8c, "SystemMenuUp"},
{0, 0x8d, "SystemMenuDown"},
- {0, 0x90, "D-padUp"},
- {0, 0x91, "D-padDown"},
- {0, 0x92, "D-padRight"},
- {0, 0x93, "D-padLeft"},
+ {0, 0x90, "D-PadUp"},
+ {0, 0x91, "D-PadDown"},
+ {0, 0x92, "D-PadRight"},
+ {0, 0x93, "D-PadLeft"},
{ 7, 0, "Keyboard" },
+ {0, 0x01, "NumLock"},
+ {0, 0x02, "CapsLock"},
+ {0, 0x03, "ScrollLock"},
+ {0, 0x04, "Compose"},
+ {0, 0x05, "Kana"},
{ 8, 0, "LED" },
{ 9, 0, "Button" },
{ 10, 0, "Ordinal" },
- { 12, 0, "Hotkey" },
+ { 12, 0, "Consumer" },
+ {0, 0x238, "HorizontalWheel"},
{ 13, 0, "Digitizers" },
{0, 0x01, "Digitizer"},
{0, 0x02, "Pen"},
@@ -653,12 +659,10 @@
[KEY_SLOW] = "Slow", [KEY_SHUFFLE] = "Shuffle",
[KEY_BREAK] = "Break", [KEY_PREVIOUS] = "Previous",
[KEY_DIGITS] = "Digits", [KEY_TEEN] = "TEEN",
- [KEY_TWEN] = "TWEN", [KEY_DEL_EOL] = "Delete EOL",
- [KEY_DEL_EOS] = "Delete EOS", [KEY_INS_LINE] = "Insert line",
- [KEY_DEL_LINE] = "Delete line",
+ [KEY_TWEN] = "TWEN", [KEY_DEL_EOL] = "DeleteEOL",
+ [KEY_DEL_EOS] = "DeleteEOS", [KEY_INS_LINE] = "InsertLine",
+ [KEY_DEL_LINE] = "DeleteLine",
};
-
-static char *absval[5] = { "Value", "Min ", "Max ", "Fuzz ", "Flat " };

static char *relatives[REL_MAX + 1] = {
[0 ... REL_MAX] = NULL,
diff -Nru a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c
--- a/drivers/usb/input/hid-input.c 2005-01-27 17:48:14 +01:00
+++ b/drivers/usb/input/hid-input.c 2005-01-27 17:48:14 +01:00
@@ -185,7 +185,9 @@
break;

case HID_UP_LED:
- map_led((usage->hid - 1) & 0xf);
+ if (usage->hid - 1 >= LED_MAX)
+ goto ignore;
+ map_led(usage->hid - 1);
break;

case HID_UP_DIGITIZER:
@@ -231,7 +233,6 @@

case HID_UP_CONSUMER: /* USB HUT v1.1, pages 56-62 */

- set_bit(EV_REP, input->evbit);
switch (usage->hid & HID_USAGE) {
case 0x000: goto ignore;
case 0x034: map_key_clear(KEY_SLEEP); break;
@@ -268,6 +269,7 @@
case 0x226: map_key_clear(KEY_STOP); break;
case 0x227: map_key_clear(KEY_REFRESH); break;
case 0x22a: map_key_clear(KEY_BOOKMARKS); break;
+ case 0x238: map_rel(REL_HWHEEL); break;
default: goto unknown;
}
break;
@@ -288,9 +290,13 @@
case 0x084: map_key_clear(KEY_FINANCE); break;
case 0x085: map_key_clear(KEY_SPORT); break;
case 0x086: map_key_clear(KEY_SHOP); break;
- default: goto unknown;
+ default: goto ignore;
}
break;
+
+ case HID_UP_MSVENDOR:
+
+ goto ignore;

case HID_UP_PID:

diff -Nru a/drivers/usb/input/hid.h b/drivers/usb/input/hid.h
--- a/drivers/usb/input/hid.h 2005-01-27 17:48:14 +01:00
+++ b/drivers/usb/input/hid.h 2005-01-27 17:48:14 +01:00
@@ -181,6 +181,7 @@
#define HID_UP_DIGITIZER 0x000d0000
#define HID_UP_PID 0x000f0000
#define HID_UP_HPVENDOR 0xff7f0000
+#define HID_UP_MSVENDOR 0xff000000

#define HID_USAGE 0x0000ffff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.032 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site