Lines Matching refs:features
90 struct wacom_features *features = &wacom_wac->features;
95 if (wacom_wac->serial[0] || !(features->quirks & WACOM_QUIRK_TOOLSERIAL))
158 if (wacom->wacom_wac.features.type == BOOTLOADER)
213 struct wacom_features *features = &wacom->wacom_wac.features;
235 if (features->type == HID_GENERIC &&
271 features->quirks |= WACOM_QUIRK_AESPEN;
296 struct wacom_features *features = &wacom->wacom_wac.features;
311 if (!features->touch_max) {
320 if (ret == n && features->type == HID_GENERIC) {
323 } else if (ret == 2 && features->type != HID_GENERIC) {
324 features->touch_max = data[1];
326 features->touch_max = 16;
330 features->touch_max);
429 struct wacom_features *features = &wacom->wacom_wac.features;
440 features->device_type |= WACOM_DEVICETYPE_PEN;
442 features->device_type |= WACOM_DEVICETYPE_TOUCH;
450 features->x_max = field->logical_maximum;
452 features->x_phy = field->physical_maximum;
453 if ((features->type != BAMBOO_PT) &&
454 (features->type != BAMBOO_TOUCH)) {
455 features->unit = field->unit;
456 features->unitExpo = field->unit_exponent;
461 features->y_max = field->logical_maximum;
463 features->y_phy = field->physical_maximum;
464 if ((features->type != BAMBOO_PT) &&
465 (features->type != BAMBOO_TOUCH)) {
466 features->unit = field->unit;
467 features->unitExpo = field->unit_exponent;
473 features->pressure_max = field->logical_maximum;
477 if (features->type == HID_GENERIC)
482 struct wacom_features *features)
487 if (features->type == HID_GENERIC) {
491 features->device_type |= WACOM_DEVICETYPE_DIRECT;
493 features->device_type &= ~WACOM_DEVICETYPE_DIRECT;
496 if (features->touch_max > 1) {
497 if (features->device_type & WACOM_DEVICETYPE_DIRECT)
499 wacom_wac->features.touch_max,
503 wacom_wac->features.touch_max,
510 struct wacom_features *features)
516 /* check features first */
544 wacom_post_parse_hid(hdev, features);
608 struct wacom_features *features)
614 switch (features->type) {
671 struct wacom_features *features = &wacom_wac->features;
674 return wacom_bt_query_tablet_data(hdev, 1, features);
676 if (features->type != HID_GENERIC) {
677 if (features->device_type & WACOM_DEVICETYPE_TOUCH) {
678 if (features->type > TABLETPC) {
682 } else if (features->type == WACOM_24HDT) {
685 } else if (features->type == WACOM_27QHDT) {
688 } else if (features->type == BAMBOO_PAD) {
692 } else if (features->device_type & WACOM_DEVICETYPE_PEN) {
693 if (features->type <= BAMBOO_PT) {
702 if (features->type == HID_GENERIC)
709 struct wacom_features *features)
714 /* default features */
715 features->x_fuzz = 4;
716 features->y_fuzz = 4;
717 features->pressure_fuzz = 0;
718 features->distance_fuzz = 1;
719 features->tilt_fuzz = 1;
727 if (features->type == WIRELESS && intf) {
729 features->device_type = WACOM_DEVICETYPE_WL_MONITOR;
731 features->device_type = WACOM_DEVICETYPE_NONE;
735 wacom_parse_hid(hdev, features);
752 struct wacom_features *features = &wacom->wacom_wac.features;
754 struct wacom_features *sibling_features = &sibling_wacom->wacom_wac.features;
755 __u32 oVid = features->oVid ? features->oVid : hdev->vendor;
756 __u32 oPid = features->oPid ? features->oPid : hdev->product;
759 if (features->oVid != HID_ANY_ID && sibling->vendor != oVid)
761 if (features->oPid != HID_ANY_ID && sibling->product != oPid)
778 if (features->type != HID_GENERIC)
785 if ((features->device_type & WACOM_DEVICETYPE_DIRECT) &&
793 if (!(features->device_type & WACOM_DEVICETYPE_DIRECT) &&
798 if ((features->device_type & WACOM_DEVICETYPE_PEN) &&
803 if ((features->device_type & WACOM_DEVICETYPE_TOUCH) &&
899 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH)
901 else if (wacom_wac->features.device_type & WACOM_DEVICETYPE_PEN)
917 if (wacom->wacom_wac.features.type == REMOTE)
924 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) {
932 if (wacom->wacom_wac.features.type == HID_GENERIC) {
937 } else if ((wacom->wacom_wac.features.type >= INTUOS5S &&
938 wacom->wacom_wac.features.type <= INTUOSPL)) {
958 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) {
971 if (wacom->wacom_wac.features.type == WACOM_21UX2 ||
972 wacom->wacom_wac.features.type == WACOM_24HD)
1578 if (!(wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD))
1582 switch (wacom->wacom_wac.features.type) {
1801 if (wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY)
1840 wacom_bt_query_tablet_data(hdev, new_speed, &wacom->wacom_wac.features);
1987 if (wacom->wacom_wac.features.type != REMOTE)
2049 input_dev->name = wacom_wac->features.name;
2165 static void wacom_set_default_phy(struct wacom_features *features)
2167 if (features->x_resolution) {
2168 features->x_phy = (features->x_max * 100) /
2169 features->x_resolution;
2170 features->y_phy = (features->y_max * 100) /
2171 features->y_resolution;
2175 static void wacom_calculate_res(struct wacom_features *features)
2178 if (!features->unit) {
2179 features->unit = 0x11;
2180 features->unitExpo = -3;
2183 features->x_resolution = wacom_calc_hid_res(features->x_max,
2184 features->x_phy,
2185 features->unit,
2186 features->unitExpo);
2187 features->y_resolution = wacom_calc_hid_res(features->y_max,
2188 features->y_phy,
2189 features->unit,
2190 features->unitExpo);
2197 if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) &&
2201 else if (!(wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) &&
2227 struct wacom_features *features = &wacom_wac->features;
2231 if ((features->type == HID_GENERIC) && !strcmp("Wacom HID", features->name)) {
2242 features->name, wacom->hdev->product);
2266 if (strscpy(name, features->name, sizeof(name)) < 0) {
2301 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) {
2302 wacom_wac->shared->type = wacom_wac->features.type;
2328 struct wacom_features *features = &wacom_wac->features;
2333 features->pktlen = wacom_compute_pktlen(hdev);
2334 if (features->pktlen > WACOM_PKGLEN_MAX)
2351 if (features->type == BAMBOO_PAD) {
2352 if (features->pktlen == WACOM_PKGLEN_PENABLED) {
2353 features->type = HID_GENERIC;
2354 } else if ((features->pktlen != WACOM_PKGLEN_BPAD_TOUCH) &&
2355 (features->pktlen != WACOM_PKGLEN_BPAD_TOUCH_USB)) {
2362 wacom_set_default_phy(features);
2365 wacom_retrieve_hid_descriptor(hdev, features);
2368 if (features->device_type == WACOM_DEVICETYPE_NONE &&
2369 features->type != WIRELESS) {
2370 error = features->type == HID_GENERIC ? -ENODEV : 0;
2379 features->device_type |= WACOM_DEVICETYPE_PEN;
2382 wacom_calculate_res(features);
2387 if ((features->type == BAMBOO_PEN) &&
2388 ((features->device_type & WACOM_DEVICETYPE_TOUCH) ||
2389 (features->device_type & WACOM_DEVICETYPE_PAD))) {
2402 if (features->type == HID_GENERIC)
2416 if (wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD) {
2432 if ((features->type == BAMBOO_TOUCH) &&
2433 (features->device_type & WACOM_DEVICETYPE_PEN)) {
2440 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) {
2513 wacom_wac1->features =
2523 if (wacom_wac1->features.touch_max ||
2524 (wacom_wac1->features.type >= INTUOSHT &&
2525 wacom_wac1->features.type <= BAMBOO_PT)) {
2526 wacom_wac2->features =
2778 struct wacom_features *features;
2797 wacom_wac->features = *((struct wacom_features *)id->driver_data);
2798 features = &wacom_wac->features;
2800 if (features->check_for_hid_type && features->hid_type != hdev->type)
2833 if (features->type == BOOTLOADER) {
2858 struct wacom_features *features = &wacom_wac->features;
2860 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR)
2877 if (wacom->wacom_wac.features.type != REMOTE)