diff options
| -rw-r--r-- | drivers/hid/wacom_wac.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index caf035f662b9..74c9fbde5695 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c | |||
| @@ -600,8 +600,8 @@ static void wacom_intuos_general(struct wacom_wac *wacom) | |||
| 600 | } | 600 | } |
| 601 | input_report_abs(input, ABS_PRESSURE, t); | 601 | input_report_abs(input, ABS_PRESSURE, t); |
| 602 | input_report_abs(input, ABS_TILT_X, | 602 | input_report_abs(input, ABS_TILT_X, |
| 603 | ((data[7] << 1) & 0x7e) | (data[8] >> 7)); | 603 | (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64); |
| 604 | input_report_abs(input, ABS_TILT_Y, data[8] & 0x7f); | 604 | input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64); |
| 605 | input_report_key(input, BTN_STYLUS, data[1] & 2); | 605 | input_report_key(input, BTN_STYLUS, data[1] & 2); |
| 606 | input_report_key(input, BTN_STYLUS2, data[1] & 4); | 606 | input_report_key(input, BTN_STYLUS2, data[1] & 4); |
| 607 | input_report_key(input, BTN_TOUCH, t > 10); | 607 | input_report_key(input, BTN_TOUCH, t > 10); |
| @@ -612,8 +612,8 @@ static void wacom_intuos_general(struct wacom_wac *wacom) | |||
| 612 | input_report_abs(input, ABS_WHEEL, | 612 | input_report_abs(input, ABS_WHEEL, |
| 613 | (data[6] << 2) | ((data[7] >> 6) & 3)); | 613 | (data[6] << 2) | ((data[7] >> 6) & 3)); |
| 614 | input_report_abs(input, ABS_TILT_X, | 614 | input_report_abs(input, ABS_TILT_X, |
| 615 | ((data[7] << 1) & 0x7e) | (data[8] >> 7)); | 615 | (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64); |
| 616 | input_report_abs(input, ABS_TILT_Y, data[8] & 0x7f); | 616 | input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64); |
| 617 | } | 617 | } |
| 618 | } | 618 | } |
| 619 | 619 | ||
| @@ -915,8 +915,8 @@ static int wacom_intuos_irq(struct wacom_wac *wacom) | |||
| 915 | input_report_key(input, BTN_EXTRA, data[6] & 0x10); | 915 | input_report_key(input, BTN_EXTRA, data[6] & 0x10); |
| 916 | 916 | ||
| 917 | input_report_abs(input, ABS_TILT_X, | 917 | input_report_abs(input, ABS_TILT_X, |
| 918 | ((data[7] << 1) & 0x7e) | (data[8] >> 7)); | 918 | (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64); |
| 919 | input_report_abs(input, ABS_TILT_Y, data[8] & 0x7f); | 919 | input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64); |
| 920 | } else { | 920 | } else { |
| 921 | /* 2D mouse packet */ | 921 | /* 2D mouse packet */ |
| 922 | input_report_key(input, BTN_LEFT, data[8] & 0x04); | 922 | input_report_key(input, BTN_LEFT, data[8] & 0x04); |
| @@ -1929,8 +1929,8 @@ static void wacom_setup_cintiq(struct wacom_wac *wacom_wac) | |||
| 1929 | input_set_abs_params(input_dev, ABS_DISTANCE, | 1929 | input_set_abs_params(input_dev, ABS_DISTANCE, |
| 1930 | 0, wacom_wac->features.distance_max, 0, 0); | 1930 | 0, wacom_wac->features.distance_max, 0, 0); |
| 1931 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 1023, 0, 0); | 1931 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 1023, 0, 0); |
| 1932 | input_set_abs_params(input_dev, ABS_TILT_X, 0, 127, 0, 0); | 1932 | input_set_abs_params(input_dev, ABS_TILT_X, -64, 63, 0, 0); |
| 1933 | input_set_abs_params(input_dev, ABS_TILT_Y, 0, 127, 0, 0); | 1933 | input_set_abs_params(input_dev, ABS_TILT_Y, -64, 63, 0, 0); |
| 1934 | } | 1934 | } |
| 1935 | 1935 | ||
| 1936 | static void wacom_setup_intuos(struct wacom_wac *wacom_wac) | 1936 | static void wacom_setup_intuos(struct wacom_wac *wacom_wac) |
