Lines Matching refs:features

117 	struct wacom_features *features = &wacom->wacom_wac.features;  in wacom_feature_mapping()  local
125 if (!features->touch_max) { in wacom_feature_mapping()
134 features->touch_max = data[1]; in wacom_feature_mapping()
136 features->touch_max = 16; in wacom_feature_mapping()
140 features->touch_max); in wacom_feature_mapping()
194 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_usage_mapping() local
204 features->device_type |= WACOM_DEVICETYPE_PEN; in wacom_usage_mapping()
206 features->device_type |= WACOM_DEVICETYPE_TOUCH; in wacom_usage_mapping()
214 if (features->type > BAMBOO_PT) { in wacom_usage_mapping()
216 if (finger && !features->touch_max) in wacom_usage_mapping()
217 features->touch_max = 1; in wacom_usage_mapping()
222 features->x_max = field->logical_maximum; in wacom_usage_mapping()
224 features->x_phy = field->physical_maximum; in wacom_usage_mapping()
225 if ((features->type != BAMBOO_PT) && in wacom_usage_mapping()
226 (features->type != BAMBOO_TOUCH)) { in wacom_usage_mapping()
227 features->unit = field->unit; in wacom_usage_mapping()
228 features->unitExpo = field->unit_exponent; in wacom_usage_mapping()
233 features->y_max = field->logical_maximum; in wacom_usage_mapping()
235 features->y_phy = field->physical_maximum; in wacom_usage_mapping()
236 if ((features->type != BAMBOO_PT) && in wacom_usage_mapping()
237 (features->type != BAMBOO_TOUCH)) { in wacom_usage_mapping()
238 features->unit = field->unit; in wacom_usage_mapping()
239 features->unitExpo = field->unit_exponent; in wacom_usage_mapping()
245 features->pressure_max = field->logical_maximum; in wacom_usage_mapping()
249 if (features->type == HID_GENERIC) in wacom_usage_mapping()
254 struct wacom_features *features) in wacom_post_parse_hid() argument
259 if (features->type == HID_GENERIC) { in wacom_post_parse_hid()
261 if (features->touch_max > 1) { in wacom_post_parse_hid()
262 input_mt_init_slots(wacom_wac->touch_input, wacom_wac->features.touch_max, in wacom_post_parse_hid()
269 struct wacom_features *features) in wacom_parse_hid() argument
303 wacom_post_parse_hid(hdev, features); in wacom_parse_hid()
352 struct wacom_features *features) in wacom_bt_query_tablet_data() argument
358 switch (features->type) { in wacom_bt_query_tablet_data()
412 struct wacom_features *features) in wacom_query_tablet_data() argument
415 return wacom_bt_query_tablet_data(hdev, 1, features); in wacom_query_tablet_data()
417 if (features->type == HID_GENERIC) in wacom_query_tablet_data()
420 if (features->device_type & WACOM_DEVICETYPE_TOUCH) { in wacom_query_tablet_data()
421 if (features->type > TABLETPC) { in wacom_query_tablet_data()
425 else if (features->type == WACOM_24HDT) { in wacom_query_tablet_data()
428 else if (features->type == WACOM_27QHDT) { in wacom_query_tablet_data()
431 else if (features->type == BAMBOO_PAD) { in wacom_query_tablet_data()
434 } else if (features->device_type & WACOM_DEVICETYPE_PEN) { in wacom_query_tablet_data()
435 if (features->type <= BAMBOO_PT) { in wacom_query_tablet_data()
444 struct wacom_features *features) in wacom_retrieve_hid_descriptor() argument
450 features->x_fuzz = 4; in wacom_retrieve_hid_descriptor()
451 features->y_fuzz = 4; in wacom_retrieve_hid_descriptor()
452 features->pressure_fuzz = 0; in wacom_retrieve_hid_descriptor()
453 features->distance_fuzz = 0; in wacom_retrieve_hid_descriptor()
461 if (features->type == WIRELESS) { in wacom_retrieve_hid_descriptor()
463 features->device_type = WACOM_DEVICETYPE_WL_MONITOR; in wacom_retrieve_hid_descriptor()
465 features->device_type = WACOM_DEVICETYPE_NONE; in wacom_retrieve_hid_descriptor()
469 wacom_parse_hid(hdev, features); in wacom_retrieve_hid_descriptor()
486 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_are_sibling() local
487 int vid = features->oVid; in wacom_are_sibling()
488 int pid = features->oPid; in wacom_are_sibling()
546 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) in wacom_add_shared_data()
548 else if (wacom_wac->features.device_type & WACOM_DEVICETYPE_PEN) in wacom_add_shared_data()
602 if (wacom->wacom_wac.features.type >= INTUOS5S && in wacom_led_control()
603 wacom->wacom_wac.features.type <= INTUOSPL) { in wacom_led_control()
626 if (wacom->wacom_wac.features.type == WACOM_21UX2 || in wacom_led_control()
627 wacom->wacom_wac.features.type == WACOM_24HD) in wacom_led_control()
867 if (!(wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD)) in wacom_initialize_leds()
871 switch (wacom->wacom_wac.features.type) { in wacom_initialize_leds()
933 if (!(wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD)) in wacom_destroy_leds()
938 switch (wacom->wacom_wac.features.type) { in wacom_destroy_leds()
1044 if (wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) { in wacom_initialize_battery()
1120 wacom_bt_query_tablet_data(hdev, new_speed, &wacom->wacom_wac.features); in wacom_store_speed()
1281 if (wacom->wacom_wac.features.type != REMOTE) in wacom_initialize_remote()
1321 input_dev->name = wacom_wac->features.name; in wacom_allocate_input()
1470 static void wacom_set_default_phy(struct wacom_features *features) in wacom_set_default_phy() argument
1472 if (features->x_resolution) { in wacom_set_default_phy()
1473 features->x_phy = (features->x_max * 100) / in wacom_set_default_phy()
1474 features->x_resolution; in wacom_set_default_phy()
1475 features->y_phy = (features->y_max * 100) / in wacom_set_default_phy()
1476 features->y_resolution; in wacom_set_default_phy()
1480 static void wacom_calculate_res(struct wacom_features *features) in wacom_calculate_res() argument
1483 if (!features->unit) { in wacom_calculate_res()
1484 features->unit = 0x11; in wacom_calculate_res()
1485 features->unitExpo = -3; in wacom_calculate_res()
1488 features->x_resolution = wacom_calc_hid_res(features->x_max, in wacom_calculate_res()
1489 features->x_phy, in wacom_calculate_res()
1490 features->unit, in wacom_calculate_res()
1491 features->unitExpo); in wacom_calculate_res()
1492 features->y_resolution = wacom_calc_hid_res(features->y_max, in wacom_calculate_res()
1493 features->y_phy, in wacom_calculate_res()
1494 features->unit, in wacom_calculate_res()
1495 features->unitExpo); in wacom_calculate_res()
1549 wacom_wac1->features = in wacom_wireless_work()
1551 wacom_wac1->features.device_type |= WACOM_DEVICETYPE_PEN; in wacom_wireless_work()
1552 wacom_set_default_phy(&wacom_wac1->features); in wacom_wireless_work()
1553 wacom_calculate_res(&wacom_wac1->features); in wacom_wireless_work()
1555 wacom_wac1->features.name); in wacom_wireless_work()
1556 if (wacom_wac1->features.type < BAMBOO_PEN || in wacom_wireless_work()
1557 wacom_wac1->features.type > BAMBOO_PT) { in wacom_wireless_work()
1559 wacom_wac1->features.name); in wacom_wireless_work()
1560 wacom_wac1->features.device_type |= WACOM_DEVICETYPE_PAD; in wacom_wireless_work()
1562 wacom_wac1->shared->touch_max = wacom_wac1->features.touch_max; in wacom_wireless_work()
1563 wacom_wac1->shared->type = wacom_wac1->features.type; in wacom_wireless_work()
1571 if (wacom_wac1->features.touch_max || in wacom_wireless_work()
1572 (wacom_wac1->features.type >= INTUOSHT && in wacom_wireless_work()
1573 wacom_wac1->features.type <= BAMBOO_PT)) { in wacom_wireless_work()
1574 wacom_wac2->features = in wacom_wireless_work()
1576 wacom_wac2->features.pktlen = WACOM_PKGLEN_BBTOUCH3; in wacom_wireless_work()
1577 wacom_set_default_phy(&wacom_wac2->features); in wacom_wireless_work()
1578 wacom_wac2->features.x_max = wacom_wac2->features.y_max = 4096; in wacom_wireless_work()
1579 wacom_calculate_res(&wacom_wac2->features); in wacom_wireless_work()
1581 "%s (WL) Finger",wacom_wac2->features.name); in wacom_wireless_work()
1582 if (wacom_wac1->features.touch_max) in wacom_wireless_work()
1583 wacom_wac2->features.device_type |= WACOM_DEVICETYPE_TOUCH; in wacom_wireless_work()
1584 if (wacom_wac1->features.type >= INTUOSHT && in wacom_wireless_work()
1585 wacom_wac1->features.type <= BAMBOO_PT) { in wacom_wireless_work()
1587 "%s (WL) Pad",wacom_wac2->features.name); in wacom_wireless_work()
1588 wacom_wac2->features.device_type |= WACOM_DEVICETYPE_PAD; in wacom_wireless_work()
1596 if ((wacom_wac1->features.type == INTUOSHT || in wacom_wireless_work()
1597 wacom_wac1->features.type == INTUOSHT2) && in wacom_wireless_work()
1598 wacom_wac1->features.touch_max) in wacom_wireless_work()
1619 if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
1623 else if (!(wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
1649 struct wacom_features *features = &wacom_wac->features; in wacom_update_name() local
1653 if ((features->type == HID_GENERIC) && !strcmp("Wacom HID", features->name)) { in wacom_update_name()
1674 "%s %X", features->name, wacom->hdev->product); in wacom_update_name()
1677 strlcpy(name, features->name, sizeof(name)); in wacom_update_name()
1696 struct wacom_features *features; in wacom_probe() local
1723 wacom_wac->features = *((struct wacom_features *)id->driver_data); in wacom_probe()
1724 features = &wacom_wac->features; in wacom_probe()
1725 features->pktlen = wacom_compute_pktlen(hdev); in wacom_probe()
1726 if (features->pktlen > WACOM_PKGLEN_MAX) { in wacom_probe()
1731 if (features->check_for_hid_type && features->hid_type != hdev->type) { in wacom_probe()
1750 if (features->type == BAMBOO_PAD) { in wacom_probe()
1751 if (features->pktlen == WACOM_PKGLEN_PENABLED) { in wacom_probe()
1752 features->type = HID_GENERIC; in wacom_probe()
1753 } else if ((features->pktlen != WACOM_PKGLEN_BPAD_TOUCH) && in wacom_probe()
1754 (features->pktlen != WACOM_PKGLEN_BPAD_TOUCH_USB)) { in wacom_probe()
1761 wacom_set_default_phy(features); in wacom_probe()
1764 wacom_retrieve_hid_descriptor(hdev, features); in wacom_probe()
1767 if (features->device_type == WACOM_DEVICETYPE_NONE && in wacom_probe()
1768 features->type != WIRELESS) { in wacom_probe()
1769 error = features->type == HID_GENERIC ? -ENODEV : 0; in wacom_probe()
1778 features->device_type |= WACOM_DEVICETYPE_PEN; in wacom_probe()
1781 wacom_calculate_res(features); in wacom_probe()
1789 if (!(features->device_type & WACOM_DEVICETYPE_WL_MONITOR) && in wacom_probe()
1790 (features->quirks & WACOM_QUIRK_BATTERY)) { in wacom_probe()
1808 if (features->type == HID_GENERIC) in wacom_probe()
1819 wacom_query_tablet_data(hdev, features); in wacom_probe()
1822 if ((features->type == BAMBOO_TOUCH) && in wacom_probe()
1823 (features->device_type & WACOM_DEVICETYPE_PEN)) { in wacom_probe()
1829 if ((features->type == BAMBOO_PEN) && in wacom_probe()
1830 ((features->device_type & WACOM_DEVICETYPE_TOUCH) || in wacom_probe()
1831 (features->device_type & WACOM_DEVICETYPE_PAD))) { in wacom_probe()
1836 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) in wacom_probe()
1839 if ((wacom_wac->features.type == INTUOSHT || in wacom_probe()
1840 wacom_wac->features.type == INTUOSHT2) && in wacom_probe()
1841 (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH)) { in wacom_probe()
1887 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_resume() local
1892 wacom_query_tablet_data(hdev, features); in wacom_resume()