Lines Matching full:features
98 struct wacom_features *features = &wacom_wac->features; in wacom_wac_pen_serial_enforce() local
103 if (wacom_wac->serial[0] || !(features->quirks & WACOM_QUIRK_TOOLSERIAL)) in wacom_wac_pen_serial_enforce()
218 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_hid_usage_quirk() local
240 if (features->type == HID_GENERIC && in wacom_hid_usage_quirk()
269 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_feature_mapping() local
284 if (!features->touch_max) { in wacom_feature_mapping()
293 if (ret == n && features->type == HID_GENERIC) { in wacom_feature_mapping()
296 } else if (ret == 2 && features->type != HID_GENERIC) { in wacom_feature_mapping()
297 features->touch_max = data[1]; in wacom_feature_mapping()
299 features->touch_max = 16; in wacom_feature_mapping()
303 features->touch_max); in wacom_feature_mapping()
402 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_usage_mapping() local
413 features->device_type |= WACOM_DEVICETYPE_PEN; in wacom_usage_mapping()
415 features->device_type |= WACOM_DEVICETYPE_TOUCH; in wacom_usage_mapping()
423 features->x_max = field->logical_maximum; in wacom_usage_mapping()
425 features->x_phy = field->physical_maximum; in wacom_usage_mapping()
426 if ((features->type != BAMBOO_PT) && in wacom_usage_mapping()
427 (features->type != BAMBOO_TOUCH)) { in wacom_usage_mapping()
428 features->unit = field->unit; in wacom_usage_mapping()
429 features->unitExpo = field->unit_exponent; in wacom_usage_mapping()
434 features->y_max = field->logical_maximum; in wacom_usage_mapping()
436 features->y_phy = field->physical_maximum; in wacom_usage_mapping()
437 if ((features->type != BAMBOO_PT) && in wacom_usage_mapping()
438 (features->type != BAMBOO_TOUCH)) { in wacom_usage_mapping()
439 features->unit = field->unit; in wacom_usage_mapping()
440 features->unitExpo = field->unit_exponent; in wacom_usage_mapping()
446 features->pressure_max = field->logical_maximum; in wacom_usage_mapping()
450 if (features->type == HID_GENERIC) in wacom_usage_mapping()
455 struct wacom_features *features) in wacom_post_parse_hid() argument
460 if (features->type == HID_GENERIC) { in wacom_post_parse_hid()
464 features->device_type |= WACOM_DEVICETYPE_DIRECT; in wacom_post_parse_hid()
466 features->device_type &= ~WACOM_DEVICETYPE_DIRECT; in wacom_post_parse_hid()
469 if (features->touch_max > 1) { in wacom_post_parse_hid()
470 if (features->device_type & WACOM_DEVICETYPE_DIRECT) in wacom_post_parse_hid()
472 wacom_wac->features.touch_max, in wacom_post_parse_hid()
476 wacom_wac->features.touch_max, in wacom_post_parse_hid()
483 struct wacom_features *features) in wacom_parse_hid() argument
489 /* check features first */ in wacom_parse_hid()
517 wacom_post_parse_hid(hdev, features); in wacom_parse_hid()
581 struct wacom_features *features) in wacom_bt_query_tablet_data() argument
587 switch (features->type) { in wacom_bt_query_tablet_data()
644 struct wacom_features *features = &wacom_wac->features; in _wacom_query_tablet_data() local
647 return wacom_bt_query_tablet_data(hdev, 1, features); in _wacom_query_tablet_data()
649 if (features->type != HID_GENERIC) { in _wacom_query_tablet_data()
650 if (features->device_type & WACOM_DEVICETYPE_TOUCH) { in _wacom_query_tablet_data()
651 if (features->type > TABLETPC) { in _wacom_query_tablet_data()
655 } else if (features->type == WACOM_24HDT) { in _wacom_query_tablet_data()
658 } else if (features->type == WACOM_27QHDT) { in _wacom_query_tablet_data()
661 } else if (features->type == BAMBOO_PAD) { in _wacom_query_tablet_data()
665 } else if (features->device_type & WACOM_DEVICETYPE_PEN) { in _wacom_query_tablet_data()
666 if (features->type <= BAMBOO_PT) { in _wacom_query_tablet_data()
675 if (features->type == HID_GENERIC) in _wacom_query_tablet_data()
682 struct wacom_features *features) in wacom_retrieve_hid_descriptor() argument
687 /* default features */ in wacom_retrieve_hid_descriptor()
688 features->x_fuzz = 4; in wacom_retrieve_hid_descriptor()
689 features->y_fuzz = 4; in wacom_retrieve_hid_descriptor()
690 features->pressure_fuzz = 0; in wacom_retrieve_hid_descriptor()
691 features->distance_fuzz = 1; in wacom_retrieve_hid_descriptor()
692 features->tilt_fuzz = 1; in wacom_retrieve_hid_descriptor()
700 if (features->type == WIRELESS) { in wacom_retrieve_hid_descriptor()
702 features->device_type = WACOM_DEVICETYPE_WL_MONITOR; in wacom_retrieve_hid_descriptor()
704 features->device_type = WACOM_DEVICETYPE_NONE; in wacom_retrieve_hid_descriptor()
708 wacom_parse_hid(hdev, features); in wacom_retrieve_hid_descriptor()
725 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_are_sibling() local
727 struct wacom_features *sibling_features = &sibling_wacom->wacom_wac.features; in wacom_are_sibling()
728 __u32 oVid = features->oVid ? features->oVid : hdev->vendor; in wacom_are_sibling()
729 __u32 oPid = features->oPid ? features->oPid : hdev->product; in wacom_are_sibling()
732 if (features->oVid != HID_ANY_ID && sibling->vendor != oVid) in wacom_are_sibling()
734 if (features->oPid != HID_ANY_ID && sibling->product != oPid) in wacom_are_sibling()
751 if (features->type != HID_GENERIC) in wacom_are_sibling()
758 if ((features->device_type & WACOM_DEVICETYPE_DIRECT) && in wacom_are_sibling()
766 if (!(features->device_type & WACOM_DEVICETYPE_DIRECT) && in wacom_are_sibling()
771 if ((features->device_type & WACOM_DEVICETYPE_PEN) && in wacom_are_sibling()
776 if ((features->device_type & WACOM_DEVICETYPE_TOUCH) && in wacom_are_sibling()
873 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) in wacom_add_shared_data()
875 else if (wacom_wac->features.device_type & WACOM_DEVICETYPE_PEN) in wacom_add_shared_data()
893 if (wacom->wacom_wac.features.type == REMOTE) in wacom_led_control()
900 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) { in wacom_led_control()
908 if (wacom->wacom_wac.features.type == HID_GENERIC) { in wacom_led_control()
913 } else if ((wacom->wacom_wac.features.type >= INTUOS5S && in wacom_led_control()
914 wacom->wacom_wac.features.type <= INTUOSPL)) { in wacom_led_control()
934 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) { in wacom_led_control()
947 if (wacom->wacom_wac.features.type == WACOM_21UX2 || in wacom_led_control()
948 wacom->wacom_wac.features.type == WACOM_24HD) in wacom_led_control()
1522 if (!(wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD)) in wacom_initialize_leds()
1526 switch (wacom->wacom_wac.features.type) { in wacom_initialize_leds()
1745 if (wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) in wacom_initialize_battery()
1784 wacom_bt_query_tablet_data(hdev, new_speed, &wacom->wacom_wac.features); in wacom_store_speed()
1931 if (wacom->wacom_wac.features.type != REMOTE) in wacom_initialize_remotes()
1993 input_dev->name = wacom_wac->features.name; in wacom_allocate_input()
2090 static void wacom_set_default_phy(struct wacom_features *features) in wacom_set_default_phy() argument
2092 if (features->x_resolution) { in wacom_set_default_phy()
2093 features->x_phy = (features->x_max * 100) / in wacom_set_default_phy()
2094 features->x_resolution; in wacom_set_default_phy()
2095 features->y_phy = (features->y_max * 100) / in wacom_set_default_phy()
2096 features->y_resolution; in wacom_set_default_phy()
2100 static void wacom_calculate_res(struct wacom_features *features) in wacom_calculate_res() argument
2103 if (!features->unit) { in wacom_calculate_res()
2104 features->unit = 0x11; in wacom_calculate_res()
2105 features->unitExpo = -3; in wacom_calculate_res()
2108 features->x_resolution = wacom_calc_hid_res(features->x_max, in wacom_calculate_res()
2109 features->x_phy, in wacom_calculate_res()
2110 features->unit, in wacom_calculate_res()
2111 features->unitExpo); in wacom_calculate_res()
2112 features->y_resolution = wacom_calc_hid_res(features->y_max, in wacom_calculate_res()
2113 features->y_phy, in wacom_calculate_res()
2114 features->unit, in wacom_calculate_res()
2115 features->unitExpo); in wacom_calculate_res()
2122 if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
2126 else if (!(wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
2152 struct wacom_features *features = &wacom_wac->features; in wacom_update_name() local
2156 if ((features->type == HID_GENERIC) && !strcmp("Wacom HID", features->name)) { in wacom_update_name()
2167 features->name, wacom->hdev->product); in wacom_update_name()
2189 strlcpy(name, features->name, sizeof(name)); in wacom_update_name()
2222 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) { in wacom_set_shared_values()
2223 wacom_wac->shared->type = wacom_wac->features.type; in wacom_set_shared_values()
2243 struct wacom_features *features = &wacom_wac->features; in wacom_parse_and_register() local
2248 features->pktlen = wacom_compute_pktlen(hdev); in wacom_parse_and_register()
2249 if (features->pktlen > WACOM_PKGLEN_MAX) in wacom_parse_and_register()
2266 if (features->type == BAMBOO_PAD) { in wacom_parse_and_register()
2267 if (features->pktlen == WACOM_PKGLEN_PENABLED) { in wacom_parse_and_register()
2268 features->type = HID_GENERIC; in wacom_parse_and_register()
2269 } else if ((features->pktlen != WACOM_PKGLEN_BPAD_TOUCH) && in wacom_parse_and_register()
2270 (features->pktlen != WACOM_PKGLEN_BPAD_TOUCH_USB)) { in wacom_parse_and_register()
2277 wacom_set_default_phy(features); in wacom_parse_and_register()
2280 wacom_retrieve_hid_descriptor(hdev, features); in wacom_parse_and_register()
2283 if (features->device_type == WACOM_DEVICETYPE_NONE && in wacom_parse_and_register()
2284 features->type != WIRELESS) { in wacom_parse_and_register()
2285 error = features->type == HID_GENERIC ? -ENODEV : 0; in wacom_parse_and_register()
2294 features->device_type |= WACOM_DEVICETYPE_PEN; in wacom_parse_and_register()
2297 wacom_calculate_res(features); in wacom_parse_and_register()
2302 if ((features->type == BAMBOO_PEN) && in wacom_parse_and_register()
2303 ((features->device_type & WACOM_DEVICETYPE_TOUCH) || in wacom_parse_and_register()
2304 (features->device_type & WACOM_DEVICETYPE_PAD))) { in wacom_parse_and_register()
2313 if (!(features->device_type & WACOM_DEVICETYPE_WL_MONITOR) && in wacom_parse_and_register()
2314 (features->quirks & WACOM_QUIRK_BATTERY)) { in wacom_parse_and_register()
2324 if (wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD) { in wacom_parse_and_register()
2334 if (features->type == HID_GENERIC) in wacom_parse_and_register()
2350 if ((features->type == BAMBOO_TOUCH) && in wacom_parse_and_register()
2351 (features->device_type & WACOM_DEVICETYPE_PEN)) { in wacom_parse_and_register()
2358 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) in wacom_parse_and_register()
2423 wacom_wac1->features = in wacom_wireless_work()
2433 if (wacom_wac1->features.touch_max || in wacom_wireless_work()
2434 (wacom_wac1->features.type >= INTUOSHT && in wacom_wireless_work()
2435 wacom_wac1->features.type <= BAMBOO_PT)) { in wacom_wireless_work()
2436 wacom_wac2->features = in wacom_wireless_work()
2673 struct wacom_features *features; in wacom_probe() local
2692 wacom_wac->features = *((struct wacom_features *)id->driver_data); in wacom_probe()
2693 features = &wacom_wac->features; in wacom_probe()
2695 if (features->check_for_hid_type && features->hid_type != hdev->type) { in wacom_probe()
2746 struct wacom_features *features = &wacom_wac->features; in wacom_remove() local
2748 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) in wacom_remove()
2764 if (wacom->wacom_wac.features.type != REMOTE) in wacom_remove()