Skip to content

Commit 70ee06c

Browse files
skomraJiri Kosina
authored andcommitted
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 <[email protected]> Reviewed-by: Jason Gerecke <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 76703be commit 70ee06c

File tree

2 files changed

+61
-115
lines changed

2 files changed

+61
-115
lines changed

drivers/hid/wacom_wac.c

Lines changed: 60 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -2577,11 +2577,23 @@ int wacom_setup_touch_input_capabilities(struct input_dev *input_dev,
25772577
return 0;
25782578
}
25792579

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+
25802593
int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
25812594
struct wacom_wac *wacom_wac)
25822595
{
25832596
struct wacom_features *features = &wacom_wac->features;
2584-
int i;
25852597

25862598
if (!(features->device_type & WACOM_DEVICETYPE_PAD))
25872599
return -ENODEV;
@@ -2598,10 +2610,14 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
25982610
/* kept for making udev and libwacom accepting the pad */
25992611
__set_bit(BTN_STYLUS, input_dev->keybit);
26002612

2613+
wacom_setup_numbered_buttons(input_dev, features->numbered_buttons);
2614+
26012615
switch (features->type) {
2616+
2617+
case CINTIQ_HYBRID:
2618+
case DTK:
2619+
case DTUS:
26022620
case GRAPHIRE_BT:
2603-
__set_bit(BTN_0, input_dev->keybit);
2604-
__set_bit(BTN_1, input_dev->keybit);
26052621
break;
26062622

26072623
case WACOM_MO:
@@ -2619,16 +2635,6 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
26192635
break;
26202636

26212637
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-
26322638
__set_bit(KEY_PROG1, input_dev->keybit);
26332639
__set_bit(KEY_PROG2, input_dev->keybit);
26342640
__set_bit(KEY_PROG3, input_dev->keybit);
@@ -2650,81 +2656,38 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
26502656
__set_bit(INPUT_PROP_ACCELEROMETER, input_dev->propbit);
26512657
break;
26522658

2653-
case DTK:
2654-
for (i = 0; i < 6; i++)
2655-
__set_bit(BTN_0 + i, input_dev->keybit);
2656-
2657-
break;
2658-
26592659
case WACOM_22HD:
26602660
__set_bit(KEY_PROG1, input_dev->keybit);
26612661
__set_bit(KEY_PROG2, input_dev->keybit);
26622662
__set_bit(KEY_PROG3, input_dev->keybit);
26632663
/* fall through */
26642664

26652665
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-
26762666
case WACOM_BEE:
2677-
__set_bit(BTN_8, input_dev->keybit);
2678-
__set_bit(BTN_9, input_dev->keybit);
2679-
/* fall through */
2680-
26812667
case CINTIQ:
2682-
for (i = 0; i < 8; i++)
2683-
__set_bit(BTN_0 + i, input_dev->keybit);
2684-
26852668
input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
26862669
input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
26872670
break;
26882671

26892672
case WACOM_13HD:
2690-
for (i = 0; i < 9; i++)
2691-
__set_bit(BTN_0 + i, input_dev->keybit);
2692-
26932673
input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
26942674
break;
26952675

26962676
case INTUOS3:
26972677
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-
27032678
input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
27042679
/* fall through */
27052680

27062681
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-
27122682
input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
27132683
break;
27142684

27152685
case INTUOS5:
27162686
case INTUOS5L:
27172687
case INTUOSPM:
27182688
case INTUOSPL:
2719-
__set_bit(BTN_7, input_dev->keybit);
2720-
__set_bit(BTN_8, input_dev->keybit);
2721-
/* fall through */
2722-
27232689
case INTUOS5S:
27242690
case INTUOSPS:
2725-
for (i = 0; i < 7; i++)
2726-
__set_bit(BTN_0 + i, input_dev->keybit);
2727-
27282691
input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
27292692
break;
27302693

@@ -2739,28 +2702,10 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
27392702

27402703
case INTUOS4:
27412704
case INTUOS4L:
2742-
__set_bit(BTN_7, input_dev->keybit);
2743-
__set_bit(BTN_8, input_dev->keybit);
2744-
/* fall through */
2745-
27462705
case INTUOS4S:
2747-
for (i = 0; i < 7; i++)
2748-
__set_bit(BTN_0 + i, input_dev->keybit);
2749-
27502706
input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
27512707
break;
27522708

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-
27642709
case INTUOSHT:
27652710
case BAMBOO_PT:
27662711
__clear_bit(ABS_MISC, input_dev->absbit);
@@ -2787,7 +2732,7 @@ static const struct wacom_features wacom_features_0x10 =
27872732
GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
27882733
static const struct wacom_features wacom_features_0x81 =
27892734
{ "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 };
27912736
static const struct wacom_features wacom_features_0x11 =
27922737
{ "Wacom Graphire2 4x5", 10206, 7422, 511, 63,
27932738
GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
@@ -2913,77 +2858,77 @@ static const struct wacom_features wacom_features_0x45 =
29132858
INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
29142859
static const struct wacom_features wacom_features_0xB0 =
29152860
{ "Wacom Intuos3 4x5", 25400, 20320, 1023, 63,
2916-
INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2861+
INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 4 };
29172862
static const struct wacom_features wacom_features_0xB1 =
29182863
{ "Wacom Intuos3 6x8", 40640, 30480, 1023, 63,
2919-
INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2864+
INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 8 };
29202865
static const struct wacom_features wacom_features_0xB2 =
29212866
{ "Wacom Intuos3 9x12", 60960, 45720, 1023, 63,
2922-
INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2867+
INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 8 };
29232868
static const struct wacom_features wacom_features_0xB3 =
29242869
{ "Wacom Intuos3 12x12", 60960, 60960, 1023, 63,
2925-
INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2870+
INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 8 };
29262871
static const struct wacom_features wacom_features_0xB4 =
29272872
{ "Wacom Intuos3 12x19", 97536, 60960, 1023, 63,
2928-
INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2873+
INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 8 };
29292874
static const struct wacom_features wacom_features_0xB5 =
29302875
{ "Wacom Intuos3 6x11", 54204, 31750, 1023, 63,
2931-
INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2876+
INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 8 };
29322877
static const struct wacom_features wacom_features_0xB7 =
29332878
{ "Wacom Intuos3 4x6", 31496, 19685, 1023, 63,
2934-
INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2879+
INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 4 };
29352880
static const struct wacom_features wacom_features_0xB8 =
29362881
{ "Wacom Intuos4 4x6", 31496, 19685, 2047, 63,
2937-
INTUOS4S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2882+
INTUOS4S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 7 };
29382883
static const struct wacom_features wacom_features_0xB9 =
29392884
{ "Wacom Intuos4 6x9", 44704, 27940, 2047, 63,
2940-
INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2885+
INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9 };
29412886
static const struct wacom_features wacom_features_0xBA =
29422887
{ "Wacom Intuos4 8x13", 65024, 40640, 2047, 63,
2943-
INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2888+
INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9 };
29442889
static const struct wacom_features wacom_features_0xBB =
29452890
{ "Wacom Intuos4 12x19", 97536, 60960, 2047, 63,
2946-
INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2891+
INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9 };
29472892
static const struct wacom_features wacom_features_0xBC =
29482893
{ "Wacom Intuos4 WL", 40640, 25400, 2047, 63,
2949-
INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2894+
INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9 };
29502895
static const struct wacom_features wacom_features_0xBD =
29512896
{ "Wacom Intuos4 WL", 40640, 25400, 2047, 63,
2952-
INTUOS4WL, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2897+
INTUOS4WL, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9 };
29532898
static const struct wacom_features wacom_features_0x26 =
29542899
{ "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 };
29562901
static const struct wacom_features wacom_features_0x27 =
29572902
{ "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 };
29592904
static const struct wacom_features wacom_features_0x28 =
29602905
{ "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 };
29622907
static const struct wacom_features wacom_features_0x29 =
29632908
{ "Wacom Intuos5 S", 31496, 19685, 2047, 63,
2964-
INTUOS5S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2909+
INTUOS5S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 7 };
29652910
static const struct wacom_features wacom_features_0x2A =
29662911
{ "Wacom Intuos5 M", 44704, 27940, 2047, 63,
2967-
INTUOS5, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2912+
INTUOS5, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 9 };
29682913
static const struct wacom_features wacom_features_0x314 =
29692914
{ "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,
29712916
.check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE };
29722917
static const struct wacom_features wacom_features_0x315 =
29732918
{ "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,
29752920
.check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE };
29762921
static const struct wacom_features wacom_features_0x317 =
29772922
{ "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,
29792924
.check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE };
29802925
static const struct wacom_features wacom_features_0xF4 =
29812926
{ "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,
29832928
WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET };
29842929
static const struct wacom_features wacom_features_0xF8 =
29852930
{ "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,
29872932
WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET,
29882933
.oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf6 };
29892934
static const struct wacom_features wacom_features_0xF6 =
@@ -2992,32 +2937,32 @@ static const struct wacom_features wacom_features_0xF6 =
29922937
.check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE };
29932938
static const struct wacom_features wacom_features_0x32A =
29942939
{ "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,
29962941
WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET };
29972942
static const struct wacom_features wacom_features_0x32B =
29982943
{ "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,
30002945
WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET,
30012946
.oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32C };
30022947
static const struct wacom_features wacom_features_0x32C =
30032948
{ "Wacom Cintiq 27QHD touch", .type = WACOM_27QHDT,
30042949
.oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32B, .touch_max = 10 };
30052950
static const struct wacom_features wacom_features_0x3F =
30062951
{ "Wacom Cintiq 21UX", 87200, 65600, 1023, 63,
3007-
CINTIQ, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2952+
CINTIQ, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 8 };
30082953
static const struct wacom_features wacom_features_0xC5 =
30092954
{ "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 };
30112956
static const struct wacom_features wacom_features_0xC6 =
30122957
{ "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 };
30142959
static const struct wacom_features wacom_features_0x304 =
30152960
{ "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,
30172962
WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET };
30182963
static const struct wacom_features wacom_features_0x333 =
30192964
{ "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,
30212966
WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET,
30222967
.oVid = USB_VENDOR_ID_WACOM, .oPid = 0x335 };
30232968
static const struct wacom_features wacom_features_0x335 =
@@ -3036,22 +2981,22 @@ static const struct wacom_features wacom_features_0xF0 =
30362981
DTU, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
30372982
static const struct wacom_features wacom_features_0xFB =
30382983
{ "Wacom DTU1031", 21896, 13760, 511, 0,
3039-
DTUS, WACOM_INTUOS_RES, WACOM_INTUOS_RES,
2984+
DTUS, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 4,
30402985
WACOM_DTU_OFFSET, WACOM_DTU_OFFSET };
30412986
static const struct wacom_features wacom_features_0x32F =
30422987
{ "Wacom DTU1031X", 22472, 12728, 511, 0,
3043-
DTUSX, WACOM_INTUOS_RES, WACOM_INTUOS_RES,
2988+
DTUSX, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 0,
30442989
WACOM_DTU_OFFSET, WACOM_DTU_OFFSET };
30452990
static const struct wacom_features wacom_features_0x336 =
30462991
{ "Wacom DTU1141", 23472, 13203, 1023, 0,
3047-
DTUS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
2992+
DTUS, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 4 };
30482993
static const struct wacom_features wacom_features_0x57 =
30492994
{ "Wacom DTK2241", 95640, 54060, 2047, 63,
3050-
DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES,
2995+
DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 6,
30512996
WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET };
30522997
static const struct wacom_features wacom_features_0x59 = /* Pen */
30532998
{ "Wacom DTH2242", 95640, 54060, 2047, 63,
3054-
DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES,
2999+
DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 6,
30553000
WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET,
30563001
.oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5D };
30573002
static const struct wacom_features wacom_features_0x5D = /* Touch */
@@ -3060,15 +3005,15 @@ static const struct wacom_features wacom_features_0x5D = /* Touch */
30603005
.check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE };
30613006
static const struct wacom_features wacom_features_0xCC =
30623007
{ "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,
30643009
WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET };
30653010
static const struct wacom_features wacom_features_0xFA =
30663011
{ "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,
30683013
WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET };
30693014
static const struct wacom_features wacom_features_0x5B =
30703015
{ "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,
30723017
WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET,
30733018
.oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5e };
30743019
static const struct wacom_features wacom_features_0x5E =
@@ -3215,7 +3160,7 @@ static const struct wacom_features wacom_features_0x6004 =
32153160
TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
32163161
static const struct wacom_features wacom_features_0x307 =
32173162
{ "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,
32193164
WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET,
32203165
.oVid = USB_VENDOR_ID_WACOM, .oPid = 0x309 };
32213166
static const struct wacom_features wacom_features_0x309 =
@@ -3224,7 +3169,7 @@ static const struct wacom_features wacom_features_0x309 =
32243169
.check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE };
32253170
static const struct wacom_features wacom_features_0x30A =
32263171
{ "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,
32283173
WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET,
32293174
.oVid = USB_VENDOR_ID_WACOM, .oPid = 0x30C };
32303175
static const struct wacom_features wacom_features_0x30C =

drivers/hid/wacom_wac.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ struct wacom_features {
148148
int type;
149149
int x_resolution;
150150
int y_resolution;
151+
int numbered_buttons;
151152
int x_min;
152153
int y_min;
153154
int device_type;

0 commit comments

Comments
 (0)