Lines Matching full:features

90 	struct wacom_features *features = &wacom_wac->features;  in wacom_wac_pen_serial_enforce()  local
95 if (wacom_wac->serial[0] || !(features->quirks & WACOM_QUIRK_TOOLSERIAL)) in wacom_wac_pen_serial_enforce()
210 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_hid_usage_quirk() local
232 if (features->type == HID_GENERIC && in wacom_hid_usage_quirk()
268 features->quirks |= WACOM_QUIRK_AESPEN; in wacom_hid_usage_quirk()
293 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_feature_mapping() local
308 if (!features->touch_max) { in wacom_feature_mapping()
317 if (ret == n && features->type == HID_GENERIC) { in wacom_feature_mapping()
320 } else if (ret == 2 && features->type != HID_GENERIC) { in wacom_feature_mapping()
321 features->touch_max = data[1]; in wacom_feature_mapping()
323 features->touch_max = 16; in wacom_feature_mapping()
327 features->touch_max); in wacom_feature_mapping()
426 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_usage_mapping() local
437 features->device_type |= WACOM_DEVICETYPE_PEN; in wacom_usage_mapping()
439 features->device_type |= WACOM_DEVICETYPE_TOUCH; in wacom_usage_mapping()
447 features->x_max = field->logical_maximum; in wacom_usage_mapping()
449 features->x_phy = field->physical_maximum; in wacom_usage_mapping()
450 if ((features->type != BAMBOO_PT) && in wacom_usage_mapping()
451 (features->type != BAMBOO_TOUCH)) { in wacom_usage_mapping()
452 features->unit = field->unit; in wacom_usage_mapping()
453 features->unitExpo = field->unit_exponent; in wacom_usage_mapping()
458 features->y_max = field->logical_maximum; in wacom_usage_mapping()
460 features->y_phy = field->physical_maximum; in wacom_usage_mapping()
461 if ((features->type != BAMBOO_PT) && in wacom_usage_mapping()
462 (features->type != BAMBOO_TOUCH)) { in wacom_usage_mapping()
463 features->unit = field->unit; in wacom_usage_mapping()
464 features->unitExpo = field->unit_exponent; in wacom_usage_mapping()
470 features->pressure_max = field->logical_maximum; in wacom_usage_mapping()
474 if (features->type == HID_GENERIC) in wacom_usage_mapping()
479 struct wacom_features *features) in wacom_post_parse_hid() argument
484 if (features->type == HID_GENERIC) { in wacom_post_parse_hid()
488 features->device_type |= WACOM_DEVICETYPE_DIRECT; in wacom_post_parse_hid()
490 features->device_type &= ~WACOM_DEVICETYPE_DIRECT; in wacom_post_parse_hid()
493 if (features->touch_max > 1) { in wacom_post_parse_hid()
494 if (features->device_type & WACOM_DEVICETYPE_DIRECT) in wacom_post_parse_hid()
496 wacom_wac->features.touch_max, in wacom_post_parse_hid()
500 wacom_wac->features.touch_max, in wacom_post_parse_hid()
507 struct wacom_features *features) in wacom_parse_hid() argument
513 /* check features first */ in wacom_parse_hid()
541 wacom_post_parse_hid(hdev, features); in wacom_parse_hid()
605 struct wacom_features *features) in wacom_bt_query_tablet_data() argument
611 switch (features->type) { in wacom_bt_query_tablet_data()
668 struct wacom_features *features = &wacom_wac->features; in _wacom_query_tablet_data() local
671 return wacom_bt_query_tablet_data(hdev, 1, features); in _wacom_query_tablet_data()
673 if (features->type != HID_GENERIC) { in _wacom_query_tablet_data()
674 if (features->device_type & WACOM_DEVICETYPE_TOUCH) { in _wacom_query_tablet_data()
675 if (features->type > TABLETPC) { in _wacom_query_tablet_data()
679 } else if (features->type == WACOM_24HDT) { in _wacom_query_tablet_data()
682 } else if (features->type == WACOM_27QHDT) { in _wacom_query_tablet_data()
685 } else if (features->type == BAMBOO_PAD) { in _wacom_query_tablet_data()
689 } else if (features->device_type & WACOM_DEVICETYPE_PEN) { in _wacom_query_tablet_data()
690 if (features->type <= BAMBOO_PT) { in _wacom_query_tablet_data()
699 if (features->type == HID_GENERIC) in _wacom_query_tablet_data()
706 struct wacom_features *features) in wacom_retrieve_hid_descriptor() argument
711 /* default features */ in wacom_retrieve_hid_descriptor()
712 features->x_fuzz = 4; in wacom_retrieve_hid_descriptor()
713 features->y_fuzz = 4; in wacom_retrieve_hid_descriptor()
714 features->pressure_fuzz = 0; in wacom_retrieve_hid_descriptor()
715 features->distance_fuzz = 1; in wacom_retrieve_hid_descriptor()
716 features->tilt_fuzz = 1; in wacom_retrieve_hid_descriptor()
724 if (features->type == WIRELESS && intf) { in wacom_retrieve_hid_descriptor()
726 features->device_type = WACOM_DEVICETYPE_WL_MONITOR; in wacom_retrieve_hid_descriptor()
728 features->device_type = WACOM_DEVICETYPE_NONE; in wacom_retrieve_hid_descriptor()
732 wacom_parse_hid(hdev, features); in wacom_retrieve_hid_descriptor()
749 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_are_sibling() local
751 struct wacom_features *sibling_features = &sibling_wacom->wacom_wac.features; in wacom_are_sibling()
752 __u32 oVid = features->oVid ? features->oVid : hdev->vendor; in wacom_are_sibling()
753 __u32 oPid = features->oPid ? features->oPid : hdev->product; in wacom_are_sibling()
756 if (features->oVid != HID_ANY_ID && sibling->vendor != oVid) in wacom_are_sibling()
758 if (features->oPid != HID_ANY_ID && sibling->product != oPid) in wacom_are_sibling()
775 if (features->type != HID_GENERIC) in wacom_are_sibling()
782 if ((features->device_type & WACOM_DEVICETYPE_DIRECT) && in wacom_are_sibling()
790 if (!(features->device_type & WACOM_DEVICETYPE_DIRECT) && in wacom_are_sibling()
795 if ((features->device_type & WACOM_DEVICETYPE_PEN) && in wacom_are_sibling()
800 if ((features->device_type & WACOM_DEVICETYPE_TOUCH) && in wacom_are_sibling()
896 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) in wacom_add_shared_data()
898 else if (wacom_wac->features.device_type & WACOM_DEVICETYPE_PEN) in wacom_add_shared_data()
914 if (wacom->wacom_wac.features.type == REMOTE) in wacom_led_control()
921 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) { in wacom_led_control()
929 if (wacom->wacom_wac.features.type == HID_GENERIC) { in wacom_led_control()
934 } else if ((wacom->wacom_wac.features.type >= INTUOS5S && in wacom_led_control()
935 wacom->wacom_wac.features.type <= INTUOSPL)) { in wacom_led_control()
955 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) { in wacom_led_control()
968 if (wacom->wacom_wac.features.type == WACOM_21UX2 || in wacom_led_control()
969 wacom->wacom_wac.features.type == WACOM_24HD) in wacom_led_control()
1575 if (!(wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD)) in wacom_initialize_leds()
1579 switch (wacom->wacom_wac.features.type) { in wacom_initialize_leds()
1798 if (wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) in wacom_initialize_battery()
1837 wacom_bt_query_tablet_data(hdev, new_speed, &wacom->wacom_wac.features); in wacom_store_speed()
1984 if (wacom->wacom_wac.features.type != REMOTE) in wacom_initialize_remotes()
2046 input_dev->name = wacom_wac->features.name; in wacom_allocate_input()
2143 static void wacom_set_default_phy(struct wacom_features *features) in wacom_set_default_phy() argument
2145 if (features->x_resolution) { in wacom_set_default_phy()
2146 features->x_phy = (features->x_max * 100) / in wacom_set_default_phy()
2147 features->x_resolution; in wacom_set_default_phy()
2148 features->y_phy = (features->y_max * 100) / in wacom_set_default_phy()
2149 features->y_resolution; in wacom_set_default_phy()
2153 static void wacom_calculate_res(struct wacom_features *features) in wacom_calculate_res() argument
2156 if (!features->unit) { in wacom_calculate_res()
2157 features->unit = 0x11; in wacom_calculate_res()
2158 features->unitExpo = -3; in wacom_calculate_res()
2161 features->x_resolution = wacom_calc_hid_res(features->x_max, in wacom_calculate_res()
2162 features->x_phy, in wacom_calculate_res()
2163 features->unit, in wacom_calculate_res()
2164 features->unitExpo); in wacom_calculate_res()
2165 features->y_resolution = wacom_calc_hid_res(features->y_max, in wacom_calculate_res()
2166 features->y_phy, in wacom_calculate_res()
2167 features->unit, in wacom_calculate_res()
2168 features->unitExpo); in wacom_calculate_res()
2175 if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
2179 else if (!(wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
2205 struct wacom_features *features = &wacom_wac->features; in wacom_update_name() local
2209 if ((features->type == HID_GENERIC) && !strcmp("Wacom HID", features->name)) { in wacom_update_name()
2220 features->name, wacom->hdev->product); in wacom_update_name()
2242 strscpy(name, features->name, sizeof(name)); in wacom_update_name()
2275 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) { in wacom_set_shared_values()
2276 wacom_wac->shared->type = wacom_wac->features.type; in wacom_set_shared_values()
2302 struct wacom_features *features = &wacom_wac->features; in wacom_parse_and_register() local
2307 features->pktlen = wacom_compute_pktlen(hdev); in wacom_parse_and_register()
2308 if (features->pktlen > WACOM_PKGLEN_MAX) in wacom_parse_and_register()
2325 if (features->type == BAMBOO_PAD) { in wacom_parse_and_register()
2326 if (features->pktlen == WACOM_PKGLEN_PENABLED) { in wacom_parse_and_register()
2327 features->type = HID_GENERIC; in wacom_parse_and_register()
2328 } else if ((features->pktlen != WACOM_PKGLEN_BPAD_TOUCH) && in wacom_parse_and_register()
2329 (features->pktlen != WACOM_PKGLEN_BPAD_TOUCH_USB)) { in wacom_parse_and_register()
2336 wacom_set_default_phy(features); in wacom_parse_and_register()
2339 wacom_retrieve_hid_descriptor(hdev, features); in wacom_parse_and_register()
2342 if (features->device_type == WACOM_DEVICETYPE_NONE && in wacom_parse_and_register()
2343 features->type != WIRELESS) { in wacom_parse_and_register()
2344 error = features->type == HID_GENERIC ? -ENODEV : 0; in wacom_parse_and_register()
2353 features->device_type |= WACOM_DEVICETYPE_PEN; in wacom_parse_and_register()
2356 wacom_calculate_res(features); in wacom_parse_and_register()
2361 if ((features->type == BAMBOO_PEN) && in wacom_parse_and_register()
2362 ((features->device_type & WACOM_DEVICETYPE_TOUCH) || in wacom_parse_and_register()
2363 (features->device_type & WACOM_DEVICETYPE_PAD))) { in wacom_parse_and_register()
2372 if (!(features->device_type & WACOM_DEVICETYPE_WL_MONITOR) && in wacom_parse_and_register()
2373 (features->quirks & WACOM_QUIRK_BATTERY)) { in wacom_parse_and_register()
2383 if (wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD) { in wacom_parse_and_register()
2393 if (features->type == HID_GENERIC) in wacom_parse_and_register()
2409 if ((features->type == BAMBOO_TOUCH) && in wacom_parse_and_register()
2410 (features->device_type & WACOM_DEVICETYPE_PEN)) { in wacom_parse_and_register()
2417 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) in wacom_parse_and_register()
2485 wacom_wac1->features = in wacom_wireless_work()
2495 if (wacom_wac1->features.touch_max || in wacom_wireless_work()
2496 (wacom_wac1->features.type >= INTUOSHT && in wacom_wireless_work()
2497 wacom_wac1->features.type <= BAMBOO_PT)) { in wacom_wireless_work()
2498 wacom_wac2->features = in wacom_wireless_work()
2733 struct wacom_features *features; in wacom_probe() local
2752 wacom_wac->features = *((struct wacom_features *)id->driver_data); in wacom_probe()
2753 features = &wacom_wac->features; in wacom_probe()
2755 if (features->check_for_hid_type && features->hid_type != hdev->type) in wacom_probe()
2808 struct wacom_features *features = &wacom_wac->features; in wacom_remove() local
2810 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) in wacom_remove()
2827 if (wacom->wacom_wac.features.type != REMOTE) in wacom_remove()