Lines Matching refs:features

117 	bool has_quirk = wacom_wac->features.quirks & WACOM_QUIRK_BATTERY;
172 struct wacom_features *features = &wacom->features;
210 if (features->pressure_max > 255)
212 pressure += (features->pressure_max + 1) / 2;
343 struct wacom_features *features = &wacom->features;
352 if (features->type == GRAPHIRE_BT) {
393 if (features->type == GRAPHIRE_BT)
405 if (features->type == WACOM_G4 ||
406 features->type == WACOM_MO) {
409 } else if (features->type == GRAPHIRE_BT) {
438 switch (features->type) {
484 if (features->type == GRAPHIRE_BT) {
499 struct wacom_features *features = &wacom_wac->features;
504 if (features->type == INTUOSHT2)
515 struct wacom_features *features = &wacom->features;
519 int buttons = 0, nbuttons = features->numbered_buttons;
532 if (features->type >= INTUOS4S && features->type <= INTUOS4L) {
535 } else if (features->type == DTK) {
537 } else if (features->type == WACOM_13HD) {
539 } else if (features->type == WACOM_24HD) {
558 if (features->oPid) {
566 } else if (features->type == WACOM_27QHD) {
573 if (features->oPid) {
584 } else if (features->type == CINTIQ_HYBRID) {
597 } else if (features->type == CINTIQ_COMPANION_2) {
608 } else if (features->type >= INTUOS5S && features->type <= INTUOSPL) {
619 if (features->type == WACOM_21UX2 || features->type == WACOM_22HD) {
623 if (features->type == WACOM_22HD) {
783 struct wacom_features *features = &wacom->features;
785 int idx = (features->type == INTUOS) ? (data[1] & 0x01) : 0;
810 if (features->type >= INTUOS3S)
821 struct wacom_features *features = &wacom->features;
824 int idx = (features->type == INTUOS) ? (data[1] & 0x01) : 0;
849 if (features->type != INTUOSHT2)
856 input_report_abs(input, ABS_DISTANCE, wacom->features.distance_max);
897 struct wacom_features *features = &wacom->features;
900 int idx = (features->type == INTUOS) ? (data[1] & 0x01) : 0;
923 (features->type == WACOM_21UX2)) ||
926 (features->type == INTUOS3 ||
927 features->type == INTUOS3S ||
928 features->type == INTUOS4 ||
929 features->type == INTUOS4S ||
930 features->type == INTUOS5 ||
931 features->type == INTUOS5S ||
932 features->type == INTUOSPM ||
933 features->type == INTUOSPS)) ||
935 (features->type == CINTIQ && !(data[1] & 0x40)))
941 if (features->type < INTUOS3S) {
946 if (features->type == INTUOSHT2)
947 distance = features->distance_max - distance;
959 if (features->pressure_max < 2047)
962 if (features->type != INTUOSHT2) {
983 if (features->type >= INTUOS3S) {
1034 if (features->type >= INTUOS3S && features->type <= INTUOS3L) {
1288 unsigned touch_max = wacom->features.touch_max;
1320 if (wacom->features.type == INTUOSP2_BT ||
1321 wacom->features.type == INTUOSP2S_BT) {
1392 if (wacom->features.type == INTUOSP2_BT ||
1393 wacom->features.type == INTUOSP2S_BT) {
1414 if (wacom->features.type == INTUOSP2_BT ||
1415 wacom->features.type == INTUOSP2S_BT) {
1417 range ? frame[13] : wacom->features.distance_max);
1420 range ? frame[7] : wacom->features.distance_max);
1513 int nbuttons = wacom->features.numbered_buttons;
1588 if (wacom->features.type == INTUOSP2_BT ||
1589 wacom->features.type == INTUOSP2S_BT) {
1614 if (wacom->features.type == WACOM_27QHDT) {
1647 if (wacom->features.type != WACOM_27QHDT) {
1681 if (wacom->features.type == MTTPC || wacom->features.type == MTTPC_B)
1757 if (wacom->features.touch_max > 1 || len > WACOM_PKGLEN_TPC2FG)
1923 struct wacom_features *features = &wacom_wac->features;
1935 fmin += features->offset_left;
1936 fmax -= features->offset_right;
1939 fmin += features->offset_top;
1940 fmax -= features->offset_bottom;
1991 wacom_wac->features.quirks |= WACOM_QUIRK_BATTERY;
1998 wacom_wac->features.quirks |= WACOM_QUIRK_BATTERY;
2005 wacom_wac->features.quirks |= WACOM_QUIRK_BATTERY;
2037 struct wacom_features *features = &wacom_wac->features;
2045 features->device_type |= WACOM_DEVICETYPE_PAD;
2050 features->device_type |= WACOM_DEVICETYPE_PAD;
2055 features->device_type |= WACOM_DEVICETYPE_PAD;
2064 wacom_numbered_button_to_key(features->numbered_buttons),
2066 features->numbered_buttons++;
2067 features->device_type |= WACOM_DEVICETYPE_PAD;
2088 features->device_type |= WACOM_DEVICETYPE_PAD;
2092 features->device_type |= WACOM_DEVICETYPE_PAD;
2096 features->device_type |= WACOM_DEVICETYPE_PAD;
2106 features->device_type |= WACOM_DEVICETYPE_PAD;
2110 features->device_type |= WACOM_DEVICETYPE_PAD;
2114 features->device_type |= WACOM_DEVICETYPE_PAD;
2118 features->device_type |= WACOM_DEVICETYPE_PAD;
2126 features->device_type |= WACOM_DEVICETYPE_PAD;
2133 wacom_numbered_button_to_key(features->numbered_buttons),
2135 features->numbered_buttons++;
2136 features->device_type |= WACOM_DEVICETYPE_PAD;
2147 struct wacom_features *features = &wacom_wac->features;
2232 wacom_update_led(wacom, features->numbered_buttons,
2276 struct wacom_features *features = &wacom_wac->features;
2278 if (!(features->quirks & WACOM_QUIRK_AESPEN) &&
2284 features->quirks |= WACOM_QUIRK_PEN_BUTTON3;
2293 struct wacom_features *features = &wacom_wac->features;
2346 features->quirks |= WACOM_QUIRK_TOOLSERIAL;
2353 features->quirks |= WACOM_QUIRK_SENSE;
2368 features->quirks &= ~WACOM_QUIRK_PEN_BUTTON3;
2378 struct wacom_features *features = &wacom_wac->features;
2397 if (!(features->quirks & WACOM_QUIRK_SENSE))
2460 if (features->offset_left && value != features->offset_left)
2463 features->offset_left);
2464 features->offset_left = value;
2467 if (features->offset_right && value != features->offset_right)
2470 features->offset_right);
2471 features->offset_right = value;
2474 if (features->offset_top && value != features->offset_top)
2477 features->offset_top);
2478 features->offset_top = value;
2481 if (features->offset_bottom && value != features->offset_bottom)
2484 features->offset_bottom);
2485 features->offset_bottom = value;
2550 if (wacom_wac->features.quirks & WACOM_QUIRK_PEN_BUTTON3) {
2606 unsigned touch_max = wacom_wac->features.touch_max;
2658 bool mt = wacom_wac->features.touch_max > 1;
2716 struct wacom_features *features = &wacom->wacom_wac.features;
2750 if (!features->touch_max) {
2751 features->touch_max = value;
2754 "%d -> %d\n", __func__, features->touch_max, value);
2823 hid_data->num_expected = wacom_wac->features.touch_max;
2834 unsigned touch_max = wacom_wac->features.touch_max;
2863 struct wacom_features *features = &wacom_wac->features;
2866 features->device_type |= WACOM_DEVICETYPE_DIRECT;
2884 if (wacom->wacom_wac.features.type != HID_GENERIC)
2965 if (wacom_wac->features.type != HID_GENERIC)
3009 struct wacom_features *features = &wacom->features;
3028 if (features->quirks & WACOM_QUIRK_BBTOUCH_LOWRES) {
3050 struct wacom_features *features = &wacom->features;
3068 if (features->type >= INTUOSPS && features->type <= INTUOSHT2) {
3094 struct wacom_features *features = &wacom->features;
3096 if (features->type == INTUOSHT || features->type == INTUOSHT2) {
3140 struct wacom_features *features = &wacom->features;
3184 if (data[8] <= features->distance_max)
3185 d = features->distance_max - data[8];
3215 struct wacom_features *features = &wacom->features;
3217 if ((features->type == INTUOSHT2) &&
3218 (features->device_type & WACOM_DEVICETYPE_PEN))
3267 for (id = 0; id < wacom->features.touch_max; id++) {
3359 struct wacom_features *features = &wacom_wac->features;
3365 if ((features->type == INTUOSHT ||
3366 features->type == INTUOSHT2) &&
3368 features->touch_max) {
3378 features->quirks |= WACOM_QUIRK_BATTERY;
3382 else if ((features->quirks & WACOM_QUIRK_BATTERY) &&
3384 features->quirks &= ~WACOM_QUIRK_BATTERY;
3394 switch (wacom_wac->features.type) {
3534 0, wacom_wac->features.distance_max, wacom_wac->features.distance_fuzz, 0);
3540 struct wacom_features *features = &wacom_wac->features;
3550 input_set_abs_params(input_dev, ABS_TILT_X, -64, 63, features->tilt_fuzz, 0);
3552 input_set_abs_params(input_dev, ABS_TILT_Y, -64, 63, features->tilt_fuzz, 0);
3580 struct wacom_features *features = &wacom->wacom_wac.features;
3583 if (features->type == GRAPHIRE_BT || features->type == WACOM_G4 ||
3584 features->type == DTUS ||
3585 (features->type >= INTUOS3S && features->type <= WACOM_MO)) {
3586 if (features->device_type & WACOM_DEVICETYPE_PEN)
3587 features->device_type |= WACOM_DEVICETYPE_PAD;
3591 if (features->device_type & WACOM_DEVICETYPE_TOUCH && !features->x_max) {
3592 features->x_max = 1023;
3593 features->y_max = 1023;
3602 if ((features->type >= INTUOS5S && features->type <= INTUOSPL) ||
3603 (features->type >= INTUOSHT && features->type <= BAMBOO_PT)) {
3604 if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) {
3605 if (features->touch_max)
3606 features->device_type |= WACOM_DEVICETYPE_TOUCH;
3607 if (features->type >= INTUOSHT && features->type <= BAMBOO_PT)
3608 features->device_type |= WACOM_DEVICETYPE_PAD;
3610 if (features->type == INTUOSHT2) {
3611 features->x_max = features->x_max / 10;
3612 features->y_max = features->y_max / 10;
3615 features->x_max = 4096;
3616 features->y_max = 4096;
3619 else if (features->pktlen == WACOM_PKGLEN_BBTOUCH) {
3620 features->device_type |= WACOM_DEVICETYPE_PAD;
3631 if (features->type == BAMBOO_PEN &&
3632 features->pktlen == WACOM_PKGLEN_BBTOUCH3)
3633 features->device_type |= WACOM_DEVICETYPE_PAD;
3642 if (features->type == BAMBOO_PAD)
3643 features->device_type = WACOM_DEVICETYPE_TOUCH;
3645 if (features->type == REMOTE)
3646 features->device_type = WACOM_DEVICETYPE_PAD;
3648 if (features->type == INTUOSP2_BT ||
3649 features->type == INTUOSP2S_BT) {
3650 features->device_type |= WACOM_DEVICETYPE_PEN |
3653 features->quirks |= WACOM_QUIRK_BATTERY;
3656 if (features->type == INTUOSHT3_BT) {
3657 features->device_type |= WACOM_DEVICETYPE_PEN |
3659 features->quirks |= WACOM_QUIRK_BATTERY;
3662 switch (features->type) {
3685 features->device_type |= WACOM_DEVICETYPE_DIRECT;
3690 features->quirks |= WACOM_QUIRK_BATTERY;
3693 if ((features->type == BAMBOO_PT || features->type == BAMBOO_TOUCH) &&
3694 features->pktlen == WACOM_PKGLEN_BBTOUCH) {
3695 features->x_max <<= 5;
3696 features->y_max <<= 5;
3697 features->x_fuzz <<= 5;
3698 features->y_fuzz <<= 5;
3699 features->quirks |= WACOM_QUIRK_BBTOUCH_LOWRES;
3702 if (features->type == WIRELESS) {
3703 if (features->device_type == WACOM_DEVICETYPE_WL_MONITOR) {
3704 features->quirks |= WACOM_QUIRK_BATTERY;
3708 if (features->type == REMOTE)
3709 features->device_type |= WACOM_DEVICETYPE_WL_MONITOR;
3715 features->quirks &= ~WACOM_QUIRK_TOOLSERIAL;
3733 struct wacom_features *features = &wacom_wac->features;
3735 if (!(features->device_type & WACOM_DEVICETYPE_PEN))
3738 if (features->device_type & WACOM_DEVICETYPE_DIRECT)
3743 if (features->type == HID_GENERIC)
3751 input_set_abs_params(input_dev, ABS_X, 0 + features->offset_left,
3752 features->x_max - features->offset_right,
3753 features->x_fuzz, 0);
3754 input_set_abs_params(input_dev, ABS_Y, 0 + features->offset_top,
3755 features->y_max - features->offset_bottom,
3756 features->y_fuzz, 0);
3758 features->pressure_max, features->pressure_fuzz, 0);
3761 input_abs_set_res(input_dev, ABS_X, features->x_resolution);
3762 input_abs_set_res(input_dev, ABS_Y, features->y_resolution);
3764 switch (features->type) {
3772 features->distance_max,
3773 features->distance_fuzz, 0);
3829 features->distance_max,
3830 features->distance_fuzz, 0);
3874 if (features->type == INTUOSHT2 ||
3875 features->type == INTUOSHT3_BT) {
3884 features->distance_max,
3885 features->distance_fuzz, 0);
3898 struct wacom_features *features = &wacom_wac->features;
3900 if (!(features->device_type & WACOM_DEVICETYPE_TOUCH))
3903 if (features->device_type & WACOM_DEVICETYPE_DIRECT)
3908 if (features->type == HID_GENERIC)
3915 if (features->touch_max == 1) {
3917 features->x_max, features->x_fuzz, 0);
3919 features->y_max, features->y_fuzz, 0);
3921 features->x_resolution);
3923 features->y_resolution);
3925 else if (features->touch_max > 1) {
3927 features->x_max, features->x_fuzz, 0);
3929 features->y_max, features->y_fuzz, 0);
3931 features->x_resolution);
3933 features->y_resolution);
3936 switch (features->type) {
3971 input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, features->x_max, 0, 0);
3972 input_set_abs_params(input_dev, ABS_MT_TOUCH_MINOR, 0, features->y_max, 0, 0);
3973 input_mt_init_slots(input_dev, features->touch_max, INPUT_MT_POINTER);
3977 input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, features->x_max, 0, 0);
3978 input_set_abs_params(input_dev, ABS_MT_WIDTH_MAJOR, 0, features->x_max, 0, 0);
3979 input_set_abs_params(input_dev, ABS_MT_WIDTH_MINOR, 0, features->y_max, 0, 0);
3997 input_mt_init_slots(input_dev, features->touch_max, INPUT_MT_DIRECT);
4012 if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) {
4015 0, features->x_max, 0, 0);
4018 0, features->y_max, 0, 0);
4020 input_mt_init_slots(input_dev, features->touch_max, INPUT_MT_POINTER);
4024 input_mt_init_slots(input_dev, features->touch_max,
4098 if (wacom->wacom_wac.features.type == WACOM_21UX2)
4103 if (wacom->wacom_wac.features.type == INTUOSP2_BT)
4116 if (wacom->wacom_wac.features.type == WACOM_24HD)
4171 struct wacom_features *features = &wacom_wac->features;
4173 if ((features->type == HID_GENERIC) && features->numbered_buttons > 0)
4174 features->device_type |= WACOM_DEVICETYPE_PAD;
4176 if (!(features->device_type & WACOM_DEVICETYPE_PAD))
4179 if (features->type == REMOTE && input_dev == wacom_wac->pad_input)
4198 wacom_setup_numbered_buttons(input_dev, features->numbered_buttons);
4200 switch (features->type) {
4231 if (!features->oPid)
4246 if (!features->oPid)