diff options
author | Adrian Drzewiecki <adriand@drze.net> | 2007-01-06 06:37:26 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2007-01-08 10:05:22 -0500 |
commit | 35068976916fdef82d6e69ef1f8c9a1c47732759 (patch) | |
tree | d03393bd8bc622b616e2c82935170ddf2d0ec1ec /drivers/hid | |
parent | bf81b46482c0fa8ea638e409d39768ea92a6b0f0 (diff) |
HID: fix mappings for DiNovo Edge Keyboard - Logitech USB BT receiver
This patch fixes mappings for the Logitech USB BT receiver that
ships along with Logitech's DiNovo Edge keyboard. Without these
changes, the "touchwheel" does not work as intended (a mouse)
Signed-off-by: Adrian Drzewiecki <adriand@drze.net>
Acked-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-input.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 998638020ea0..28689e3eb552 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -68,6 +68,7 @@ static const struct { | |||
68 | #define map_led(c) do { usage->code = c; usage->type = EV_LED; bit = input->ledbit; max = LED_MAX; } while (0) | 68 | #define map_led(c) do { usage->code = c; usage->type = EV_LED; bit = input->ledbit; max = LED_MAX; } while (0) |
69 | 69 | ||
70 | #define map_abs_clear(c) do { map_abs(c); clear_bit(c, bit); } while (0) | 70 | #define map_abs_clear(c) do { map_abs(c); clear_bit(c, bit); } while (0) |
71 | #define map_rel_clear(c) do { map_rel(c); clear_bit(c, bit); } while (0) | ||
71 | #define map_key_clear(c) do { map_key(c); clear_bit(c, bit); } while (0) | 72 | #define map_key_clear(c) do { map_key(c); clear_bit(c, bit); } while (0) |
72 | 73 | ||
73 | #ifdef CONFIG_USB_HIDINPUT_POWERBOOK | 74 | #ifdef CONFIG_USB_HIDINPUT_POWERBOOK |
@@ -292,7 +293,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
292 | } | 293 | } |
293 | } | 294 | } |
294 | 295 | ||
295 | map_key(code); | 296 | map_key_clear(code); |
296 | break; | 297 | break; |
297 | 298 | ||
298 | 299 | ||
@@ -343,9 +344,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
343 | case HID_GD_RX: case HID_GD_RY: case HID_GD_RZ: | 344 | case HID_GD_RX: case HID_GD_RY: case HID_GD_RZ: |
344 | case HID_GD_SLIDER: case HID_GD_DIAL: case HID_GD_WHEEL: | 345 | case HID_GD_SLIDER: case HID_GD_DIAL: case HID_GD_WHEEL: |
345 | if (field->flags & HID_MAIN_ITEM_RELATIVE) | 346 | if (field->flags & HID_MAIN_ITEM_RELATIVE) |
346 | map_rel(usage->hid & 0xf); | 347 | map_rel_clear(usage->hid & 0xf); |
347 | else | 348 | else |
348 | map_abs(usage->hid & 0xf); | 349 | map_abs_clear(usage->hid & 0xf); |
349 | break; | 350 | break; |
350 | 351 | ||
351 | case HID_GD_HATSWITCH: | 352 | case HID_GD_HATSWITCH: |
@@ -500,7 +501,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
500 | case 0x22f: map_key_clear(KEY_ZOOMRESET); break; | 501 | case 0x22f: map_key_clear(KEY_ZOOMRESET); break; |
501 | case 0x233: map_key_clear(KEY_SCROLLUP); break; | 502 | case 0x233: map_key_clear(KEY_SCROLLUP); break; |
502 | case 0x234: map_key_clear(KEY_SCROLLDOWN); break; | 503 | case 0x234: map_key_clear(KEY_SCROLLDOWN); break; |
503 | case 0x238: map_rel(REL_HWHEEL); break; | 504 | case 0x238: map_rel_clear(REL_HWHEEL); break; |
504 | case 0x25f: map_key_clear(KEY_CANCEL); break; | 505 | case 0x25f: map_key_clear(KEY_CANCEL); break; |
505 | case 0x279: map_key_clear(KEY_REDO); break; | 506 | case 0x279: map_key_clear(KEY_REDO); break; |
506 | 507 | ||