diff options
Diffstat (limited to 'drivers/usb/input/hid-input.c')
-rw-r--r-- | drivers/usb/input/hid-input.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c index 7208839f2dbf..37b9ea8ec3b3 100644 --- a/drivers/usb/input/hid-input.c +++ b/drivers/usb/input/hid-input.c | |||
@@ -65,11 +65,9 @@ static const struct { | |||
65 | #define map_rel(c) do { usage->code = c; usage->type = EV_REL; bit = input->relbit; max = REL_MAX; } while (0) | 65 | #define map_rel(c) do { usage->code = c; usage->type = EV_REL; bit = input->relbit; max = REL_MAX; } while (0) |
66 | #define map_key(c) do { usage->code = c; usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX; } while (0) | 66 | #define map_key(c) do { usage->code = c; usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX; } while (0) |
67 | #define map_led(c) do { usage->code = c; usage->type = EV_LED; bit = input->ledbit; max = LED_MAX; } while (0) | 67 | #define map_led(c) do { usage->code = c; usage->type = EV_LED; bit = input->ledbit; max = LED_MAX; } while (0) |
68 | #define map_ff(c) do { usage->code = c; usage->type = EV_FF; bit = input->ffbit; max = FF_MAX; } while (0) | ||
69 | 68 | ||
70 | #define map_abs_clear(c) do { map_abs(c); clear_bit(c, bit); } while (0) | 69 | #define map_abs_clear(c) do { map_abs(c); clear_bit(c, bit); } while (0) |
71 | #define map_key_clear(c) do { map_key(c); clear_bit(c, bit); } while (0) | 70 | #define map_key_clear(c) do { map_key(c); clear_bit(c, bit); } while (0) |
72 | #define map_ff_effect(c) do { set_bit(c, input->ffbit); } while (0) | ||
73 | 71 | ||
74 | #ifdef CONFIG_USB_HIDINPUT_POWERBOOK | 72 | #ifdef CONFIG_USB_HIDINPUT_POWERBOOK |
75 | 73 | ||
@@ -525,23 +523,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
525 | 523 | ||
526 | case HID_UP_PID: | 524 | case HID_UP_PID: |
527 | 525 | ||
528 | set_bit(EV_FF, input->evbit); | ||
529 | switch(usage->hid & HID_USAGE) { | 526 | switch(usage->hid & HID_USAGE) { |
530 | case 0x26: map_ff_effect(FF_CONSTANT); goto ignore; | ||
531 | case 0x27: map_ff_effect(FF_RAMP); goto ignore; | ||
532 | case 0x28: map_ff_effect(FF_CUSTOM); goto ignore; | ||
533 | case 0x30: map_ff_effect(FF_SQUARE); map_ff_effect(FF_PERIODIC); goto ignore; | ||
534 | case 0x31: map_ff_effect(FF_SINE); map_ff_effect(FF_PERIODIC); goto ignore; | ||
535 | case 0x32: map_ff_effect(FF_TRIANGLE); map_ff_effect(FF_PERIODIC); goto ignore; | ||
536 | case 0x33: map_ff_effect(FF_SAW_UP); map_ff_effect(FF_PERIODIC); goto ignore; | ||
537 | case 0x34: map_ff_effect(FF_SAW_DOWN); map_ff_effect(FF_PERIODIC); goto ignore; | ||
538 | case 0x40: map_ff_effect(FF_SPRING); goto ignore; | ||
539 | case 0x41: map_ff_effect(FF_DAMPER); goto ignore; | ||
540 | case 0x42: map_ff_effect(FF_INERTIA); goto ignore; | ||
541 | case 0x43: map_ff_effect(FF_FRICTION); goto ignore; | ||
542 | case 0x7e: map_ff(FF_GAIN); break; | ||
543 | case 0x83: input->ff_effects_max = field->value[0]; goto ignore; | ||
544 | case 0x98: map_ff(FF_AUTOCENTER); break; | ||
545 | case 0xa4: map_key_clear(BTN_DEAD); break; | 527 | case 0xa4: map_key_clear(BTN_DEAD); break; |
546 | default: goto ignore; | 528 | default: goto ignore; |
547 | } | 529 | } |
@@ -698,8 +680,7 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct | |||
698 | } | 680 | } |
699 | 681 | ||
700 | if (usage->hid == (HID_UP_PID | 0x83UL)) { /* Simultaneous Effects Max */ | 682 | if (usage->hid == (HID_UP_PID | 0x83UL)) { /* Simultaneous Effects Max */ |
701 | input->ff_effects_max = value; | 683 | dbg("Maximum Effects - %d",value); |
702 | dbg("Maximum Effects - %d",input->ff_effects_max); | ||
703 | return; | 684 | return; |
704 | } | 685 | } |
705 | 686 | ||