Lines Matching refs:features
108 struct wacom_features *features = &wacom_wac->features; in wacom_wac_pen_serial_enforce() local
113 if (wacom_wac->serial[0] || !(features->quirks & WACOM_QUIRK_TOOLSERIAL)) in wacom_wac_pen_serial_enforce()
176 if (wacom->wacom_wac.features.type == BOOTLOADER) in wacom_raw_event()
228 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_hid_usage_quirk() local
250 if (features->type == HID_GENERIC && in wacom_hid_usage_quirk()
286 features->quirks |= WACOM_QUIRK_AESPEN; in wacom_hid_usage_quirk()
311 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_feature_mapping() local
326 if (!features->touch_max) { in wacom_feature_mapping()
335 if (ret == n && features->type == HID_GENERIC) { in wacom_feature_mapping()
338 } else if (ret == 2 && features->type != HID_GENERIC) { in wacom_feature_mapping()
339 features->touch_max = data[1]; in wacom_feature_mapping()
341 features->touch_max = 16; in wacom_feature_mapping()
345 features->touch_max); in wacom_feature_mapping()
444 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_usage_mapping() local
455 features->device_type |= WACOM_DEVICETYPE_PEN; in wacom_usage_mapping()
457 features->device_type |= WACOM_DEVICETYPE_TOUCH; in wacom_usage_mapping()
465 features->x_max = field->logical_maximum; in wacom_usage_mapping()
467 features->x_phy = field->physical_maximum; in wacom_usage_mapping()
468 if ((features->type != BAMBOO_PT) && in wacom_usage_mapping()
469 (features->type != BAMBOO_TOUCH)) { in wacom_usage_mapping()
470 features->unit = field->unit; in wacom_usage_mapping()
471 features->unitExpo = field->unit_exponent; in wacom_usage_mapping()
476 features->y_max = field->logical_maximum; in wacom_usage_mapping()
478 features->y_phy = field->physical_maximum; in wacom_usage_mapping()
479 if ((features->type != BAMBOO_PT) && in wacom_usage_mapping()
480 (features->type != BAMBOO_TOUCH)) { in wacom_usage_mapping()
481 features->unit = field->unit; in wacom_usage_mapping()
482 features->unitExpo = field->unit_exponent; in wacom_usage_mapping()
488 features->pressure_max = field->logical_maximum; in wacom_usage_mapping()
492 if (features->type == HID_GENERIC) in wacom_usage_mapping()
497 struct wacom_features *features) in wacom_post_parse_hid() argument
502 if (features->type == HID_GENERIC) { in wacom_post_parse_hid()
506 features->device_type |= WACOM_DEVICETYPE_DIRECT; in wacom_post_parse_hid()
508 features->device_type &= ~WACOM_DEVICETYPE_DIRECT; in wacom_post_parse_hid()
511 if (features->touch_max > 1) { in wacom_post_parse_hid()
512 if (features->device_type & WACOM_DEVICETYPE_DIRECT) in wacom_post_parse_hid()
514 wacom_wac->features.touch_max, in wacom_post_parse_hid()
518 wacom_wac->features.touch_max, in wacom_post_parse_hid()
525 struct wacom_features *features) in wacom_parse_hid() argument
559 wacom_post_parse_hid(hdev, features); in wacom_parse_hid()
623 struct wacom_features *features) in wacom_bt_query_tablet_data() argument
629 switch (features->type) { in wacom_bt_query_tablet_data()
686 struct wacom_features *features = &wacom_wac->features; in _wacom_query_tablet_data() local
689 return wacom_bt_query_tablet_data(hdev, 1, features); in _wacom_query_tablet_data()
691 if (features->type != HID_GENERIC) { in _wacom_query_tablet_data()
692 if (features->device_type & WACOM_DEVICETYPE_TOUCH) { in _wacom_query_tablet_data()
693 if (features->type > TABLETPC) { in _wacom_query_tablet_data()
697 } else if (features->type == WACOM_24HDT) { in _wacom_query_tablet_data()
700 } else if (features->type == WACOM_27QHDT) { in _wacom_query_tablet_data()
703 } else if (features->type == BAMBOO_PAD) { in _wacom_query_tablet_data()
707 } else if (features->device_type & WACOM_DEVICETYPE_PEN) { in _wacom_query_tablet_data()
708 if (features->type <= BAMBOO_PT) { in _wacom_query_tablet_data()
717 if (features->type == HID_GENERIC) in _wacom_query_tablet_data()
724 struct wacom_features *features) in wacom_retrieve_hid_descriptor() argument
730 features->x_fuzz = 4; in wacom_retrieve_hid_descriptor()
731 features->y_fuzz = 4; in wacom_retrieve_hid_descriptor()
732 features->pressure_fuzz = 0; in wacom_retrieve_hid_descriptor()
733 features->distance_fuzz = 1; in wacom_retrieve_hid_descriptor()
734 features->tilt_fuzz = 1; in wacom_retrieve_hid_descriptor()
742 if (features->type == WIRELESS && intf) { in wacom_retrieve_hid_descriptor()
744 features->device_type = WACOM_DEVICETYPE_WL_MONITOR; in wacom_retrieve_hid_descriptor()
746 features->device_type = WACOM_DEVICETYPE_NONE; in wacom_retrieve_hid_descriptor()
750 wacom_parse_hid(hdev, features); in wacom_retrieve_hid_descriptor()
767 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_are_sibling() local
769 struct wacom_features *sibling_features = &sibling_wacom->wacom_wac.features; in wacom_are_sibling()
770 __u32 oVid = features->oVid ? features->oVid : hdev->vendor; in wacom_are_sibling()
771 __u32 oPid = features->oPid ? features->oPid : hdev->product; in wacom_are_sibling()
774 if (features->oVid != HID_ANY_ID && sibling->vendor != oVid) in wacom_are_sibling()
776 if (features->oPid != HID_ANY_ID && sibling->product != oPid) in wacom_are_sibling()
793 if (features->type != HID_GENERIC) in wacom_are_sibling()
800 if ((features->device_type & WACOM_DEVICETYPE_DIRECT) && in wacom_are_sibling()
808 if (!(features->device_type & WACOM_DEVICETYPE_DIRECT) && in wacom_are_sibling()
813 if ((features->device_type & WACOM_DEVICETYPE_PEN) && in wacom_are_sibling()
818 if ((features->device_type & WACOM_DEVICETYPE_TOUCH) && in wacom_are_sibling()
914 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) in wacom_add_shared_data()
916 else if (wacom_wac->features.device_type & WACOM_DEVICETYPE_PEN) in wacom_add_shared_data()
932 if (wacom->wacom_wac.features.type == REMOTE) in wacom_led_control()
939 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) { in wacom_led_control()
947 if (wacom->wacom_wac.features.type == HID_GENERIC) { in wacom_led_control()
952 } else if ((wacom->wacom_wac.features.type >= INTUOS5S && in wacom_led_control()
953 wacom->wacom_wac.features.type <= INTUOSPL)) { in wacom_led_control()
973 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) { in wacom_led_control()
986 if (wacom->wacom_wac.features.type == WACOM_21UX2 || in wacom_led_control()
987 wacom->wacom_wac.features.type == WACOM_24HD) in wacom_led_control()
1304 int fifo_size = min(PAGE_SIZE, 10 * wacom_wac->features.pktlen); in wacom_devm_kfifo_alloc()
1607 if (!(wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD)) in wacom_initialize_leds()
1611 switch (wacom->wacom_wac.features.type) { in wacom_initialize_leds()
1830 if (wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) in wacom_initialize_battery()
1876 wacom_bt_query_tablet_data(hdev, new_speed, &wacom->wacom_wac.features); in wacom_store_speed()
2023 if (wacom->wacom_wac.features.type != REMOTE) in wacom_initialize_remotes()
2089 input_dev->name = wacom_wac->features.name; in wacom_allocate_input()
2205 static void wacom_set_default_phy(struct wacom_features *features) in wacom_set_default_phy() argument
2207 if (features->x_resolution) { in wacom_set_default_phy()
2208 features->x_phy = (features->x_max * 100) / in wacom_set_default_phy()
2209 features->x_resolution; in wacom_set_default_phy()
2210 features->y_phy = (features->y_max * 100) / in wacom_set_default_phy()
2211 features->y_resolution; in wacom_set_default_phy()
2215 static void wacom_calculate_res(struct wacom_features *features) in wacom_calculate_res() argument
2218 if (!features->unit) { in wacom_calculate_res()
2219 features->unit = 0x11; in wacom_calculate_res()
2220 features->unitExpo = -3; in wacom_calculate_res()
2223 features->x_resolution = wacom_calc_hid_res(features->x_max, in wacom_calculate_res()
2224 features->x_phy, in wacom_calculate_res()
2225 features->unit, in wacom_calculate_res()
2226 features->unitExpo); in wacom_calculate_res()
2227 features->y_resolution = wacom_calc_hid_res(features->y_max, in wacom_calculate_res()
2228 features->y_phy, in wacom_calculate_res()
2229 features->unit, in wacom_calculate_res()
2230 features->unitExpo); in wacom_calculate_res()
2237 if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
2241 else if (!(wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
2267 struct wacom_features *features = &wacom_wac->features; in wacom_update_name() local
2271 if ((features->type == HID_GENERIC) && !strcmp("Wacom HID", features->name)) { in wacom_update_name()
2283 features->name, wacom->hdev->product); in wacom_update_name()
2307 if (strscpy(name, features->name, sizeof(name)) < 0) { in wacom_update_name()
2342 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) { in wacom_set_shared_values()
2343 wacom_wac->shared->type = wacom_wac->features.type; in wacom_set_shared_values()
2369 struct wacom_features *features = &wacom_wac->features; in wacom_parse_and_register() local
2374 features->pktlen = wacom_compute_pktlen(hdev); in wacom_parse_and_register()
2375 if (!features->pktlen) in wacom_parse_and_register()
2396 if (features->type == BAMBOO_PAD) { in wacom_parse_and_register()
2397 if (features->pktlen == WACOM_PKGLEN_PENABLED) { in wacom_parse_and_register()
2398 features->type = HID_GENERIC; in wacom_parse_and_register()
2399 } else if ((features->pktlen != WACOM_PKGLEN_BPAD_TOUCH) && in wacom_parse_and_register()
2400 (features->pktlen != WACOM_PKGLEN_BPAD_TOUCH_USB)) { in wacom_parse_and_register()
2407 wacom_set_default_phy(features); in wacom_parse_and_register()
2410 wacom_retrieve_hid_descriptor(hdev, features); in wacom_parse_and_register()
2413 if (features->device_type == WACOM_DEVICETYPE_NONE && in wacom_parse_and_register()
2414 features->type != WIRELESS) { in wacom_parse_and_register()
2415 error = features->type == HID_GENERIC ? -ENODEV : 0; in wacom_parse_and_register()
2424 features->device_type |= WACOM_DEVICETYPE_PEN; in wacom_parse_and_register()
2427 wacom_calculate_res(features); in wacom_parse_and_register()
2432 if ((features->type == BAMBOO_PEN) && in wacom_parse_and_register()
2433 ((features->device_type & WACOM_DEVICETYPE_TOUCH) || in wacom_parse_and_register()
2434 (features->device_type & WACOM_DEVICETYPE_PAD))) { in wacom_parse_and_register()
2447 if (features->type == HID_GENERIC) in wacom_parse_and_register()
2461 if (wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD) { in wacom_parse_and_register()
2477 if ((features->type == BAMBOO_TOUCH) && in wacom_parse_and_register()
2478 (features->device_type & WACOM_DEVICETYPE_PEN)) { in wacom_parse_and_register()
2485 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) { in wacom_parse_and_register()
2558 wacom_wac1->features = in wacom_wireless_work()
2568 if (wacom_wac1->features.touch_max || in wacom_wireless_work()
2569 (wacom_wac1->features.type >= INTUOSHT && in wacom_wireless_work()
2570 wacom_wac1->features.type <= BAMBOO_PT)) { in wacom_wireless_work()
2571 wacom_wac2->features = in wacom_wireless_work()
2823 struct wacom_features *features; in wacom_probe() local
2842 wacom_wac->features = *((struct wacom_features *)id->driver_data); in wacom_probe()
2843 features = &wacom_wac->features; in wacom_probe()
2845 if (features->check_for_hid_type && features->hid_type != hdev->type) in wacom_probe()
2875 if (features->type == BOOTLOADER) { in wacom_probe()
2900 struct wacom_features *features = &wacom_wac->features; in wacom_remove() local
2902 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) in wacom_remove()
2920 if (wacom->wacom_wac.features.type != REMOTE) in wacom_remove()