Lines Matching refs:features
105 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_feature_mapping() local
113 if (!features->touch_max) { in wacom_feature_mapping()
122 features->touch_max = data[1]; in wacom_feature_mapping()
175 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_usage_mapping() local
191 if (features->type != BAMBOO_PT) { in wacom_usage_mapping()
193 if (finger && !features->touch_max) in wacom_usage_mapping()
194 features->touch_max = 1; in wacom_usage_mapping()
199 features->x_max = field->logical_maximum; in wacom_usage_mapping()
201 features->device_type = BTN_TOOL_FINGER; in wacom_usage_mapping()
202 features->x_phy = field->physical_maximum; in wacom_usage_mapping()
203 if (features->type != BAMBOO_PT) { in wacom_usage_mapping()
204 features->unit = field->unit; in wacom_usage_mapping()
205 features->unitExpo = field->unit_exponent; in wacom_usage_mapping()
208 features->device_type = BTN_TOOL_PEN; in wacom_usage_mapping()
212 features->y_max = field->logical_maximum; in wacom_usage_mapping()
214 features->y_phy = field->physical_maximum; in wacom_usage_mapping()
215 if (features->type != BAMBOO_PT) { in wacom_usage_mapping()
216 features->unit = field->unit; in wacom_usage_mapping()
217 features->unitExpo = field->unit_exponent; in wacom_usage_mapping()
223 features->pressure_max = field->logical_maximum; in wacom_usage_mapping()
227 if (features->type == HID_GENERIC) in wacom_usage_mapping()
232 struct wacom_features *features) in wacom_post_parse_hid() argument
237 if (features->type == HID_GENERIC) { in wacom_post_parse_hid()
239 if (features->touch_max > 1) { in wacom_post_parse_hid()
240 input_mt_init_slots(wacom_wac->input, wacom_wac->features.touch_max, in wacom_post_parse_hid()
247 struct wacom_features *features) in wacom_parse_hid() argument
281 wacom_post_parse_hid(hdev, features); in wacom_parse_hid()
330 struct wacom_features *features) in wacom_bt_query_tablet_data() argument
336 switch (features->type) { in wacom_bt_query_tablet_data()
390 struct wacom_features *features) in wacom_query_tablet_data() argument
393 return wacom_bt_query_tablet_data(hdev, 1, features); in wacom_query_tablet_data()
395 if (features->type == HID_GENERIC) in wacom_query_tablet_data()
398 if (features->device_type == BTN_TOOL_FINGER) { in wacom_query_tablet_data()
399 if (features->type > TABLETPC) { in wacom_query_tablet_data()
403 else if (features->type == WACOM_24HDT || features->type == CINTIQ_HYBRID) { in wacom_query_tablet_data()
406 else if (features->type == WACOM_27QHDT) { in wacom_query_tablet_data()
409 else if (features->type == BAMBOO_PAD) { in wacom_query_tablet_data()
412 } else if (features->device_type == BTN_TOOL_PEN) { in wacom_query_tablet_data()
413 if (features->type <= BAMBOO_PT && features->type != WIRELESS) { in wacom_query_tablet_data()
422 struct wacom_features *features) in wacom_retrieve_hid_descriptor() argument
428 features->device_type = BTN_TOOL_PEN; in wacom_retrieve_hid_descriptor()
429 features->x_fuzz = 4; in wacom_retrieve_hid_descriptor()
430 features->y_fuzz = 4; in wacom_retrieve_hid_descriptor()
431 features->pressure_fuzz = 0; in wacom_retrieve_hid_descriptor()
432 features->distance_fuzz = 0; in wacom_retrieve_hid_descriptor()
440 if (features->type == WIRELESS) { in wacom_retrieve_hid_descriptor()
442 features->device_type = 0; in wacom_retrieve_hid_descriptor()
444 features->device_type = BTN_TOOL_FINGER; in wacom_retrieve_hid_descriptor()
445 features->pktlen = WACOM_PKGLEN_BBTOUCH3; in wacom_retrieve_hid_descriptor()
450 if (features->type < BAMBOO_PT) in wacom_retrieve_hid_descriptor()
453 wacom_parse_hid(hdev, features); in wacom_retrieve_hid_descriptor()
470 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_are_sibling() local
471 int vid = features->oVid; in wacom_are_sibling()
472 int pid = features->oPid; in wacom_are_sibling()
530 if (wacom_wac->features.device_type == BTN_TOOL_FINGER) in wacom_add_shared_data()
532 else if (wacom_wac->features.device_type == BTN_TOOL_PEN) in wacom_add_shared_data()
586 if (wacom->wacom_wac.features.type >= INTUOS5S && in wacom_led_control()
587 wacom->wacom_wac.features.type <= INTUOSPL) { in wacom_led_control()
610 if (wacom->wacom_wac.features.type == WACOM_21UX2 || in wacom_led_control()
611 wacom->wacom_wac.features.type == WACOM_24HD) in wacom_led_control()
852 switch (wacom->wacom_wac.features.type) { in wacom_initialize_leds()
884 if (wacom->wacom_wac.features.device_type == BTN_TOOL_PEN) { in wacom_initialize_leds()
919 switch (wacom->wacom_wac.features.type) { in wacom_destroy_leds()
940 if (wacom->wacom_wac.features.device_type == BTN_TOOL_PEN) in wacom_destroy_leds()
1026 if (wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) { in wacom_initialize_battery()
1102 wacom_bt_query_tablet_data(hdev, new_speed, &wacom->wacom_wac.features); in wacom_store_speed()
1286 wacom_wac1->features = in wacom_wireless_work()
1288 wacom_wac1->features.device_type = BTN_TOOL_PEN; in wacom_wireless_work()
1290 wacom_wac1->features.name); in wacom_wireless_work()
1292 wacom_wac1->features.name); in wacom_wireless_work()
1293 wacom_wac1->shared->touch_max = wacom_wac1->features.touch_max; in wacom_wireless_work()
1294 wacom_wac1->shared->type = wacom_wac1->features.type; in wacom_wireless_work()
1302 if (wacom_wac1->features.touch_max || in wacom_wireless_work()
1303 wacom_wac1->features.type == INTUOSHT) { in wacom_wireless_work()
1304 wacom_wac2->features = in wacom_wireless_work()
1306 wacom_wac2->features.pktlen = WACOM_PKGLEN_BBTOUCH3; in wacom_wireless_work()
1307 wacom_wac2->features.device_type = BTN_TOOL_FINGER; in wacom_wireless_work()
1308 wacom_wac2->features.x_max = wacom_wac2->features.y_max = 4096; in wacom_wireless_work()
1309 if (wacom_wac2->features.touch_max) in wacom_wireless_work()
1311 "%s (WL) Finger",wacom_wac2->features.name); in wacom_wireless_work()
1314 "%s (WL) Pad",wacom_wac2->features.name); in wacom_wireless_work()
1316 "%s (WL) Pad", wacom_wac2->features.name); in wacom_wireless_work()
1323 if (wacom_wac1->features.type == INTUOSHT && in wacom_wireless_work()
1324 wacom_wac1->features.touch_max) in wacom_wireless_work()
1345 if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
1349 else if (!(wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
1360 static void wacom_set_default_phy(struct wacom_features *features) in wacom_set_default_phy() argument
1362 if (features->x_resolution) { in wacom_set_default_phy()
1363 features->x_phy = (features->x_max * 100) / in wacom_set_default_phy()
1364 features->x_resolution; in wacom_set_default_phy()
1365 features->y_phy = (features->y_max * 100) / in wacom_set_default_phy()
1366 features->y_resolution; in wacom_set_default_phy()
1370 static void wacom_calculate_res(struct wacom_features *features) in wacom_calculate_res() argument
1372 features->x_resolution = wacom_calc_hid_res(features->x_max, in wacom_calculate_res()
1373 features->x_phy, in wacom_calculate_res()
1374 features->unit, in wacom_calculate_res()
1375 features->unitExpo); in wacom_calculate_res()
1376 features->y_resolution = wacom_calc_hid_res(features->y_max, in wacom_calculate_res()
1377 features->y_phy, in wacom_calculate_res()
1378 features->unit, in wacom_calculate_res()
1379 features->unitExpo); in wacom_calculate_res()
1406 struct wacom_features *features; in wacom_probe() local
1433 wacom_wac->features = *((struct wacom_features *)id->driver_data); in wacom_probe()
1434 features = &wacom_wac->features; in wacom_probe()
1435 features->pktlen = wacom_compute_pktlen(hdev); in wacom_probe()
1436 if (features->pktlen > WACOM_PKGLEN_MAX) { in wacom_probe()
1441 if (features->check_for_hid_type && features->hid_type != hdev->type) { in wacom_probe()
1451 if (!(features->quirks & WACOM_QUIRK_NO_INPUT)) { in wacom_probe()
1462 if (features->type == BAMBOO_PAD) { in wacom_probe()
1463 if (features->pktlen == WACOM_PKGLEN_PENABLED) { in wacom_probe()
1464 features->type = HID_GENERIC; in wacom_probe()
1465 } else if ((features->pktlen != WACOM_PKGLEN_BPAD_TOUCH) && in wacom_probe()
1466 (features->pktlen != WACOM_PKGLEN_BPAD_TOUCH_USB)) { in wacom_probe()
1473 wacom_set_default_phy(features); in wacom_probe()
1476 wacom_retrieve_hid_descriptor(hdev, features); in wacom_probe()
1483 if (features->type >= INTUOS5S && features->type <= INTUOSHT) { in wacom_probe()
1484 if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) { in wacom_probe()
1485 features->device_type = BTN_TOOL_FINGER; in wacom_probe()
1487 features->x_max = 4096; in wacom_probe()
1488 features->y_max = 4096; in wacom_probe()
1490 features->device_type = BTN_TOOL_PEN; in wacom_probe()
1497 if ((features->type == BAMBOO_PT) && in wacom_probe()
1498 (features->pktlen == WACOM_PKGLEN_BBTOUCH3) && in wacom_probe()
1499 (features->device_type == BTN_TOOL_PEN)) { in wacom_probe()
1500 features->device_type = BTN_TOOL_FINGER; in wacom_probe()
1502 features->x_max = 4096; in wacom_probe()
1503 features->y_max = 4096; in wacom_probe()
1509 if (features->type == BAMBOO_PAD) in wacom_probe()
1510 features->device_type = BTN_TOOL_FINGER; in wacom_probe()
1513 features->quirks |= WACOM_QUIRK_BATTERY; in wacom_probe()
1515 wacom_setup_device_quirks(features); in wacom_probe()
1518 if (!features->unit) { in wacom_probe()
1519 features->unit = 0x11; in wacom_probe()
1520 features->unitExpo = -3; in wacom_probe()
1522 wacom_calculate_res(features); in wacom_probe()
1524 strlcpy(wacom_wac->name, features->name, sizeof(wacom_wac->name)); in wacom_probe()
1526 "%s Pad", features->name); in wacom_probe()
1529 if (features->device_type != BTN_TOOL_FINGER) in wacom_probe()
1531 else if (features->touch_max) in wacom_probe()
1540 if (!(features->quirks & WACOM_QUIRK_MONITOR) && in wacom_probe()
1541 (features->quirks & WACOM_QUIRK_BATTERY)) { in wacom_probe()
1547 if (!(features->quirks & WACOM_QUIRK_NO_INPUT)) { in wacom_probe()
1561 if (features->type == HID_GENERIC) in wacom_probe()
1572 wacom_query_tablet_data(hdev, features); in wacom_probe()
1574 if (features->quirks & WACOM_QUIRK_MONITOR) in wacom_probe()
1577 if (wacom_wac->features.type == INTUOSHT && wacom_wac->features.touch_max) { in wacom_probe()
1578 if (wacom_wac->features.device_type == BTN_TOOL_FINGER) in wacom_probe()
1624 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_resume() local
1629 wacom_query_tablet_data(hdev, features); in wacom_resume()