Lines Matching refs:features

95 	struct wacom_features *features = &wacom_wac->features;
100 if (wacom_wac->serial[0] || !(features->quirks & WACOM_QUIRK_TOOLSERIAL))
163 if (wacom->wacom_wac.features.type == BOOTLOADER)
218 struct wacom_features *features = &wacom->wacom_wac.features;
240 if (features->type == HID_GENERIC &&
276 features->quirks |= WACOM_QUIRK_AESPEN;
301 struct wacom_features *features = &wacom->wacom_wac.features;
316 if (!features->touch_max) {
325 if (ret == n && features->type == HID_GENERIC) {
328 } else if (ret == 2 && features->type != HID_GENERIC) {
329 features->touch_max = data[1];
331 features->touch_max = 16;
335 features->touch_max);
434 struct wacom_features *features = &wacom->wacom_wac.features;
445 features->device_type |= WACOM_DEVICETYPE_PEN;
447 features->device_type |= WACOM_DEVICETYPE_TOUCH;
455 features->x_max = field->logical_maximum;
457 features->x_phy = field->physical_maximum;
458 if ((features->type != BAMBOO_PT) &&
459 (features->type != BAMBOO_TOUCH)) {
460 features->unit = field->unit;
461 features->unitExpo = field->unit_exponent;
466 features->y_max = field->logical_maximum;
468 features->y_phy = field->physical_maximum;
469 if ((features->type != BAMBOO_PT) &&
470 (features->type != BAMBOO_TOUCH)) {
471 features->unit = field->unit;
472 features->unitExpo = field->unit_exponent;
478 features->pressure_max = field->logical_maximum;
482 if (features->type == HID_GENERIC)
487 struct wacom_features *features)
492 if (features->type == HID_GENERIC) {
496 features->device_type |= WACOM_DEVICETYPE_DIRECT;
498 features->device_type &= ~WACOM_DEVICETYPE_DIRECT;
501 if (features->touch_max > 1) {
502 if (features->device_type & WACOM_DEVICETYPE_DIRECT)
504 wacom_wac->features.touch_max,
508 wacom_wac->features.touch_max,
515 struct wacom_features *features)
521 /* check features first */
549 wacom_post_parse_hid(hdev, features);
613 struct wacom_features *features)
619 switch (features->type) {
676 struct wacom_features *features = &wacom_wac->features;
679 return wacom_bt_query_tablet_data(hdev, 1, features);
681 if (features->type != HID_GENERIC) {
682 if (features->device_type & WACOM_DEVICETYPE_TOUCH) {
683 if (features->type > TABLETPC) {
687 } else if (features->type == WACOM_24HDT) {
690 } else if (features->type == WACOM_27QHDT) {
693 } else if (features->type == BAMBOO_PAD) {
697 } else if (features->device_type & WACOM_DEVICETYPE_PEN) {
698 if (features->type <= BAMBOO_PT) {
707 if (features->type == HID_GENERIC)
714 struct wacom_features *features)
719 /* default features */
720 features->x_fuzz = 4;
721 features->y_fuzz = 4;
722 features->pressure_fuzz = 0;
723 features->distance_fuzz = 1;
724 features->tilt_fuzz = 1;
732 if (features->type == WIRELESS && intf) {
734 features->device_type = WACOM_DEVICETYPE_WL_MONITOR;
736 features->device_type = WACOM_DEVICETYPE_NONE;
740 wacom_parse_hid(hdev, features);
757 struct wacom_features *features = &wacom->wacom_wac.features;
759 struct wacom_features *sibling_features = &sibling_wacom->wacom_wac.features;
760 __u32 oVid = features->oVid ? features->oVid : hdev->vendor;
761 __u32 oPid = features->oPid ? features->oPid : hdev->product;
764 if (features->oVid != HID_ANY_ID && sibling->vendor != oVid)
766 if (features->oPid != HID_ANY_ID && sibling->product != oPid)
783 if (features->type != HID_GENERIC)
790 if ((features->device_type & WACOM_DEVICETYPE_DIRECT) &&
798 if (!(features->device_type & WACOM_DEVICETYPE_DIRECT) &&
803 if ((features->device_type & WACOM_DEVICETYPE_PEN) &&
808 if ((features->device_type & WACOM_DEVICETYPE_TOUCH) &&
905 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH)
907 else if (wacom_wac->features.device_type & WACOM_DEVICETYPE_PEN)
925 if (wacom->wacom_wac.features.type == REMOTE)
932 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) {
940 if (wacom->wacom_wac.features.type == HID_GENERIC) {
945 } else if ((wacom->wacom_wac.features.type >= INTUOS5S &&
946 wacom->wacom_wac.features.type <= INTUOSPL)) {
966 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) {
979 if (wacom->wacom_wac.features.type == WACOM_21UX2 ||
980 wacom->wacom_wac.features.type == WACOM_24HD)
1586 if (!(wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD))
1590 switch (wacom->wacom_wac.features.type) {
1809 if (wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY)
1848 wacom_bt_query_tablet_data(hdev, new_speed, &wacom->wacom_wac.features);
1995 if (wacom->wacom_wac.features.type != REMOTE)
2057 input_dev->name = wacom_wac->features.name;
2173 static void wacom_set_default_phy(struct wacom_features *features)
2175 if (features->x_resolution) {
2176 features->x_phy = (features->x_max * 100) /
2177 features->x_resolution;
2178 features->y_phy = (features->y_max * 100) /
2179 features->y_resolution;
2183 static void wacom_calculate_res(struct wacom_features *features)
2186 if (!features->unit) {
2187 features->unit = 0x11;
2188 features->unitExpo = -3;
2191 features->x_resolution = wacom_calc_hid_res(features->x_max,
2192 features->x_phy,
2193 features->unit,
2194 features->unitExpo);
2195 features->y_resolution = wacom_calc_hid_res(features->y_max,
2196 features->y_phy,
2197 features->unit,
2198 features->unitExpo);
2205 if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) &&
2209 else if (!(wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) &&
2235 struct wacom_features *features = &wacom_wac->features;
2239 if ((features->type == HID_GENERIC) && !strcmp("Wacom HID", features->name)) {
2250 features->name, wacom->hdev->product);
2272 strlcpy(name, features->name, sizeof(name));
2305 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) {
2306 wacom_wac->shared->type = wacom_wac->features.type;
2326 struct wacom_features *features = &wacom_wac->features;
2331 features->pktlen = wacom_compute_pktlen(hdev);
2332 if (features->pktlen > WACOM_PKGLEN_MAX)
2349 if (features->type == BAMBOO_PAD) {
2350 if (features->pktlen == WACOM_PKGLEN_PENABLED) {
2351 features->type = HID_GENERIC;
2352 } else if ((features->pktlen != WACOM_PKGLEN_BPAD_TOUCH) &&
2353 (features->pktlen != WACOM_PKGLEN_BPAD_TOUCH_USB)) {
2360 wacom_set_default_phy(features);
2363 wacom_retrieve_hid_descriptor(hdev, features);
2366 if (features->device_type == WACOM_DEVICETYPE_NONE &&
2367 features->type != WIRELESS) {
2368 error = features->type == HID_GENERIC ? -ENODEV : 0;
2377 features->device_type |= WACOM_DEVICETYPE_PEN;
2380 wacom_calculate_res(features);
2385 if ((features->type == BAMBOO_PEN) &&
2386 ((features->device_type & WACOM_DEVICETYPE_TOUCH) ||
2387 (features->device_type & WACOM_DEVICETYPE_PAD))) {
2396 if (!(features->device_type & WACOM_DEVICETYPE_WL_MONITOR) &&
2397 (features->quirks & WACOM_QUIRK_BATTERY)) {
2407 if (features->type == HID_GENERIC)
2421 if (wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD) {
2437 if ((features->type == BAMBOO_TOUCH) &&
2438 (features->device_type & WACOM_DEVICETYPE_PEN)) {
2445 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) {
2518 wacom_wac1->features =
2528 if (wacom_wac1->features.touch_max ||
2529 (wacom_wac1->features.type >= INTUOSHT &&
2530 wacom_wac1->features.type <= BAMBOO_PT)) {
2531 wacom_wac2->features =
2783 struct wacom_features *features;
2802 wacom_wac->features = *((struct wacom_features *)id->driver_data);
2803 features = &wacom_wac->features;
2805 if (features->check_for_hid_type && features->hid_type != hdev->type)
2838 if (features->type == BOOTLOADER) {
2862 struct wacom_features *features = &wacom_wac->features;
2864 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR)
2881 if (wacom->wacom_wac.features.type != REMOTE)