Lines Matching refs:wacom_wac

89 	struct wacom_wac *wacom_wac = &wacom->wacom_wac;  in wacom_wac_pen_serial_enforce()  local
90 struct wacom_features *features = &wacom_wac->features; in wacom_wac_pen_serial_enforce()
95 if (wacom_wac->serial[0] || !(features->quirks & WACOM_QUIRK_TOOLSERIAL)) in wacom_wac_pen_serial_enforce()
126 wacom_wac->serial[0] = value; in wacom_wac_pen_serial_enforce()
130 wacom_wac->serial[0] |= ((__u64)value) << 32; in wacom_wac_pen_serial_enforce()
134 wacom_wac->id[0] = value; in wacom_wac_pen_serial_enforce()
145 wacom_wac_queue_flush(hdev, wacom_wac->pen_fifo); in wacom_wac_pen_serial_enforce()
147 wacom_wac_queue_insert(hdev, wacom_wac->pen_fifo, in wacom_wac_pen_serial_enforce()
158 if (wacom->wacom_wac.features.type == BOOTLOADER) in wacom_raw_event()
167 memcpy(wacom->wacom_wac.data, raw_data, size); in wacom_raw_event()
169 wacom_wac_irq(&wacom->wacom_wac, size); in wacom_raw_event()
213 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_hid_usage_quirk()
223 wacom->wacom_wac.mode_report = field->report->id; in wacom_hid_usage_quirk()
224 wacom->wacom_wac.mode_value = 2; in wacom_hid_usage_quirk()
296 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_feature_mapping()
297 struct hid_data *hid_data = &wacom->wacom_wac.hid_data; in wacom_feature_mapping()
350 wacom->wacom_wac.mode_report = field->report->id; in wacom_feature_mapping()
351 wacom->wacom_wac.mode_value = 0; in wacom_feature_mapping()
356 wacom->wacom_wac.mode_report = field->report->id; in wacom_feature_mapping()
357 wacom->wacom_wac.mode_value = 2; in wacom_feature_mapping()
365 wacom->wacom_wac.mode_report = field->report->id; in wacom_feature_mapping()
366 wacom->wacom_wac.mode_value = 0; in wacom_feature_mapping()
429 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_usage_mapping()
485 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_post_parse_hid() local
489 if (wacom_wac->has_mode_change) { in wacom_post_parse_hid()
490 if (wacom_wac->is_direct_mode) in wacom_post_parse_hid()
498 input_mt_init_slots(wacom_wac->touch_input, in wacom_post_parse_hid()
499 wacom_wac->features.touch_max, in wacom_post_parse_hid()
502 input_mt_init_slots(wacom_wac->touch_input, in wacom_post_parse_hid()
503 wacom_wac->features.touch_max, in wacom_post_parse_hid()
550 struct hid_data *hid_data = &wacom->wacom_wac.hid_data; in wacom_hid_set_device_mode()
567 struct wacom_wac *wacom_wac) in wacom_set_device_mode() argument
575 if (wacom_wac->mode_report < 0) in wacom_set_device_mode()
579 r = re->report_id_hash[wacom_wac->mode_report]; in wacom_set_device_mode()
590 rep_data[0] = wacom_wac->mode_report; in wacom_set_device_mode()
591 rep_data[1] = wacom_wac->mode_value; in wacom_set_device_mode()
599 rep_data[1] != wacom_wac->mode_report && in wacom_set_device_mode()
629 wacom->wacom_wac.bt_high_speed = speed; in wacom_bt_query_tablet_data()
643 wacom->wacom_wac.bt_features &= ~0x20; in wacom_bt_query_tablet_data()
645 wacom->wacom_wac.bt_features |= 0x20; in wacom_bt_query_tablet_data()
648 rep_data[1] = wacom->wacom_wac.bt_features; in wacom_bt_query_tablet_data()
653 wacom->wacom_wac.bt_high_speed = speed; in wacom_bt_query_tablet_data()
670 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in _wacom_query_tablet_data() local
671 struct wacom_features *features = &wacom_wac->features; in _wacom_query_tablet_data()
680 wacom_wac->mode_report = 3; in _wacom_query_tablet_data()
681 wacom_wac->mode_value = 4; in _wacom_query_tablet_data()
683 wacom_wac->mode_report = 18; in _wacom_query_tablet_data()
684 wacom_wac->mode_value = 2; in _wacom_query_tablet_data()
686 wacom_wac->mode_report = 131; in _wacom_query_tablet_data()
687 wacom_wac->mode_value = 2; in _wacom_query_tablet_data()
689 wacom_wac->mode_report = 2; in _wacom_query_tablet_data()
690 wacom_wac->mode_value = 2; in _wacom_query_tablet_data()
694 wacom_wac->mode_report = 2; in _wacom_query_tablet_data()
695 wacom_wac->mode_value = 2; in _wacom_query_tablet_data()
700 wacom_set_device_mode(hdev, wacom_wac); in _wacom_query_tablet_data()
752 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_are_sibling()
754 struct wacom_features *sibling_features = &sibling_wacom->wacom_wac.features; in wacom_are_sibling()
853 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_remove_shared_data() local
855 if (wacom_wac->shared) { in wacom_remove_shared_data()
856 data = container_of(wacom_wac->shared, struct wacom_hdev_data, in wacom_remove_shared_data()
859 if (wacom_wac->shared->touch == wacom->hdev) in wacom_remove_shared_data()
860 wacom_wac->shared->touch = NULL; in wacom_remove_shared_data()
861 else if (wacom_wac->shared->pen == wacom->hdev) in wacom_remove_shared_data()
862 wacom_wac->shared->pen = NULL; in wacom_remove_shared_data()
865 wacom_wac->shared = NULL; in wacom_remove_shared_data()
872 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_add_shared_data() local
893 wacom_wac->shared = &data->shared; in wacom_add_shared_data()
899 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) in wacom_add_shared_data()
900 wacom_wac->shared->touch = hdev; in wacom_add_shared_data()
901 else if (wacom_wac->features.device_type & WACOM_DEVICETYPE_PEN) in wacom_add_shared_data()
902 wacom_wac->shared->pen = hdev; in wacom_add_shared_data()
917 if (wacom->wacom_wac.features.type == REMOTE) in wacom_led_control()
920 if (wacom->wacom_wac.pid) { /* wireless connected */ in wacom_led_control()
924 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) { in wacom_led_control()
932 if (wacom->wacom_wac.features.type == HID_GENERIC) { in wacom_led_control()
937 } else if ((wacom->wacom_wac.features.type >= INTUOS5S && in wacom_led_control()
938 wacom->wacom_wac.features.type <= INTUOSPL)) { in wacom_led_control()
950 if (wacom->wacom_wac.pid) { in wacom_led_control()
958 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) { in wacom_led_control()
971 if (wacom->wacom_wac.features.type == WACOM_21UX2 || in wacom_led_control()
972 wacom->wacom_wac.features.type == WACOM_24HD) in wacom_led_control()
1277 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_devm_kfifo_alloc() local
1295 wacom_wac->pen_fifo = pen_fifo; in wacom_devm_kfifo_alloc()
1554 if (!wacom->wacom_wac.pad_input) in wacom_leds_alloc_and_register()
1557 dev = &wacom->wacom_wac.pad_input->dev; in wacom_leds_alloc_and_register()
1578 if (!(wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD)) in wacom_initialize_leds()
1582 switch (wacom->wacom_wac.features.type) { in wacom_initialize_leds()
1723 val->strval = battery->wacom->wacom_wac.name; in wacom_battery_get_property()
1801 if (wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) in wacom_initialize_battery()
1830 return sysfs_emit(buf, "%i\n", wacom->wacom_wac.bt_high_speed); in wacom_show_speed()
1847 wacom_bt_query_tablet_data(hdev, new_speed, &wacom->wacom_wac.features); in wacom_store_speed()
1994 if (wacom->wacom_wac.features.type != REMOTE) in wacom_initialize_remotes()
2050 struct wacom_wac *wacom_wac = &(wacom->wacom_wac); in wacom_allocate_input() local
2056 input_dev->name = wacom_wac->features.name; in wacom_allocate_input()
2064 input_dev->id.product = wacom_wac->pid ? wacom_wac->pid : hdev->product; in wacom_allocate_input()
2073 struct wacom_wac *wacom_wac = &(wacom->wacom_wac); in wacom_allocate_inputs() local
2075 wacom_wac->pen_input = wacom_allocate_input(wacom); in wacom_allocate_inputs()
2076 wacom_wac->touch_input = wacom_allocate_input(wacom); in wacom_allocate_inputs()
2077 wacom_wac->pad_input = wacom_allocate_input(wacom); in wacom_allocate_inputs()
2078 if (!wacom_wac->pen_input || in wacom_allocate_inputs()
2079 !wacom_wac->touch_input || in wacom_allocate_inputs()
2080 !wacom_wac->pad_input) in wacom_allocate_inputs()
2083 wacom_wac->pen_input->name = wacom_wac->pen_name; in wacom_allocate_inputs()
2084 wacom_wac->touch_input->name = wacom_wac->touch_name; in wacom_allocate_inputs()
2085 wacom_wac->pad_input->name = wacom_wac->pad_name; in wacom_allocate_inputs()
2093 struct wacom_wac *wacom_wac = &(wacom->wacom_wac); in wacom_setup_inputs() local
2096 pen_input_dev = wacom_wac->pen_input; in wacom_setup_inputs()
2097 touch_input_dev = wacom_wac->touch_input; in wacom_setup_inputs()
2098 pad_input_dev = wacom_wac->pad_input; in wacom_setup_inputs()
2103 error = wacom_setup_pen_input_capabilities(pen_input_dev, wacom_wac); in wacom_setup_inputs()
2107 wacom_wac->pen_input = NULL; in wacom_setup_inputs()
2111 error = wacom_setup_touch_input_capabilities(touch_input_dev, wacom_wac); in wacom_setup_inputs()
2115 wacom_wac->touch_input = NULL; in wacom_setup_inputs()
2119 error = wacom_setup_pad_input_capabilities(pad_input_dev, wacom_wac); in wacom_setup_inputs()
2123 wacom_wac->pad_input = NULL; in wacom_setup_inputs()
2133 struct wacom_wac *wacom_wac = &(wacom->wacom_wac); in wacom_register_inputs() local
2136 pen_input_dev = wacom_wac->pen_input; in wacom_register_inputs()
2137 touch_input_dev = wacom_wac->touch_input; in wacom_register_inputs()
2138 pad_input_dev = wacom_wac->pad_input; in wacom_register_inputs()
2161 wacom_wac->pad_input = NULL; in wacom_register_inputs()
2162 wacom_wac->touch_input = NULL; in wacom_register_inputs()
2163 wacom_wac->pen_input = NULL; in wacom_register_inputs()
2204 if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
2208 else if (!(wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
2233 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_update_name() local
2234 struct wacom_features *features = &wacom_wac->features; in wacom_update_name()
2278 snprintf(wacom_wac->name, sizeof(wacom_wac->name), "%s%s", in wacom_update_name()
2282 snprintf(wacom_wac->pen_name, sizeof(wacom_wac->pen_name), in wacom_update_name()
2284 snprintf(wacom_wac->touch_name, sizeof(wacom_wac->touch_name), in wacom_update_name()
2286 snprintf(wacom_wac->pad_name, sizeof(wacom_wac->pad_name), in wacom_update_name()
2301 wacom->wacom_wac.pen_input = NULL; in wacom_release_resources()
2302 wacom->wacom_wac.touch_input = NULL; in wacom_release_resources()
2303 wacom->wacom_wac.pad_input = NULL; in wacom_release_resources()
2306 static void wacom_set_shared_values(struct wacom_wac *wacom_wac) in wacom_set_shared_values() argument
2308 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) { in wacom_set_shared_values()
2309 wacom_wac->shared->type = wacom_wac->features.type; in wacom_set_shared_values()
2310 wacom_wac->shared->touch_input = wacom_wac->touch_input; in wacom_set_shared_values()
2313 if (wacom_wac->has_mute_touch_switch) { in wacom_set_shared_values()
2314 wacom_wac->shared->has_mute_touch_switch = true; in wacom_set_shared_values()
2320 if (wacom_wac->is_soft_touch_switch) in wacom_set_shared_values()
2321 wacom_wac->shared->is_touch_on = true; in wacom_set_shared_values()
2324 if (wacom_wac->shared->has_mute_touch_switch && in wacom_set_shared_values()
2325 wacom_wac->shared->touch_input) { in wacom_set_shared_values()
2326 set_bit(EV_SW, wacom_wac->shared->touch_input->evbit); in wacom_set_shared_values()
2327 input_set_capability(wacom_wac->shared->touch_input, EV_SW, in wacom_set_shared_values()
2334 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_parse_and_register() local
2335 struct wacom_features *features = &wacom_wac->features; in wacom_parse_and_register()
2423 if (wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD) { in wacom_parse_and_register()
2455 wacom_set_shared_values(wacom_wac); in wacom_parse_and_register()
2471 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wireless_work() local
2474 struct wacom_wac *wacom_wac1, *wacom_wac2; in wacom_wireless_work()
2490 wacom_wac1 = &(wacom1->wacom_wac); in wacom_wireless_work()
2496 wacom_wac2 = &(wacom2->wacom_wac); in wacom_wireless_work()
2499 if (wacom_wac->pid == 0) { in wacom_wireless_work()
2505 wacom_wac->pid); in wacom_wireless_work()
2509 id->product == wacom_wac->pid) in wacom_wireless_work()
2523 wacom_wac1->pid = wacom_wac->pid; in wacom_wireless_work()
2535 wacom_wac2->pid = wacom_wac->pid; in wacom_wireless_work()
2542 if (strscpy(wacom_wac->name, wacom_wac1->name, in wacom_wireless_work()
2543 sizeof(wacom_wac->name)) < 0) { in wacom_wireless_work()
2628 remote->remotes[index].input->name = wacom->wacom_wac.pad_name; in wacom_remote_create_one()
2636 &wacom->wacom_wac); in wacom_remote_create_one()
2712 wacom_schedule_work(&wacom->wacom_wac, WACOM_WORKER_REMOTE); in wacom_remote_work()
2743 struct wacom_shared *shared = wacom->wacom_wac.shared; in wacom_mode_change_work()
2746 bool is_direct = wacom->wacom_wac.is_direct_mode; in wacom_mode_change_work()
2753 wacom1->wacom_wac.has_mode_change = true; in wacom_mode_change_work()
2754 wacom1->wacom_wac.is_direct_mode = is_direct; in wacom_mode_change_work()
2761 wacom2->wacom_wac.has_mode_change = true; in wacom_mode_change_work()
2762 wacom2->wacom_wac.is_direct_mode = is_direct; in wacom_mode_change_work()
2784 struct wacom_wac *wacom_wac; in wacom_probe() local
2803 wacom_wac = &wacom->wacom_wac; in wacom_probe()
2804 wacom_wac->features = *((struct wacom_features *)id->driver_data); in wacom_probe()
2805 features = &wacom_wac->features; in wacom_probe()
2814 wacom_wac->hid_data.inputmode = -1; in wacom_probe()
2815 wacom_wac->mode_report = -1; in wacom_probe()
2858 wacom_wac->probe_complete = true; in wacom_probe()
2865 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_remove() local
2866 struct wacom_features *features = &wacom_wac->features; in wacom_remove()
2885 if (wacom->wacom_wac.features.type != REMOTE) in wacom_remove()