Lines Matching refs: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()
217 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_hid_usage_quirk() local
239 if (features->type == HID_GENERIC && in wacom_hid_usage_quirk()
268 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_feature_mapping() local
280 if (!features->touch_max) { in wacom_feature_mapping()
289 features->touch_max = data[1]; in wacom_feature_mapping()
291 features->touch_max = 16; in wacom_feature_mapping()
295 features->touch_max); in wacom_feature_mapping()
394 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_usage_mapping() local
405 features->device_type |= WACOM_DEVICETYPE_PEN; in wacom_usage_mapping()
407 features->device_type |= WACOM_DEVICETYPE_TOUCH; in wacom_usage_mapping()
415 features->x_max = field->logical_maximum; in wacom_usage_mapping()
417 features->x_phy = field->physical_maximum; in wacom_usage_mapping()
418 if ((features->type != BAMBOO_PT) && in wacom_usage_mapping()
419 (features->type != BAMBOO_TOUCH)) { in wacom_usage_mapping()
420 features->unit = field->unit; in wacom_usage_mapping()
421 features->unitExpo = field->unit_exponent; in wacom_usage_mapping()
426 features->y_max = field->logical_maximum; in wacom_usage_mapping()
428 features->y_phy = field->physical_maximum; in wacom_usage_mapping()
429 if ((features->type != BAMBOO_PT) && in wacom_usage_mapping()
430 (features->type != BAMBOO_TOUCH)) { in wacom_usage_mapping()
431 features->unit = field->unit; in wacom_usage_mapping()
432 features->unitExpo = field->unit_exponent; in wacom_usage_mapping()
438 features->pressure_max = field->logical_maximum; in wacom_usage_mapping()
442 if (features->type == HID_GENERIC) in wacom_usage_mapping()
447 struct wacom_features *features) in wacom_post_parse_hid() argument
452 if (features->type == HID_GENERIC) { in wacom_post_parse_hid()
456 features->device_type |= WACOM_DEVICETYPE_DIRECT; in wacom_post_parse_hid()
458 features->device_type &= ~WACOM_DEVICETYPE_DIRECT; in wacom_post_parse_hid()
461 if (features->touch_max > 1) { in wacom_post_parse_hid()
462 if (features->device_type & WACOM_DEVICETYPE_DIRECT) in wacom_post_parse_hid()
464 wacom_wac->features.touch_max, in wacom_post_parse_hid()
468 wacom_wac->features.touch_max, in wacom_post_parse_hid()
475 struct wacom_features *features) in wacom_parse_hid() argument
509 wacom_post_parse_hid(hdev, features); in wacom_parse_hid()
573 struct wacom_features *features) in wacom_bt_query_tablet_data() argument
579 switch (features->type) { in wacom_bt_query_tablet_data()
636 struct wacom_features *features = &wacom_wac->features; in _wacom_query_tablet_data() local
639 return wacom_bt_query_tablet_data(hdev, 1, features); in _wacom_query_tablet_data()
641 if (features->type != HID_GENERIC) { in _wacom_query_tablet_data()
642 if (features->device_type & WACOM_DEVICETYPE_TOUCH) { in _wacom_query_tablet_data()
643 if (features->type > TABLETPC) { in _wacom_query_tablet_data()
647 } else if (features->type == WACOM_24HDT) { in _wacom_query_tablet_data()
650 } else if (features->type == WACOM_27QHDT) { in _wacom_query_tablet_data()
653 } else if (features->type == BAMBOO_PAD) { in _wacom_query_tablet_data()
657 } else if (features->device_type & WACOM_DEVICETYPE_PEN) { in _wacom_query_tablet_data()
658 if (features->type <= BAMBOO_PT) { in _wacom_query_tablet_data()
667 if (features->type == HID_GENERIC) in _wacom_query_tablet_data()
674 struct wacom_features *features) in wacom_retrieve_hid_descriptor() argument
680 features->x_fuzz = 4; in wacom_retrieve_hid_descriptor()
681 features->y_fuzz = 4; in wacom_retrieve_hid_descriptor()
682 features->pressure_fuzz = 0; in wacom_retrieve_hid_descriptor()
683 features->distance_fuzz = 1; in wacom_retrieve_hid_descriptor()
684 features->tilt_fuzz = 1; in wacom_retrieve_hid_descriptor()
692 if (features->type == WIRELESS) { in wacom_retrieve_hid_descriptor()
694 features->device_type = WACOM_DEVICETYPE_WL_MONITOR; in wacom_retrieve_hid_descriptor()
696 features->device_type = WACOM_DEVICETYPE_NONE; in wacom_retrieve_hid_descriptor()
700 wacom_parse_hid(hdev, features); in wacom_retrieve_hid_descriptor()
717 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_are_sibling() local
719 struct wacom_features *sibling_features = &sibling_wacom->wacom_wac.features; in wacom_are_sibling()
720 __u32 oVid = features->oVid ? features->oVid : hdev->vendor; in wacom_are_sibling()
721 __u32 oPid = features->oPid ? features->oPid : hdev->product; in wacom_are_sibling()
724 if (features->oVid != HID_ANY_ID && sibling->vendor != oVid) in wacom_are_sibling()
726 if (features->oPid != HID_ANY_ID && sibling->product != oPid) in wacom_are_sibling()
743 if (features->type != HID_GENERIC) in wacom_are_sibling()
750 if ((features->device_type & WACOM_DEVICETYPE_DIRECT) && in wacom_are_sibling()
758 if (!(features->device_type & WACOM_DEVICETYPE_DIRECT) && in wacom_are_sibling()
763 if ((features->device_type & WACOM_DEVICETYPE_PEN) && in wacom_are_sibling()
768 if ((features->device_type & WACOM_DEVICETYPE_TOUCH) && in wacom_are_sibling()
865 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) in wacom_add_shared_data()
867 else if (wacom_wac->features.device_type & WACOM_DEVICETYPE_PEN) in wacom_add_shared_data()
885 if (wacom->wacom_wac.features.type == REMOTE) in wacom_led_control()
892 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) { in wacom_led_control()
900 if (wacom->wacom_wac.features.type == HID_GENERIC) { in wacom_led_control()
905 } else if ((wacom->wacom_wac.features.type >= INTUOS5S && in wacom_led_control()
906 wacom->wacom_wac.features.type <= INTUOSPL)) { in wacom_led_control()
926 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) { in wacom_led_control()
939 if (wacom->wacom_wac.features.type == WACOM_21UX2 || in wacom_led_control()
940 wacom->wacom_wac.features.type == WACOM_24HD) in wacom_led_control()
1514 if (!(wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD)) in wacom_initialize_leds()
1518 switch (wacom->wacom_wac.features.type) { in wacom_initialize_leds()
1737 if (wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) in wacom_initialize_battery()
1776 wacom_bt_query_tablet_data(hdev, new_speed, &wacom->wacom_wac.features); in wacom_store_speed()
1923 if (wacom->wacom_wac.features.type != REMOTE) in wacom_initialize_remotes()
1985 input_dev->name = wacom_wac->features.name; in wacom_allocate_input()
2082 static void wacom_set_default_phy(struct wacom_features *features) in wacom_set_default_phy() argument
2084 if (features->x_resolution) { in wacom_set_default_phy()
2085 features->x_phy = (features->x_max * 100) / in wacom_set_default_phy()
2086 features->x_resolution; in wacom_set_default_phy()
2087 features->y_phy = (features->y_max * 100) / in wacom_set_default_phy()
2088 features->y_resolution; in wacom_set_default_phy()
2092 static void wacom_calculate_res(struct wacom_features *features) in wacom_calculate_res() argument
2095 if (!features->unit) { in wacom_calculate_res()
2096 features->unit = 0x11; in wacom_calculate_res()
2097 features->unitExpo = -3; in wacom_calculate_res()
2100 features->x_resolution = wacom_calc_hid_res(features->x_max, in wacom_calculate_res()
2101 features->x_phy, in wacom_calculate_res()
2102 features->unit, in wacom_calculate_res()
2103 features->unitExpo); in wacom_calculate_res()
2104 features->y_resolution = wacom_calc_hid_res(features->y_max, in wacom_calculate_res()
2105 features->y_phy, in wacom_calculate_res()
2106 features->unit, in wacom_calculate_res()
2107 features->unitExpo); in wacom_calculate_res()
2114 if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
2118 else if (!(wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
2144 struct wacom_features *features = &wacom_wac->features; in wacom_update_name() local
2148 if ((features->type == HID_GENERIC) && !strcmp("Wacom HID", features->name)) { in wacom_update_name()
2159 features->name, wacom->hdev->product); in wacom_update_name()
2181 strlcpy(name, features->name, sizeof(name)); in wacom_update_name()
2214 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) { in wacom_set_shared_values()
2215 wacom_wac->shared->type = wacom_wac->features.type; in wacom_set_shared_values()
2235 struct wacom_features *features = &wacom_wac->features; in wacom_parse_and_register() local
2240 features->pktlen = wacom_compute_pktlen(hdev); in wacom_parse_and_register()
2241 if (features->pktlen > WACOM_PKGLEN_MAX) in wacom_parse_and_register()
2258 if (features->type == BAMBOO_PAD) { in wacom_parse_and_register()
2259 if (features->pktlen == WACOM_PKGLEN_PENABLED) { in wacom_parse_and_register()
2260 features->type = HID_GENERIC; in wacom_parse_and_register()
2261 } else if ((features->pktlen != WACOM_PKGLEN_BPAD_TOUCH) && in wacom_parse_and_register()
2262 (features->pktlen != WACOM_PKGLEN_BPAD_TOUCH_USB)) { in wacom_parse_and_register()
2269 wacom_set_default_phy(features); in wacom_parse_and_register()
2272 wacom_retrieve_hid_descriptor(hdev, features); in wacom_parse_and_register()
2275 if (features->device_type == WACOM_DEVICETYPE_NONE && in wacom_parse_and_register()
2276 features->type != WIRELESS) { in wacom_parse_and_register()
2277 error = features->type == HID_GENERIC ? -ENODEV : 0; in wacom_parse_and_register()
2286 features->device_type |= WACOM_DEVICETYPE_PEN; in wacom_parse_and_register()
2289 wacom_calculate_res(features); in wacom_parse_and_register()
2294 if ((features->type == BAMBOO_PEN) && in wacom_parse_and_register()
2295 ((features->device_type & WACOM_DEVICETYPE_TOUCH) || in wacom_parse_and_register()
2296 (features->device_type & WACOM_DEVICETYPE_PAD))) { in wacom_parse_and_register()
2305 if (!(features->device_type & WACOM_DEVICETYPE_WL_MONITOR) && in wacom_parse_and_register()
2306 (features->quirks & WACOM_QUIRK_BATTERY)) { in wacom_parse_and_register()
2316 if (wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD) { in wacom_parse_and_register()
2326 if (features->type == HID_GENERIC) in wacom_parse_and_register()
2342 if ((features->type == BAMBOO_TOUCH) && in wacom_parse_and_register()
2343 (features->device_type & WACOM_DEVICETYPE_PEN)) { in wacom_parse_and_register()
2350 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) in wacom_parse_and_register()
2415 wacom_wac1->features = in wacom_wireless_work()
2425 if (wacom_wac1->features.touch_max || in wacom_wireless_work()
2426 (wacom_wac1->features.type >= INTUOSHT && in wacom_wireless_work()
2427 wacom_wac1->features.type <= BAMBOO_PT)) { in wacom_wireless_work()
2428 wacom_wac2->features = in wacom_wireless_work()
2665 struct wacom_features *features; in wacom_probe() local
2684 wacom_wac->features = *((struct wacom_features *)id->driver_data); in wacom_probe()
2685 features = &wacom_wac->features; in wacom_probe()
2687 if (features->check_for_hid_type && features->hid_type != hdev->type) { in wacom_probe()
2738 struct wacom_features *features = &wacom_wac->features; in wacom_remove() local
2740 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) in wacom_remove()
2756 if (wacom->wacom_wac.features.type != REMOTE) in wacom_remove()