diff options
author | Aaron Skomra <skomra@gmail.com> | 2015-08-20 19:05:16 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-08-28 14:43:20 -0400 |
commit | 70ee06c5f447b9d50747b29d3e8d48ae7ef1cabe (patch) | |
tree | 57ef56f7a6a845f59f305b396116b62fb8cdcc3b | |
parent | 76703be827a7867c28b904562bc78ed1314698bc (diff) |
HID: wacom: Set button bits based on a new numbered_buttons
Prior to this commit, numbered button bit setting was done separately
for each device type in wacom_setup_pad_capabilities(). Here we add a
numbered_buttons property to the wacom_features struct and extract the
repeated bit setting code to a new function:
wacom_settup_numbered_buttons().
Signed-off-by: Aaron Skomra <aaron.skomra@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/wacom_wac.c | 175 | ||||
-rw-r--r-- | drivers/hid/wacom_wac.h | 1 |
2 files changed, 61 insertions, 115 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 3024a3c2b4ff..ee5d278afa3f 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c | |||
@@ -2577,11 +2577,23 @@ int wacom_setup_touch_input_capabilities(struct input_dev *input_dev, | |||
2577 | return 0; | 2577 | return 0; |
2578 | } | 2578 | } |
2579 | 2579 | ||
2580 | void wacom_setup_numbered_buttons(struct input_dev *input_dev, | ||
2581 | int button_count) | ||
2582 | { | ||
2583 | int i; | ||
2584 | |||
2585 | for (i = 0; i < button_count && i < 10; i++) | ||
2586 | __set_bit(BTN_0 + i, input_dev->keybit); | ||
2587 | for (i = 10; i < button_count && i < 16; i++) | ||
2588 | __set_bit(BTN_A + (i-10), input_dev->keybit); | ||
2589 | for (i = 16; i < button_count && i < 18; i++) | ||
2590 | __set_bit(BTN_BASE + (i-16), input_dev->keybit); | ||
2591 | } | ||
2592 | |||
2580 | int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, | 2593 | int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, |
2581 | struct wacom_wac *wacom_wac) | 2594 | struct wacom_wac *wacom_wac) |
2582 | { | 2595 | { |
2583 | struct wacom_features *features = &wacom_wac->features; | 2596 | struct wacom_features *features = &wacom_wac->features; |
2584 | int i; | ||
2585 | 2597 | ||
2586 | if (!(features->device_type & WACOM_DEVICETYPE_PAD)) | 2598 | if (!(features->device_type & WACOM_DEVICETYPE_PAD)) |
2587 | return -ENODEV; | 2599 | return -ENODEV; |
@@ -2598,10 +2610,14 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, | |||
2598 | /* kept for making udev and libwacom accepting the pad */ | 2610 | /* kept for making udev and libwacom accepting the pad */ |
2599 | __set_bit(BTN_STYLUS, input_dev->keybit); | 2611 | __set_bit(BTN_STYLUS, input_dev->keybit); |
2600 | 2612 | ||
2613 | wacom_setup_numbered_buttons(input_dev, features->numbered_buttons); | ||
2614 | |||
2601 | switch (features->type) { | 2615 | switch (features->type) { |
2616 | |||
2617 | case CINTIQ_HYBRID: | ||
2618 | case DTK: | ||
2619 | case DTUS: | ||
2602 | case GRAPHIRE_BT: | 2620 | case GRAPHIRE_BT: |
2603 | __set_bit(BTN_0, input_dev->keybit); | ||
2604 | __set_bit(BTN_1, input_dev->keybit); | ||
2605 | break; | 2621 | break; |
2606 | 2622 | ||
2607 | case WACOM_MO: | 2623 | case WACOM_MO: |
@@ -2619,16 +2635,6 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, | |||
2619 | break; | 2635 | break; |
2620 | 2636 | ||
2621 | case WACOM_24HD: | 2637 | case WACOM_24HD: |
2622 | __set_bit(BTN_A, input_dev->keybit); | ||
2623 | __set_bit(BTN_B, input_dev->keybit); | ||
2624 | __set_bit(BTN_C, input_dev->keybit); | ||
2625 | __set_bit(BTN_X, input_dev->keybit); | ||
2626 | __set_bit(BTN_Y, input_dev->keybit); | ||
2627 | __set_bit(BTN_Z, input_dev->keybit); | ||
2628 | |||
2629 | for (i = 0; i < 10; i++) | ||
2630 | __set_bit(BTN_0 + i, input_dev->keybit); | ||
2631 | |||
2632 | __set_bit(KEY_PROG1, input_dev->keybit); | 2638 | __set_bit(KEY_PROG1, input_dev->keybit); |
2633 | __set_bit(KEY_PROG2, input_dev->keybit); | 2639 | __set_bit(KEY_PROG2, input_dev->keybit); |
2634 | __set_bit(KEY_PROG3, input_dev->keybit); | 2640 | __set_bit(KEY_PROG3, input_dev->keybit); |
@@ -2650,12 +2656,6 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, | |||
2650 | __set_bit(INPUT_PROP_ACCELEROMETER, input_dev->propbit); | 2656 | __set_bit(INPUT_PROP_ACCELEROMETER, input_dev->propbit); |
2651 | break; | 2657 | break; |
2652 | 2658 | ||
2653 | case DTK: | ||
2654 | for (i = 0; i < 6; i++) | ||
2655 | __set_bit(BTN_0 + i, input_dev->keybit); | ||
2656 | |||
2657 | break; | ||
2658 | |||
2659 | case WACOM_22HD: | 2659 | case WACOM_22HD: |
2660 | __set_bit(KEY_PROG1, input_dev->keybit); | 2660 | __set_bit(KEY_PROG1, input_dev->keybit); |
2661 | __set_bit(KEY_PROG2, input_dev->keybit); | 2661 | __set_bit(KEY_PROG2, input_dev->keybit); |
@@ -2663,52 +2663,22 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, | |||
2663 | /* fall through */ | 2663 | /* fall through */ |
2664 | 2664 | ||
2665 | case WACOM_21UX2: | 2665 | case WACOM_21UX2: |
2666 | __set_bit(BTN_A, input_dev->keybit); | ||
2667 | __set_bit(BTN_B, input_dev->keybit); | ||
2668 | __set_bit(BTN_C, input_dev->keybit); | ||
2669 | __set_bit(BTN_X, input_dev->keybit); | ||
2670 | __set_bit(BTN_Y, input_dev->keybit); | ||
2671 | __set_bit(BTN_Z, input_dev->keybit); | ||
2672 | __set_bit(BTN_BASE, input_dev->keybit); | ||
2673 | __set_bit(BTN_BASE2, input_dev->keybit); | ||
2674 | /* fall through */ | ||
2675 | |||
2676 | case WACOM_BEE: | 2666 | case WACOM_BEE: |
2677 | __set_bit(BTN_8, input_dev->keybit); | ||
2678 | __set_bit(BTN_9, input_dev->keybit); | ||
2679 | /* fall through */ | ||
2680 | |||
2681 | case CINTIQ: | 2667 | case CINTIQ: |
2682 | for (i = 0; i < 8; i++) | ||
2683 | __set_bit(BTN_0 + i, input_dev->keybit); | ||
2684 | |||
2685 | input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); | 2668 | input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); |
2686 | input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); | 2669 | input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); |
2687 | break; | 2670 | break; |
2688 | 2671 | ||
2689 | case WACOM_13HD: | 2672 | case WACOM_13HD: |
2690 | for (i = 0; i < 9; i++) | ||
2691 | __set_bit(BTN_0 + i, input_dev->keybit); | ||
2692 | |||
2693 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); | 2673 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); |
2694 | break; | 2674 | break; |
2695 | 2675 | ||
2696 | case INTUOS3: | 2676 | case INTUOS3: |
2697 | case INTUOS3L: | 2677 | case INTUOS3L: |
2698 | __set_bit(BTN_4, input_dev->keybit); | ||
2699 | __set_bit(BTN_5, input_dev->keybit); | ||
2700 | __set_bit(BTN_6, input_dev->keybit); | ||
2701 | __set_bit(BTN_7, input_dev->keybit); | ||
2702 | |||
2703 | input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); | 2678 | input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); |
2704 | /* fall through */ | 2679 | /* fall through */ |
2705 | 2680 | ||
2706 | case INTUOS3S: | 2681 | case INTUOS3S: |
2707 | __set_bit(BTN_0, input_dev->keybit); | ||
2708 | __set_bit(BTN_1, input_dev->keybit); | ||
2709 | __set_bit(BTN_2, input_dev->keybit); | ||
2710 | __set_bit(BTN_3, input_dev->keybit); | ||
2711 | |||
2712 | input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); | 2682 | input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); |
2713 | break; | 2683 | break; |
2714 | 2684 | ||
@@ -2716,15 +2686,8 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, | |||
2716 | case INTUOS5L: | 2686 | case INTUOS5L: |
2717 | case INTUOSPM: | 2687 | case INTUOSPM: |
2718 | case INTUOSPL: | 2688 | case INTUOSPL: |
2719 | __set_bit(BTN_7, input_dev->keybit); | ||
2720 | __set_bit(BTN_8, input_dev->keybit); | ||
2721 | /* fall through */ | ||
2722 | |||
2723 | case INTUOS5S: | 2689 | case INTUOS5S: |
2724 | case INTUOSPS: | 2690 | case INTUOSPS: |
2725 | for (i = 0; i < 7; i++) | ||
2726 | __set_bit(BTN_0 + i, input_dev->keybit); | ||
2727 | |||
2728 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); | 2691 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); |
2729 | break; | 2692 | break; |
2730 | 2693 | ||
@@ -2739,28 +2702,10 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, | |||
2739 | 2702 | ||
2740 | case INTUOS4: | 2703 | case INTUOS4: |
2741 | case INTUOS4L: | 2704 | case INTUOS4L: |
2742 | __set_bit(BTN_7, input_dev->keybit); | ||
2743 | __set_bit(BTN_8, input_dev->keybit); | ||
2744 | /* fall through */ | ||
2745 | |||
2746 | case INTUOS4S: | 2705 | case INTUOS4S: |
2747 | for (i = 0; i < 7; i++) | ||
2748 | __set_bit(BTN_0 + i, input_dev->keybit); | ||
2749 | |||
2750 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); | 2706 | input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); |
2751 | break; | 2707 | break; |
2752 | 2708 | ||
2753 | case CINTIQ_HYBRID: | ||
2754 | for (i = 0; i < 9; i++) | ||
2755 | __set_bit(BTN_0 + i, input_dev->keybit); | ||
2756 | |||
2757 | break; | ||
2758 | |||
2759 | case DTUS: | ||
2760 | for (i = 0; i < 4; i++) | ||
2761 | __set_bit(BTN_0 + i, input_dev->keybit); | ||
2762 | break; | ||
2763 | |||
2764 | case INTUOSHT: | 2709 | case INTUOSHT: |
2765 | case BAMBOO_PT: | 2710 | case BAMBOO_PT: |
2766 | __clear_bit(ABS_MISC, input_dev->absbit); | 2711 | __clear_bit(ABS_MISC, input_dev->absbit); |
@@ -2787,7 +2732,7 @@ static const struct wacom_features wacom_features_0x10 = | |||
2787 | GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; | 2732 | GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; |
2788 | static const struct wacom_features wacom_features_0x81 = | 2733 | static const struct wacom_features wacom_features_0x81 = |
2789 | { "Wacom Graphire BT", 16704, 12064, 511, 32, | 2734 | { "Wacom Graphire BT", 16704, 12064, 511, 32, |
2790 | GRAPHIRE_BT, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; | 2735 | GRAPHIRE_BT, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES, 2 }; |
2791 | static const struct wacom_features wacom_features_0x11 = | 2736 | static const struct wacom_features wacom_features_0x11 = |
2792 | { "Wacom Graphire2 4x5", 10206, 7422, 511, 63, | 2737 | { "Wacom Graphire2 4x5", 10206, 7422, 511, 63, |
2793 | GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; | 2738 | GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; |
@@ -2913,77 +2858,77 @@ static const struct wacom_features wacom_features_0x45 = | |||
2913 | INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | 2858 | INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
2914 | static const struct wacom_features wacom_features_0xB0 = | 2859 | static const struct wacom_features wacom_features_0xB0 = |
2915 | { "Wacom Intuos3 4x5", 25400, 20320, 1023, 63, | 2860 | { "Wacom Intuos3 4x5", 25400, 20320, 1023, 63, |
2916 | INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2861 | INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 4 }; |
2917 | static const struct wacom_features wacom_features_0xB1 = | 2862 | static const struct wacom_features wacom_features_0xB1 = |
2918 | { "Wacom Intuos3 6x8", 40640, 30480, 1023, 63, | 2863 | { "Wacom Intuos3 6x8", 40640, 30480, 1023, 63, |
2919 | INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2864 | INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 8 }; |
2920 | static const struct wacom_features wacom_features_0xB2 = | 2865 | static const struct wacom_features wacom_features_0xB2 = |
2921 | { "Wacom Intuos3 9x12", 60960, 45720, 1023, 63, | 2866 | { "Wacom Intuos3 9x12", 60960, 45720, 1023, 63, |
2922 | INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2867 | INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 8 }; |
2923 | static const struct wacom_features wacom_features_0xB3 = | 2868 | static const struct wacom_features wacom_features_0xB3 = |
2924 | { "Wacom Intuos3 12x12", 60960, 60960, 1023, 63, | 2869 | { "Wacom Intuos3 12x12", 60960, 60960, 1023, 63, |
2925 | INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2870 | INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 8 }; |
2926 | static const struct wacom_features wacom_features_0xB4 = | 2871 | static const struct wacom_features wacom_features_0xB4 = |
2927 | { "Wacom Intuos3 12x19", 97536, 60960, 1023, 63, | 2872 | { "Wacom Intuos3 12x19", 97536, 60960, 1023, 63, |
2928 | INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2873 | INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 8 }; |
2929 | static const struct wacom_features wacom_features_0xB5 = | 2874 | static const struct wacom_features wacom_features_0xB5 = |
2930 | { "Wacom Intuos3 6x11", 54204, 31750, 1023, 63, | 2875 | { "Wacom Intuos3 6x11", 54204, 31750, 1023, 63, |
2931 | INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2876 | INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 8 }; |
2932 | static const struct wacom_features wacom_features_0xB7 = | 2877 | static const struct wacom_features wacom_features_0xB7 = |
2933 | { "Wacom Intuos3 4x6", 31496, 19685, 1023, 63, | 2878 | { "Wacom Intuos3 4x6", 31496, 19685, 1023, 63, |
2934 | INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2879 | INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 4 }; |
2935 | static const struct wacom_features wacom_features_0xB8 = | 2880 | static const struct wacom_features wacom_features_0xB8 = |
2936 | { "Wacom Intuos4 4x6", 31496, 19685, 2047, 63, | 2881 | { "Wacom Intuos4 4x6", 31496, 19685, 2047, 63, |
2937 | INTUOS4S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2882 | INTUOS4S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 7 }; |
2938 | static const struct wacom_features wacom_features_0xB9 = | 2883 | static const struct wacom_features wacom_features_0xB9 = |
2939 | { "Wacom Intuos4 6x9", 44704, 27940, 2047, 63, | 2884 | { "Wacom Intuos4 6x9", 44704, 27940, 2047, 63, |
2940 | INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2885 | INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9 }; |
2941 | static const struct wacom_features wacom_features_0xBA = | 2886 | static const struct wacom_features wacom_features_0xBA = |
2942 | { "Wacom Intuos4 8x13", 65024, 40640, 2047, 63, | 2887 | { "Wacom Intuos4 8x13", 65024, 40640, 2047, 63, |
2943 | INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2888 | INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9 }; |
2944 | static const struct wacom_features wacom_features_0xBB = | 2889 | static const struct wacom_features wacom_features_0xBB = |
2945 | { "Wacom Intuos4 12x19", 97536, 60960, 2047, 63, | 2890 | { "Wacom Intuos4 12x19", 97536, 60960, 2047, 63, |
2946 | INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2891 | INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9 }; |
2947 | static const struct wacom_features wacom_features_0xBC = | 2892 | static const struct wacom_features wacom_features_0xBC = |
2948 | { "Wacom Intuos4 WL", 40640, 25400, 2047, 63, | 2893 | { "Wacom Intuos4 WL", 40640, 25400, 2047, 63, |
2949 | INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2894 | INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9 }; |
2950 | static const struct wacom_features wacom_features_0xBD = | 2895 | static const struct wacom_features wacom_features_0xBD = |
2951 | { "Wacom Intuos4 WL", 40640, 25400, 2047, 63, | 2896 | { "Wacom Intuos4 WL", 40640, 25400, 2047, 63, |
2952 | INTUOS4WL, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2897 | INTUOS4WL, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9 }; |
2953 | static const struct wacom_features wacom_features_0x26 = | 2898 | static const struct wacom_features wacom_features_0x26 = |
2954 | { "Wacom Intuos5 touch S", 31496, 19685, 2047, 63, | 2899 | { "Wacom Intuos5 touch S", 31496, 19685, 2047, 63, |
2955 | INTUOS5S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, .touch_max = 16 }; | 2900 | INTUOS5S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 7, .touch_max = 16 }; |
2956 | static const struct wacom_features wacom_features_0x27 = | 2901 | static const struct wacom_features wacom_features_0x27 = |
2957 | { "Wacom Intuos5 touch M", 44704, 27940, 2047, 63, | 2902 | { "Wacom Intuos5 touch M", 44704, 27940, 2047, 63, |
2958 | INTUOS5, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, .touch_max = 16 }; | 2903 | INTUOS5, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9, .touch_max = 16 }; |
2959 | static const struct wacom_features wacom_features_0x28 = | 2904 | static const struct wacom_features wacom_features_0x28 = |
2960 | { "Wacom Intuos5 touch L", 65024, 40640, 2047, 63, | 2905 | { "Wacom Intuos5 touch L", 65024, 40640, 2047, 63, |
2961 | INTUOS5L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, .touch_max = 16 }; | 2906 | INTUOS5L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9, .touch_max = 16 }; |
2962 | static const struct wacom_features wacom_features_0x29 = | 2907 | static const struct wacom_features wacom_features_0x29 = |
2963 | { "Wacom Intuos5 S", 31496, 19685, 2047, 63, | 2908 | { "Wacom Intuos5 S", 31496, 19685, 2047, 63, |
2964 | INTUOS5S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2909 | INTUOS5S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 7 }; |
2965 | static const struct wacom_features wacom_features_0x2A = | 2910 | static const struct wacom_features wacom_features_0x2A = |
2966 | { "Wacom Intuos5 M", 44704, 27940, 2047, 63, | 2911 | { "Wacom Intuos5 M", 44704, 27940, 2047, 63, |
2967 | INTUOS5, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2912 | INTUOS5, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9 }; |
2968 | static const struct wacom_features wacom_features_0x314 = | 2913 | static const struct wacom_features wacom_features_0x314 = |
2969 | { "Wacom Intuos Pro S", 31496, 19685, 2047, 63, | 2914 | { "Wacom Intuos Pro S", 31496, 19685, 2047, 63, |
2970 | INTUOSPS, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, .touch_max = 16, | 2915 | INTUOSPS, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 7, .touch_max = 16, |
2971 | .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; | 2916 | .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; |
2972 | static const struct wacom_features wacom_features_0x315 = | 2917 | static const struct wacom_features wacom_features_0x315 = |
2973 | { "Wacom Intuos Pro M", 44704, 27940, 2047, 63, | 2918 | { "Wacom Intuos Pro M", 44704, 27940, 2047, 63, |
2974 | INTUOSPM, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, .touch_max = 16, | 2919 | INTUOSPM, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9, .touch_max = 16, |
2975 | .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; | 2920 | .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; |
2976 | static const struct wacom_features wacom_features_0x317 = | 2921 | static const struct wacom_features wacom_features_0x317 = |
2977 | { "Wacom Intuos Pro L", 65024, 40640, 2047, 63, | 2922 | { "Wacom Intuos Pro L", 65024, 40640, 2047, 63, |
2978 | INTUOSPL, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, .touch_max = 16, | 2923 | INTUOSPL, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9, .touch_max = 16, |
2979 | .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; | 2924 | .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; |
2980 | static const struct wacom_features wacom_features_0xF4 = | 2925 | static const struct wacom_features wacom_features_0xF4 = |
2981 | { "Wacom Cintiq 24HD", 104080, 65200, 2047, 63, | 2926 | { "Wacom Cintiq 24HD", 104080, 65200, 2047, 63, |
2982 | WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | 2927 | WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 16, |
2983 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET }; | 2928 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET }; |
2984 | static const struct wacom_features wacom_features_0xF8 = | 2929 | static const struct wacom_features wacom_features_0xF8 = |
2985 | { "Wacom Cintiq 24HD touch", 104080, 65200, 2047, 63, /* Pen */ | 2930 | { "Wacom Cintiq 24HD touch", 104080, 65200, 2047, 63, /* Pen */ |
2986 | WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | 2931 | WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 16, |
2987 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, | 2932 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, |
2988 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf6 }; | 2933 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf6 }; |
2989 | static const struct wacom_features wacom_features_0xF6 = | 2934 | static const struct wacom_features wacom_features_0xF6 = |
@@ -2992,11 +2937,11 @@ static const struct wacom_features wacom_features_0xF6 = | |||
2992 | .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; | 2937 | .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; |
2993 | static const struct wacom_features wacom_features_0x32A = | 2938 | static const struct wacom_features wacom_features_0x32A = |
2994 | { "Wacom Cintiq 27QHD", 119740, 67520, 2047, 63, | 2939 | { "Wacom Cintiq 27QHD", 119740, 67520, 2047, 63, |
2995 | WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | 2940 | WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 0, |
2996 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET }; | 2941 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET }; |
2997 | static const struct wacom_features wacom_features_0x32B = | 2942 | static const struct wacom_features wacom_features_0x32B = |
2998 | { "Wacom Cintiq 27QHD touch", 119740, 67520, 2047, 63, | 2943 | { "Wacom Cintiq 27QHD touch", 119740, 67520, 2047, 63, |
2999 | WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | 2944 | WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 0, |
3000 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, | 2945 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, |
3001 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32C }; | 2946 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32C }; |
3002 | static const struct wacom_features wacom_features_0x32C = | 2947 | static const struct wacom_features wacom_features_0x32C = |
@@ -3004,20 +2949,20 @@ static const struct wacom_features wacom_features_0x32C = | |||
3004 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32B, .touch_max = 10 }; | 2949 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32B, .touch_max = 10 }; |
3005 | static const struct wacom_features wacom_features_0x3F = | 2950 | static const struct wacom_features wacom_features_0x3F = |
3006 | { "Wacom Cintiq 21UX", 87200, 65600, 1023, 63, | 2951 | { "Wacom Cintiq 21UX", 87200, 65600, 1023, 63, |
3007 | CINTIQ, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2952 | CINTIQ, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 8 }; |
3008 | static const struct wacom_features wacom_features_0xC5 = | 2953 | static const struct wacom_features wacom_features_0xC5 = |
3009 | { "Wacom Cintiq 20WSX", 86680, 54180, 1023, 63, | 2954 | { "Wacom Cintiq 20WSX", 86680, 54180, 1023, 63, |
3010 | WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2955 | WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 10 }; |
3011 | static const struct wacom_features wacom_features_0xC6 = | 2956 | static const struct wacom_features wacom_features_0xC6 = |
3012 | { "Wacom Cintiq 12WX", 53020, 33440, 1023, 63, | 2957 | { "Wacom Cintiq 12WX", 53020, 33440, 1023, 63, |
3013 | WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 2958 | WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 10 }; |
3014 | static const struct wacom_features wacom_features_0x304 = | 2959 | static const struct wacom_features wacom_features_0x304 = |
3015 | { "Wacom Cintiq 13HD", 59152, 33448, 1023, 63, | 2960 | { "Wacom Cintiq 13HD", 59152, 33448, 1023, 63, |
3016 | WACOM_13HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | 2961 | WACOM_13HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9, |
3017 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET }; | 2962 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET }; |
3018 | static const struct wacom_features wacom_features_0x333 = | 2963 | static const struct wacom_features wacom_features_0x333 = |
3019 | { "Wacom Cintiq 13HD touch", 59152, 33448, 2047, 63, | 2964 | { "Wacom Cintiq 13HD touch", 59152, 33448, 2047, 63, |
3020 | WACOM_13HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | 2965 | WACOM_13HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9, |
3021 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, | 2966 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, |
3022 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x335 }; | 2967 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x335 }; |
3023 | static const struct wacom_features wacom_features_0x335 = | 2968 | static const struct wacom_features wacom_features_0x335 = |
@@ -3036,22 +2981,22 @@ static const struct wacom_features wacom_features_0xF0 = | |||
3036 | DTU, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | 2981 | DTU, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
3037 | static const struct wacom_features wacom_features_0xFB = | 2982 | static const struct wacom_features wacom_features_0xFB = |
3038 | { "Wacom DTU1031", 21896, 13760, 511, 0, | 2983 | { "Wacom DTU1031", 21896, 13760, 511, 0, |
3039 | DTUS, WACOM_INTUOS_RES, WACOM_INTUOS_RES, | 2984 | DTUS, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 4, |
3040 | WACOM_DTU_OFFSET, WACOM_DTU_OFFSET }; | 2985 | WACOM_DTU_OFFSET, WACOM_DTU_OFFSET }; |
3041 | static const struct wacom_features wacom_features_0x32F = | 2986 | static const struct wacom_features wacom_features_0x32F = |
3042 | { "Wacom DTU1031X", 22472, 12728, 511, 0, | 2987 | { "Wacom DTU1031X", 22472, 12728, 511, 0, |
3043 | DTUSX, WACOM_INTUOS_RES, WACOM_INTUOS_RES, | 2988 | DTUSX, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 0, |
3044 | WACOM_DTU_OFFSET, WACOM_DTU_OFFSET }; | 2989 | WACOM_DTU_OFFSET, WACOM_DTU_OFFSET }; |
3045 | static const struct wacom_features wacom_features_0x336 = | 2990 | static const struct wacom_features wacom_features_0x336 = |
3046 | { "Wacom DTU1141", 23472, 13203, 1023, 0, | 2991 | { "Wacom DTU1141", 23472, 13203, 1023, 0, |
3047 | DTUS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | 2992 | DTUS, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 4 }; |
3048 | static const struct wacom_features wacom_features_0x57 = | 2993 | static const struct wacom_features wacom_features_0x57 = |
3049 | { "Wacom DTK2241", 95640, 54060, 2047, 63, | 2994 | { "Wacom DTK2241", 95640, 54060, 2047, 63, |
3050 | DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | 2995 | DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 6, |
3051 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET }; | 2996 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET }; |
3052 | static const struct wacom_features wacom_features_0x59 = /* Pen */ | 2997 | static const struct wacom_features wacom_features_0x59 = /* Pen */ |
3053 | { "Wacom DTH2242", 95640, 54060, 2047, 63, | 2998 | { "Wacom DTH2242", 95640, 54060, 2047, 63, |
3054 | DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | 2999 | DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 6, |
3055 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, | 3000 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, |
3056 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5D }; | 3001 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5D }; |
3057 | static const struct wacom_features wacom_features_0x5D = /* Touch */ | 3002 | static const struct wacom_features wacom_features_0x5D = /* Touch */ |
@@ -3060,15 +3005,15 @@ static const struct wacom_features wacom_features_0x5D = /* Touch */ | |||
3060 | .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; | 3005 | .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; |
3061 | static const struct wacom_features wacom_features_0xCC = | 3006 | static const struct wacom_features wacom_features_0xCC = |
3062 | { "Wacom Cintiq 21UX2", 86800, 65200, 2047, 63, | 3007 | { "Wacom Cintiq 21UX2", 86800, 65200, 2047, 63, |
3063 | WACOM_21UX2, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | 3008 | WACOM_21UX2, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 18, |
3064 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET }; | 3009 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET }; |
3065 | static const struct wacom_features wacom_features_0xFA = | 3010 | static const struct wacom_features wacom_features_0xFA = |
3066 | { "Wacom Cintiq 22HD", 95440, 53860, 2047, 63, | 3011 | { "Wacom Cintiq 22HD", 95440, 53860, 2047, 63, |
3067 | WACOM_22HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | 3012 | WACOM_22HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 18, |
3068 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET }; | 3013 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET }; |
3069 | static const struct wacom_features wacom_features_0x5B = | 3014 | static const struct wacom_features wacom_features_0x5B = |
3070 | { "Wacom Cintiq 22HDT", 95440, 53860, 2047, 63, | 3015 | { "Wacom Cintiq 22HDT", 95440, 53860, 2047, 63, |
3071 | WACOM_22HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | 3016 | WACOM_22HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 18, |
3072 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, | 3017 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, |
3073 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5e }; | 3018 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5e }; |
3074 | static const struct wacom_features wacom_features_0x5E = | 3019 | static const struct wacom_features wacom_features_0x5E = |
@@ -3215,7 +3160,7 @@ static const struct wacom_features wacom_features_0x6004 = | |||
3215 | TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | 3160 | TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
3216 | static const struct wacom_features wacom_features_0x307 = | 3161 | static const struct wacom_features wacom_features_0x307 = |
3217 | { "Wacom ISDv5 307", 59152, 33448, 2047, 63, | 3162 | { "Wacom ISDv5 307", 59152, 33448, 2047, 63, |
3218 | CINTIQ_HYBRID, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | 3163 | CINTIQ_HYBRID, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9, |
3219 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, | 3164 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, |
3220 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x309 }; | 3165 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x309 }; |
3221 | static const struct wacom_features wacom_features_0x309 = | 3166 | static const struct wacom_features wacom_features_0x309 = |
@@ -3224,7 +3169,7 @@ static const struct wacom_features wacom_features_0x309 = | |||
3224 | .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; | 3169 | .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; |
3225 | static const struct wacom_features wacom_features_0x30A = | 3170 | static const struct wacom_features wacom_features_0x30A = |
3226 | { "Wacom ISDv5 30A", 59152, 33448, 2047, 63, | 3171 | { "Wacom ISDv5 30A", 59152, 33448, 2047, 63, |
3227 | CINTIQ_HYBRID, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | 3172 | CINTIQ_HYBRID, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9, |
3228 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, | 3173 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, |
3229 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x30C }; | 3174 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x30C }; |
3230 | static const struct wacom_features wacom_features_0x30C = | 3175 | static const struct wacom_features wacom_features_0x30C = |
diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h index 6233eeab028d..4ee5c13b4e75 100644 --- a/drivers/hid/wacom_wac.h +++ b/drivers/hid/wacom_wac.h | |||
@@ -148,6 +148,7 @@ struct wacom_features { | |||
148 | int type; | 148 | int type; |
149 | int x_resolution; | 149 | int x_resolution; |
150 | int y_resolution; | 150 | int y_resolution; |
151 | int numbered_buttons; | ||
151 | int x_min; | 152 | int x_min; |
152 | int y_min; | 153 | int y_min; |
153 | int device_type; | 154 | int device_type; |