diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:08:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:08:02 -0400 |
commit | 04f2b9765f1e80337314e03c4adde695fe2f0403 (patch) | |
tree | bde948d37c22eaf5e200dd9675543ea2b2e059c2 /drivers/hid | |
parent | 9895850b23886e030cd1e7241d5529a57e969c3d (diff) | |
parent | 5fc0d36c00e6a2d0a9f2a0a815cff5b9a13b080d (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: xpad - add USB-ID for PL-3601 Xbox 360 pad
Input: cy8ctmg100_ts - signedness bug
Input: elantech - report position also with 3 fingers
Input: elantech - discard the first 2 positions on some firmwares
Input: adxl34x - do not mark device as disabled on startup
Input: gpio_keys - add hooks to enable/disable device
Input: evdev - rearrange ioctl handling
Input: dynamically allocate ABS information
Input: switch to input_abs_*() access functions
Input: add static inline accessors for ABS properties
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-wacom.c | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c index 807dcd1555a6..724f46ed612f 100644 --- a/drivers/hid/hid-wacom.c +++ b/drivers/hid/hid-wacom.c | |||
@@ -230,7 +230,7 @@ static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report, | |||
230 | input_report_key(input, BTN_RIGHT, 0); | 230 | input_report_key(input, BTN_RIGHT, 0); |
231 | input_report_key(input, BTN_MIDDLE, 0); | 231 | input_report_key(input, BTN_MIDDLE, 0); |
232 | input_report_abs(input, ABS_DISTANCE, | 232 | input_report_abs(input, ABS_DISTANCE, |
233 | input->absmax[ABS_DISTANCE]); | 233 | input_abs_get_max(input, ABS_DISTANCE)); |
234 | } else { | 234 | } else { |
235 | input_report_key(input, BTN_TOUCH, 0); | 235 | input_report_key(input, BTN_TOUCH, 0); |
236 | input_report_key(input, BTN_STYLUS, 0); | 236 | input_report_key(input, BTN_STYLUS, 0); |
@@ -383,38 +383,37 @@ move_on: | |||
383 | 383 | ||
384 | /* Basics */ | 384 | /* Basics */ |
385 | input->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_REL); | 385 | input->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_REL); |
386 | input->absbit[0] |= BIT(ABS_X) | BIT(ABS_Y) | | 386 | |
387 | BIT(ABS_PRESSURE) | BIT(ABS_DISTANCE); | 387 | __set_bit(REL_WHEEL, input->relbit); |
388 | input->relbit[0] |= BIT(REL_WHEEL); | 388 | |
389 | set_bit(BTN_TOOL_PEN, input->keybit); | 389 | __set_bit(BTN_TOOL_PEN, input->keybit); |
390 | set_bit(BTN_TOUCH, input->keybit); | 390 | __set_bit(BTN_TOUCH, input->keybit); |
391 | set_bit(BTN_STYLUS, input->keybit); | 391 | __set_bit(BTN_STYLUS, input->keybit); |
392 | set_bit(BTN_STYLUS2, input->keybit); | 392 | __set_bit(BTN_STYLUS2, input->keybit); |
393 | set_bit(BTN_LEFT, input->keybit); | 393 | __set_bit(BTN_LEFT, input->keybit); |
394 | set_bit(BTN_RIGHT, input->keybit); | 394 | __set_bit(BTN_RIGHT, input->keybit); |
395 | set_bit(BTN_MIDDLE, input->keybit); | 395 | __set_bit(BTN_MIDDLE, input->keybit); |
396 | 396 | ||
397 | /* Pad */ | 397 | /* Pad */ |
398 | input->evbit[0] |= BIT(EV_MSC); | 398 | input->evbit[0] |= BIT(EV_MSC); |
399 | input->mscbit[0] |= BIT(MSC_SERIAL); | ||
400 | set_bit(BTN_0, input->keybit); | ||
401 | set_bit(BTN_1, input->keybit); | ||
402 | set_bit(BTN_TOOL_FINGER, input->keybit); | ||
403 | 399 | ||
404 | /* Distance, rubber and mouse */ | 400 | __set_bit(MSC_SERIAL, input->mscbit); |
405 | input->absbit[0] |= BIT(ABS_DISTANCE); | ||
406 | set_bit(BTN_TOOL_RUBBER, input->keybit); | ||
407 | set_bit(BTN_TOOL_MOUSE, input->keybit); | ||
408 | 401 | ||
409 | input->absmax[ABS_PRESSURE] = 511; | 402 | __set_bit(BTN_0, input->keybit); |
410 | input->absmax[ABS_DISTANCE] = 32; | 403 | __set_bit(BTN_1, input->keybit); |
404 | __set_bit(BTN_TOOL_FINGER, input->keybit); | ||
411 | 405 | ||
412 | input->absmax[ABS_X] = 16704; | 406 | /* Distance, rubber and mouse */ |
413 | input->absmax[ABS_Y] = 12064; | 407 | __set_bit(BTN_TOOL_RUBBER, input->keybit); |
414 | input->absfuzz[ABS_X] = 4; | 408 | __set_bit(BTN_TOOL_MOUSE, input->keybit); |
415 | input->absfuzz[ABS_Y] = 4; | 409 | |
410 | input_set_abs_params(input, ABS_X, 0, 16704, 4, 0); | ||
411 | input_set_abs_params(input, ABS_Y, 0, 12064, 4, 0); | ||
412 | input_set_abs_params(input, ABS_PRESSURE, 0, 511, 0, 0); | ||
413 | input_set_abs_params(input, ABS_DISTANCE, 0, 32, 0, 0); | ||
416 | 414 | ||
417 | return 0; | 415 | return 0; |
416 | |||
418 | err_free: | 417 | err_free: |
419 | kfree(wdata); | 418 | kfree(wdata); |
420 | return ret; | 419 | return ret; |