aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/hid-input.c
diff options
context:
space:
mode:
authorVojtech Pavlik <vojtech@suse.cz>2005-09-05 01:08:08 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2005-09-05 01:08:08 -0400
commit8a409b0118c2d78f84f740f60fe03abda1fe3333 (patch)
treecfb6e118361c275b4f114d1c843588dee9ad4793 /drivers/usb/input/hid-input.c
parent0aebfdac042b63d0f2625414062e138a4333181c (diff)
Input: HID - add more consumer usages
Extend mapping of the consumer usage page in hid-input.c to handle more cases appearing on new USB keyboards. Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/usb/input/hid-input.c')
-rw-r--r--drivers/usb/input/hid-input.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c
index fa4f79d88aa7..b28cf8593b48 100644
--- a/drivers/usb/input/hid-input.c
+++ b/drivers/usb/input/hid-input.c
@@ -78,8 +78,8 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
78{ 78{
79 struct input_dev *input = &hidinput->input; 79 struct input_dev *input = &hidinput->input;
80 struct hid_device *device = hidinput->input.private; 80 struct hid_device *device = hidinput->input.private;
81 int max, code; 81 int max = 0, code;
82 unsigned long *bit; 82 unsigned long *bit = NULL;
83 83
84 field->hidinput = hidinput; 84 field->hidinput = hidinput;
85 85
@@ -248,7 +248,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
248 case 0x034: map_key_clear(KEY_SLEEP); break; 248 case 0x034: map_key_clear(KEY_SLEEP); break;
249 case 0x036: map_key_clear(BTN_MISC); break; 249 case 0x036: map_key_clear(BTN_MISC); break;
250 case 0x08a: map_key_clear(KEY_WWW); break; 250 case 0x08a: map_key_clear(KEY_WWW); break;
251 case 0x08d: map_key_clear(KEY_PROGRAM); break;
251 case 0x095: map_key_clear(KEY_HELP); break; 252 case 0x095: map_key_clear(KEY_HELP); break;
253 case 0x09c: map_key_clear(KEY_CHANNELUP); break;
254 case 0x09d: map_key_clear(KEY_CHANNELDOWN); break;
252 case 0x0b0: map_key_clear(KEY_PLAY); break; 255 case 0x0b0: map_key_clear(KEY_PLAY); break;
253 case 0x0b1: map_key_clear(KEY_PAUSE); break; 256 case 0x0b1: map_key_clear(KEY_PAUSE); break;
254 case 0x0b2: map_key_clear(KEY_RECORD); break; 257 case 0x0b2: map_key_clear(KEY_RECORD); break;
@@ -268,6 +271,11 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
268 case 0x18a: map_key_clear(KEY_MAIL); break; 271 case 0x18a: map_key_clear(KEY_MAIL); break;
269 case 0x192: map_key_clear(KEY_CALC); break; 272 case 0x192: map_key_clear(KEY_CALC); break;
270 case 0x194: map_key_clear(KEY_FILE); break; 273 case 0x194: map_key_clear(KEY_FILE); break;
274 case 0x1a7: map_key_clear(KEY_DOCUMENTS); break;
275 case 0x201: map_key_clear(KEY_NEW); break;
276 case 0x207: map_key_clear(KEY_SAVE); break;
277 case 0x208: map_key_clear(KEY_PRINT); break;
278 case 0x209: map_key_clear(KEY_PROPS); break;
271 case 0x21a: map_key_clear(KEY_UNDO); break; 279 case 0x21a: map_key_clear(KEY_UNDO); break;
272 case 0x21b: map_key_clear(KEY_COPY); break; 280 case 0x21b: map_key_clear(KEY_COPY); break;
273 case 0x21c: map_key_clear(KEY_CUT); break; 281 case 0x21c: map_key_clear(KEY_CUT); break;
@@ -280,7 +288,11 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
280 case 0x227: map_key_clear(KEY_REFRESH); break; 288 case 0x227: map_key_clear(KEY_REFRESH); break;
281 case 0x22a: map_key_clear(KEY_BOOKMARKS); break; 289 case 0x22a: map_key_clear(KEY_BOOKMARKS); break;
282 case 0x238: map_rel(REL_HWHEEL); break; 290 case 0x238: map_rel(REL_HWHEEL); break;
283 default: goto unknown; 291 case 0x279: map_key_clear(KEY_REDO); break;
292 case 0x289: map_key_clear(KEY_REPLY); break;
293 case 0x28b: map_key_clear(KEY_FORWARDMAIL); break;
294 case 0x28c: map_key_clear(KEY_SEND); break;
295 default: goto ignore;
284 } 296 }
285 break; 297 break;
286 298
@@ -306,6 +318,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
306 318
307 case HID_UP_MSVENDOR: 319 case HID_UP_MSVENDOR:
308 case HID_UP_LOGIVENDOR: 320 case HID_UP_LOGIVENDOR:
321 case HID_UP_LOGIVENDOR2:
309 322
310 goto ignore; 323 goto ignore;
311 324