···549549 keyboard and can not control its state550550 (Don't attempt to blink the leds)551551 i8042.noaux [HW] Don't check for auxiliary (== mouse) port552552+ i8042.nokbd [HW] Don't check/create keyboard port552553 i8042.nomux [HW] Don't check presence of an active multiplexing553554 controller554555 i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
+56-55
drivers/char/keyboard.c
···1414 * `Sticky' modifier keys, 951006.1515 *1616 * 11-11-96: SAK should now work in the raw mode (Martin Mares)1717- * 1717+ *1818 * Modified to provide 'generic' keyboard support by Hamish Macdonald1919 * Merge with the m68k keyboard driver and split-off of the PC low-level2020 * parts by Geert Uytterhoeven, May 1997···5252/*5353 * Some laptops take the 789uiojklm,. keys as number pad when NumLock is on.5454 * This seems a good reason to start with NumLock off. On HIL keyboards5555- * of PARISC machines however there is no NumLock key and everyone expects the keypad 5555+ * of PARISC machines however there is no NumLock key and everyone expects the keypad5656 * to be used for numbers.5757 */5858···7676 k_meta, k_ascii, k_lock, k_lowercase,\7777 k_slock, k_dead2, k_ignore, k_ignore78787979-typedef void (k_handler_fn)(struct vc_data *vc, unsigned char value, 7979+typedef void (k_handler_fn)(struct vc_data *vc, unsigned char value,8080 char up_flag, struct pt_regs *regs);8181static k_handler_fn K_HANDLERS;8282static k_handler_fn *k_handler[16] = { K_HANDLERS };83838484#define FN_HANDLERS\8585- fn_null, fn_enter, fn_show_ptregs, fn_show_mem,\8686- fn_show_state, fn_send_intr, fn_lastcons, fn_caps_toggle,\8787- fn_num, fn_hold, fn_scroll_forw, fn_scroll_back,\8888- fn_boot_it, fn_caps_on, fn_compose, fn_SAK,\8989- fn_dec_console, fn_inc_console, fn_spawn_con, fn_bare_num8585+ fn_null, fn_enter, fn_show_ptregs, fn_show_mem,\8686+ fn_show_state, fn_send_intr, fn_lastcons, fn_caps_toggle,\8787+ fn_num, fn_hold, fn_scroll_forw, fn_scroll_back,\8888+ fn_boot_it, fn_caps_on, fn_compose, fn_SAK,\8989+ fn_dec_console, fn_inc_console, fn_spawn_con, fn_bare_num90909191typedef void (fn_handler_fn)(struct vc_data *vc, struct pt_regs *regs);9292static fn_handler_fn FN_HANDLERS;···159159 */160160int getkeycode(unsigned int scancode)161161{162162- struct list_head * node;162162+ struct list_head *node;163163 struct input_dev *dev = NULL;164164165165- list_for_each(node,&kbd_handler.h_list) {166166- struct input_handle * handle = to_handle_h(node);167167- if (handle->dev->keycodesize) { 168168- dev = handle->dev; 165165+ list_for_each(node, &kbd_handler.h_list) {166166+ struct input_handle *handle = to_handle_h(node);167167+ if (handle->dev->keycodesize) {168168+ dev = handle->dev;169169 break;170170 }171171 }···181181182182int setkeycode(unsigned int scancode, unsigned int keycode)183183{184184- struct list_head * node;184184+ struct list_head *node;185185 struct input_dev *dev = NULL;186186 unsigned int i, oldkey;187187188188- list_for_each(node,&kbd_handler.h_list) {188188+ list_for_each(node, &kbd_handler.h_list) {189189 struct input_handle *handle = to_handle_h(node);190190- if (handle->dev->keycodesize) { 191191- dev = handle->dev; 192192- break; 190190+ if (handle->dev->keycodesize) {191191+ dev = handle->dev;192192+ break;193193 }194194 }195195···200200 return -EINVAL;201201 if (keycode < 0 || keycode > KEY_MAX)202202 return -EINVAL;203203- if (keycode >> (dev->keycodesize * 8))203203+ if (dev->keycodesize < sizeof(keycode) && (keycode >> (dev->keycodesize * 8)))204204 return -EINVAL;205205206206 oldkey = SET_INPUT_KEYCODE(dev, scancode, keycode);···216216}217217218218/*219219- * Making beeps and bells. 219219+ * Making beeps and bells.220220 */221221static void kd_nosound(unsigned long ignored)222222{223223- struct list_head * node;223223+ struct list_head *node;224224225225 list_for_each(node,&kbd_handler.h_list) {226226 struct input_handle *handle = to_handle_h(node);···237237238238void kd_mksound(unsigned int hz, unsigned int ticks)239239{240240- struct list_head * node;240240+ struct list_head *node;241241242242 del_timer(&kd_mksound_timer);243243244244 if (hz) {245245- list_for_each_prev(node,&kbd_handler.h_list) {245245+ list_for_each_prev(node, &kbd_handler.h_list) {246246 struct input_handle *handle = to_handle_h(node);247247 if (test_bit(EV_SND, handle->dev->evbit)) {248248 if (test_bit(SND_TONE, handle->dev->sndbit)) {···337337 if (c < 0x80)338338 /* 0******* */339339 put_queue(vc, c);340340- else if (c < 0x800) {340340+ else if (c < 0x800) {341341 /* 110***** 10****** */342342- put_queue(vc, 0xc0 | (c >> 6)); 342342+ put_queue(vc, 0xc0 | (c >> 6));343343 put_queue(vc, 0x80 | (c & 0x3f));344344- } else {344344+ } else {345345 /* 1110**** 10****** 10****** */346346 put_queue(vc, 0xe0 | (c >> 12));347347 put_queue(vc, 0x80 | ((c >> 6) & 0x3f));348348 put_queue(vc, 0x80 | (c & 0x3f));349349- }349349+ }350350}351351352352-/* 352352+/*353353 * Called after returning from RAW mode or when changing consoles - recompute354354 * shift_down[] and shift_state from key_down[] maybe called when keymap is355355 * undefined, so that shiftkey release is seen···360360361361 shift_state = 0;362362 memset(shift_down, 0, sizeof(shift_down));363363-363363+364364 for (i = 0; i < ARRAY_SIZE(key_down); i++) {365365366366 if (!key_down[i])···499499 if (want_console != -1)500500 cur = want_console;501501502502- for (i = cur-1; i != cur; i--) {502502+ for (i = cur - 1; i != cur; i--) {503503 if (i == -1)504504- i = MAX_NR_CONSOLES-1;504504+ i = MAX_NR_CONSOLES - 1;505505 if (vc_cons_allocated(i))506506 break;507507 }···567567568568static void fn_spawn_con(struct vc_data *vc, struct pt_regs *regs)569569{570570- if (spawnpid)571571- if(kill_proc(spawnpid, spawnsig, 1))572572- spawnpid = 0;570570+ if (spawnpid)571571+ if (kill_proc(spawnpid, spawnsig, 1))572572+ spawnpid = 0;573573}574574575575static void fn_SAK(struct vc_data *vc, struct pt_regs *regs)···603603 return;604604 if (value >= ARRAY_SIZE(fn_handler))605605 return;606606- if ((kbd->kbdmode == VC_RAW || 607607- kbd->kbdmode == VC_MEDIUMRAW) && 606606+ if ((kbd->kbdmode == VC_RAW ||607607+ kbd->kbdmode == VC_MEDIUMRAW) &&608608 value != KVAL(K_SAK))609609 return; /* SAK is allowed even in raw mode */610610 fn_handler[value](vc, regs);···894894895895static void kbd_bh(unsigned long dummy)896896{897897- struct list_head * node;897897+ struct list_head *node;898898 unsigned char leds = getleds();899899900900 if (leds != ledstate) {901901- list_for_each(node,&kbd_handler.h_list) {901901+ list_for_each(node, &kbd_handler.h_list) {902902 struct input_handle * handle = to_handle_h(node);903903 input_event(handle->dev, EV_LED, LED_SCROLLL, !!(leds & 0x01));904904 input_event(handle->dev, EV_LED, LED_NUML, !!(leds & 0x02));···963963extern void sun_do_break(void);964964#endif965965966966-static int emulate_raw(struct vc_data *vc, unsigned int keycode, 966966+static int emulate_raw(struct vc_data *vc, unsigned int keycode,967967 unsigned char up_flag)968968{969969 if (keycode > 255 || !x86_keycodes[keycode])970970- return -1; 970970+ return -1;971971972972 switch (keycode) {973973 case KEY_PAUSE:···981981 case KEY_HANJA:982982 if (!up_flag) put_queue(vc, 0xf2);983983 return 0;984984- } 984984+ }985985986986 if (keycode == KEY_SYSRQ && sysrq_alt) {987987 put_queue(vc, 0x54 | up_flag);···11041104 else11051105 clear_bit(keycode, key_down);1106110611071107- if (rep && (!vc_kbd_mode(kbd, VC_REPEAT) || (tty && 11081108- (!L_ECHO(tty) && tty->driver->chars_in_buffer(tty))))) {11071107+ if (rep &&11081108+ (!vc_kbd_mode(kbd, VC_REPEAT) ||11091109+ (tty && !L_ECHO(tty) && tty->driver->chars_in_buffer(tty)))) {11091110 /*11101111 * Don't repeat a key if the input buffers are not empty and the11111111- * characters get aren't echoed locally. This makes key repeat 11121112+ * characters get aren't echoed locally. This makes key repeat11121113 * usable with slow applications and under heavy loads.11131114 */11141115 return;···11311130 type = KTYP(keysym);1132113111331132 if (type < 0xf0) {11341134- if (down && !raw_mode) to_utf8(vc, keysym);11331133+ if (down && !raw_mode)11341134+ to_utf8(vc, keysym);11351135 return;11361136 }11371137···11561154 kbd->slockstate = 0;11571155}1158115611591159-static void kbd_event(struct input_handle *handle, unsigned int event_type, 11571157+static void kbd_event(struct input_handle *handle, unsigned int event_type,11601158 unsigned int event_code, int value)11611159{11621160 if (event_type == EV_MSC && event_code == MSC_RAW && HW_RAW(handle->dev))···11681166 schedule_console_callback();11691167}1170116811711171-static char kbd_name[] = "kbd";11721172-11731169/*11741170 * When a keyboard (or other input device) is found, the kbd_connect11751171 * function is called. The function then looks at the device, and if it11761172 * likes it, it can open it and get events from it. In this (kbd_connect)11771173 * function, we should decide which VT to bind that keyboard to initially.11781174 */11791179-static struct input_handle *kbd_connect(struct input_handler *handler, 11751175+static struct input_handle *kbd_connect(struct input_handler *handler,11801176 struct input_dev *dev,11811177 struct input_device_id *id)11821178{···11821182 int i;1183118311841184 for (i = KEY_RESERVED; i < BTN_MISC; i++)11851185- if (test_bit(i, dev->keybit)) break;11851185+ if (test_bit(i, dev->keybit))11861186+ break;1186118711871187- if ((i == BTN_MISC) && !test_bit(EV_SND, dev->evbit)) 11881188+ if (i == BTN_MISC && !test_bit(EV_SND, dev->evbit))11881189 return NULL;1189119011901190- if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL))) 11911191+ if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL)))11911192 return NULL;11921193 memset(handle, 0, sizeof(struct input_handle));1193119411941195 handle->dev = dev;11951196 handle->handler = handler;11961196- handle->name = kbd_name;11971197+ handle->name = "kbd";1197119811981199 input_open_device(handle);11991200 kbd_refresh_leds(handle);···12131212 .flags = INPUT_DEVICE_ID_MATCH_EVBIT,12141213 .evbit = { BIT(EV_KEY) },12151214 },12161216-12151215+12171216 {12181217 .flags = INPUT_DEVICE_ID_MATCH_EVBIT,12191218 .evbit = { BIT(EV_SND) },12201220- }, 12191219+ },1221122012221221 { }, /* Terminating entry */12231222};
+1-1
drivers/input/evdev.c
···322322 if (t < 0 || t >= dev->keycodemax || !dev->keycodesize) return -EINVAL;323323 if (get_user(v, ip + 1)) return -EFAULT;324324 if (v < 0 || v > KEY_MAX) return -EINVAL;325325- if (v >> (dev->keycodesize * 8)) return -EINVAL;325325+ if (dev->keycodesize < sizeof(v) && (v >> (dev->keycodesize * 8))) return -EINVAL;326326 u = SET_INPUT_KEYCODE(dev, t, v);327327 clear_bit(u, dev->keybit);328328 set_bit(v, dev->keybit);
+7-25
drivers/input/joystick/iforce/iforce-packets.c
···249249250250int iforce_get_id_packet(struct iforce *iforce, char *packet)251251{252252- DECLARE_WAITQUEUE(wait, current);253253- int timeout = HZ; /* 1 second */254254-255252 switch (iforce->bus) {256253257254 case IFORCE_USB:···257260 iforce->cr.bRequest = packet[0];258261 iforce->ctrl->dev = iforce->usbdev;259262260260- set_current_state(TASK_INTERRUPTIBLE);261261- add_wait_queue(&iforce->wait, &wait);262262-263263- if (usb_submit_urb(iforce->ctrl, GFP_ATOMIC)) {264264- set_current_state(TASK_RUNNING);265265- remove_wait_queue(&iforce->wait, &wait);263263+ if (usb_submit_urb(iforce->ctrl, GFP_ATOMIC))266264 return -1;267267- }268265269269- while (timeout && iforce->ctrl->status == -EINPROGRESS)270270- timeout = schedule_timeout(timeout);266266+ wait_event_interruptible_timeout(iforce->wait,267267+ iforce->ctrl->status != -EINPROGRESS, HZ);271268272272- set_current_state(TASK_RUNNING);273273- remove_wait_queue(&iforce->wait, &wait);274274-275275- if (!timeout) {269269+ if (iforce->ctrl->status != -EINPROGRESS) {276270 usb_unlink_urb(iforce->ctrl);277271 return -1;278272 }···278290 iforce->expect_packet = FF_CMD_QUERY;279291 iforce_send_packet(iforce, FF_CMD_QUERY, packet);280292281281- set_current_state(TASK_INTERRUPTIBLE);282282- add_wait_queue(&iforce->wait, &wait);293293+ wait_event_interruptible_timeout(iforce->wait,294294+ !iforce->expect_packet, HZ);283295284284- while (timeout && iforce->expect_packet)285285- timeout = schedule_timeout(timeout);286286-287287- set_current_state(TASK_RUNNING);288288- remove_wait_queue(&iforce->wait, &wait);289289-290290- if (!timeout) {296296+ if (iforce->expect_packet) {291297 iforce->expect_packet = 0;292298 return -1;293299 }
···11+/*22+ * IBM TrackPoint PS/2 mouse driver33+ *44+ * Stephen Evanchik <evanchsa@gmail.com>55+ *66+ * This program is free software; you can redistribute it and/or modify it77+ * under the terms of the GNU General Public License version 2 as published by88+ * the Free Software Foundation.99+ */1010+1111+#ifndef _TRACKPOINT_H1212+#define _TRACKPOINT_H1313+1414+/*1515+ * These constants are from the TrackPoint System1616+ * Engineering documentation Version 4 from IBM Watson1717+ * research:1818+ * http://wwwcssrv.almaden.ibm.com/trackpoint/download.html1919+ */2020+2121+#define TP_COMMAND 0xE2 /* Commands start with this */2222+2323+#define TP_READ_ID 0xE1 /* Sent for device identification */2424+#define TP_MAGIC_IDENT 0x01 /* Sent after a TP_READ_ID followed */2525+ /* by the firmware ID */2626+2727+2828+/*2929+ * Commands3030+ */3131+#define TP_RECALIB 0x51 /* Recalibrate */3232+#define TP_POWER_DOWN 0x44 /* Can only be undone through HW reset */3333+#define TP_EXT_DEV 0x21 /* Determines if external device is connected (RO) */3434+#define TP_EXT_BTN 0x4B /* Read extended button status */3535+#define TP_POR 0x7F /* Execute Power on Reset */3636+#define TP_POR_RESULTS 0x25 /* Read Power on Self test results */3737+#define TP_DISABLE_EXT 0x40 /* Disable external pointing device */3838+#define TP_ENABLE_EXT 0x41 /* Enable external pointing device */3939+4040+/*4141+ * Mode manipulation4242+ */4343+#define TP_SET_SOFT_TRANS 0x4E /* Set mode */4444+#define TP_CANCEL_SOFT_TRANS 0xB9 /* Cancel mode */4545+#define TP_SET_HARD_TRANS 0x45 /* Mode can only be set */4646+4747+4848+/*4949+ * Register oriented commands/properties5050+ */5151+#define TP_WRITE_MEM 0x815252+#define TP_READ_MEM 0x80 /* Not used in this implementation */5353+5454+/*5555+* RAM Locations for properties5656+ */5757+#define TP_SENS 0x4A /* Sensitivity */5858+#define TP_MB 0x4C /* Read Middle Button Status (RO) */5959+#define TP_INERTIA 0x4D /* Negative Inertia */6060+#define TP_SPEED 0x60 /* Speed of TP Cursor */6161+#define TP_REACH 0x57 /* Backup for Z-axis press */6262+#define TP_DRAGHYS 0x58 /* Drag Hysteresis */6363+ /* (how hard it is to drag */6464+ /* with Z-axis pressed) */6565+6666+#define TP_MINDRAG 0x59 /* Minimum amount of force needed */6767+ /* to trigger dragging */6868+6969+#define TP_THRESH 0x5C /* Minimum value for a Z-axis press */7070+#define TP_UP_THRESH 0x5A /* Used to generate a 'click' on Z-axis */7171+#define TP_Z_TIME 0x5E /* How sharp of a press */7272+#define TP_JENKS_CURV 0x5D /* Minimum curvature for double click */7373+7474+/*7575+ * Toggling Flag bits7676+ */7777+#define TP_TOGGLE 0x47 /* Toggle command */7878+7979+#define TP_TOGGLE_MB 0x23 /* Disable/Enable Middle Button */8080+#define TP_MASK_MB 0x018181+#define TP_TOGGLE_EXT_DEV 0x23 /* Toggle external device */8282+#define TP_MASK_EXT_DEV 0x028383+#define TP_TOGGLE_DRIFT 0x23 /* Drift Correction */8484+#define TP_MASK_DRIFT 0x808585+#define TP_TOGGLE_BURST 0x28 /* Burst Mode */8686+#define TP_MASK_BURST 0x808787+#define TP_TOGGLE_PTSON 0x2C /* Press to Select */8888+#define TP_MASK_PTSON 0x018989+#define TP_TOGGLE_HARD_TRANS 0x2C /* Alternate method to set Hard Transparency */9090+#define TP_MASK_HARD_TRANS 0x809191+#define TP_TOGGLE_TWOHAND 0x2D /* Two handed */9292+#define TP_MASK_TWOHAND 0x019393+#define TP_TOGGLE_STICKY_TWO 0x2D /* Sticky two handed */9494+#define TP_MASK_STICKY_TWO 0x049595+#define TP_TOGGLE_SKIPBACK 0x2D /* Suppress movement after drag release */9696+#define TP_MASK_SKIPBACK 0x089797+#define TP_TOGGLE_SOURCE_TAG 0x20 /* Bit 3 of the first packet will be set to9898+ to the origin of the packet (external or TP) */9999+#define TP_MASK_SOURCE_TAG 0x80100100+#define TP_TOGGLE_EXT_TAG 0x22 /* Bit 3 of the first packet coming from the101101+ external device will be forced to 1 */102102+#define TP_MASK_EXT_TAG 0x04103103+104104+105105+/* Power on Self Test Results */106106+#define TP_POR_SUCCESS 0x3B107107+108108+/*109109+ * Default power on values110110+ */111111+#define TP_DEF_SENS 0x80112112+#define TP_DEF_INERTIA 0x06113113+#define TP_DEF_SPEED 0x61114114+#define TP_DEF_REACH 0x0A115115+116116+#define TP_DEF_DRAGHYS 0xFF117117+#define TP_DEF_MINDRAG 0x14118118+119119+#define TP_DEF_THRESH 0x08120120+#define TP_DEF_UP_THRESH 0xFF121121+#define TP_DEF_Z_TIME 0x26122122+#define TP_DEF_JENKS_CURV 0x87123123+124124+/* Toggles */125125+#define TP_DEF_MB 0x00126126+#define TP_DEF_PTSON 0x00127127+#define TP_DEF_SKIPBACK 0x00128128+#define TP_DEF_EXT_DEV 0x01129129+130130+#define MAKE_PS2_CMD(params, results, cmd) ((params<<12) | (results<<8) | (cmd))131131+132132+struct trackpoint_data133133+{134134+ unsigned char sensitivity, speed, inertia, reach;135135+ unsigned char draghys, mindrag;136136+ unsigned char thresh, upthresh;137137+ unsigned char ztime, jenks;138138+139139+ unsigned char press_to_select;140140+ unsigned char skipback;141141+142142+ unsigned char ext_dev;143143+};144144+145145+extern int trackpoint_detect(struct psmouse *psmouse, int set_properties);146146+147147+#endif /* _TRACKPOINT_H */
···7878{7979 struct input_dev *input = &hidinput->input;8080 struct hid_device *device = hidinput->input.private;8181- int max, code;8282- unsigned long *bit;8181+ int max = 0, code;8282+ unsigned long *bit = NULL;83838484 field->hidinput = hidinput;8585···129129 }130130131131 map_key(code);132132+ break;133133+134134+135135+ case HID_UP_SIMULATION:136136+137137+ switch (usage->hid & 0xffff) {138138+ case 0xba: map_abs(ABS_RUDDER); break;139139+ case 0xbb: map_abs(ABS_THROTTLE); break;140140+ }132141 break;133142134143 case HID_UP_GENDESK:···247238 case 0x000: goto ignore;248239 case 0x034: map_key_clear(KEY_SLEEP); break;249240 case 0x036: map_key_clear(BTN_MISC); break;241241+ case 0x045: map_key_clear(KEY_RADIO); break;250242 case 0x08a: map_key_clear(KEY_WWW); break;243243+ case 0x08d: map_key_clear(KEY_PROGRAM); break;251244 case 0x095: map_key_clear(KEY_HELP); break;245245+ case 0x09c: map_key_clear(KEY_CHANNELUP); break;246246+ case 0x09d: map_key_clear(KEY_CHANNELDOWN); break;252247 case 0x0b0: map_key_clear(KEY_PLAY); break;253248 case 0x0b1: map_key_clear(KEY_PAUSE); break;254249 case 0x0b2: map_key_clear(KEY_RECORD); break;···272259 case 0x18a: map_key_clear(KEY_MAIL); break;273260 case 0x192: map_key_clear(KEY_CALC); break;274261 case 0x194: map_key_clear(KEY_FILE); break;262262+ case 0x1a7: map_key_clear(KEY_DOCUMENTS); break;263263+ case 0x201: map_key_clear(KEY_NEW); break;264264+ case 0x207: map_key_clear(KEY_SAVE); break;265265+ case 0x208: map_key_clear(KEY_PRINT); break;266266+ case 0x209: map_key_clear(KEY_PROPS); break;275267 case 0x21a: map_key_clear(KEY_UNDO); break;276268 case 0x21b: map_key_clear(KEY_COPY); break;277269 case 0x21c: map_key_clear(KEY_CUT); break;···289271 case 0x227: map_key_clear(KEY_REFRESH); break;290272 case 0x22a: map_key_clear(KEY_BOOKMARKS); break;291273 case 0x238: map_rel(REL_HWHEEL); break;292292- default: goto unknown;274274+ case 0x279: map_key_clear(KEY_REDO); break;275275+ case 0x289: map_key_clear(KEY_REPLY); break;276276+ case 0x28b: map_key_clear(KEY_FORWARDMAIL); break;277277+ case 0x28c: map_key_clear(KEY_SEND); break;278278+ default: goto ignore;293279 }294280 break;295281···318296 break;319297320298 case HID_UP_MSVENDOR:321321-322299 goto ignore;300300+301301+ case HID_UP_CUSTOM: /* Reported on Logitech and Powerbook USB keyboards */302302+303303+ set_bit(EV_REP, input->evbit);304304+ switch(usage->hid & HID_USAGE) {305305+ case 0x003: map_key_clear(KEY_FN); break;306306+ default: goto ignore;307307+ }308308+ break;309309+310310+ case HID_UP_LOGIVENDOR: /* Reported on Logitech Ultra X Media Remote */311311+312312+ set_bit(EV_REP, input->evbit);313313+ switch(usage->hid & HID_USAGE) {314314+ case 0x004: map_key_clear(KEY_AGAIN); break;315315+ case 0x00d: map_key_clear(KEY_HOME); break;316316+ case 0x024: map_key_clear(KEY_SHUFFLE); break;317317+ case 0x025: map_key_clear(KEY_TV); break;318318+ case 0x026: map_key_clear(KEY_MENU); break;319319+ case 0x031: map_key_clear(KEY_AUDIO); break;320320+ case 0x032: map_key_clear(KEY_SUBTITLE); break;321321+ case 0x033: map_key_clear(KEY_LAST); break;322322+ case 0x047: map_key_clear(KEY_MP3); break;323323+ case 0x048: map_key_clear(KEY_DVD); break;324324+ case 0x049: map_key_clear(KEY_MEDIA); break;325325+ case 0x04a: map_key_clear(KEY_VIDEO); break;326326+ case 0x04b: map_key_clear(KEY_ANGLE); break;327327+ case 0x04c: map_key_clear(KEY_LANGUAGE); break;328328+ case 0x04d: map_key_clear(KEY_SUBTITLE); break;329329+ case 0x051: map_key_clear(KEY_RED); break;330330+ case 0x052: map_key_clear(KEY_CLOSE); break;331331+ default: goto ignore;332332+ }333333+ break;323334324335 case HID_UP_PID:325336···403348404349 if (usage->code > max)405350 goto ignore;351351+352352+ if (((device->quirks & (HID_QUIRK_2WHEEL_POWERMOUSE)) && (usage->hid == 0x00010032)))353353+ map_rel(REL_HWHEEL);406354407355 if ((device->quirks & (HID_QUIRK_2WHEEL_MOUSE_HACK_7 | HID_QUIRK_2WHEEL_MOUSE_HACK_5)) &&408356 (usage->type == EV_REL) && (usage->code == REL_WHEEL))
+8-1
drivers/usb/input/hid.h
···173173174174#define HID_UP_UNDEFINED 0x00000000175175#define HID_UP_GENDESK 0x00010000176176+#define HID_UP_SIMULATION 0x00020000176177#define HID_UP_KEYBOARD 0x00070000177178#define HID_UP_LED 0x00080000178179#define HID_UP_BUTTON 0x00090000···183182#define HID_UP_PID 0x000f0000184183#define HID_UP_HPVENDOR 0xff7f0000185184#define HID_UP_MSVENDOR 0xff000000185185+#define HID_UP_CUSTOM 0x00ff0000186186+#define HID_UP_LOGIVENDOR 0xffbc0000186187187188#define HID_USAGE 0x0000ffff188189···245242#define HID_QUIRK_2WHEEL_MOUSE_HACK_7 0x080246243#define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x100247244#define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x200245245+#define HID_QUIRK_2WHEEL_POWERMOUSE 0x400248246249247/*250248 * This is the global environment of the parser. This information is···352348353349#define HID_REPORT_TYPES 3354350355355-#define HID_BUFFER_SIZE 64 /* use 64 for compatibility with all possible packetlen */351351+#define HID_MIN_BUFFER_SIZE 64 /* make sure there is at least a packet size of space */352352+#define HID_MAX_BUFFER_SIZE 4096 /* 4kb */356353#define HID_CONTROL_FIFO_SIZE 256 /* to init devices with >100 reports */357354#define HID_OUTPUT_FIFO_SIZE 64358355···390385 int ifnum; /* USB interface number */391386392387 unsigned long iofl; /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */388388+389389+ unsigned int bufsize; /* URB buffer size */393390394391 struct urb *urbin; /* Input URB */395392 char *inbuf; /* Input buffer */