Lines Matching refs:wacom_wac
94 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_pen_serial_enforce() local
95 struct wacom_features *features = &wacom_wac->features; in wacom_wac_pen_serial_enforce()
100 if (wacom_wac->serial[0] || !(features->quirks & WACOM_QUIRK_TOOLSERIAL)) in wacom_wac_pen_serial_enforce()
131 wacom_wac->serial[0] = value; in wacom_wac_pen_serial_enforce()
135 wacom_wac->serial[0] |= ((__u64)value) << 32; in wacom_wac_pen_serial_enforce()
139 wacom_wac->id[0] = value; in wacom_wac_pen_serial_enforce()
150 wacom_wac_queue_flush(hdev, wacom_wac->pen_fifo); in wacom_wac_pen_serial_enforce()
152 wacom_wac_queue_insert(hdev, wacom_wac->pen_fifo, in wacom_wac_pen_serial_enforce()
163 if (wacom->wacom_wac.features.type == BOOTLOADER) in wacom_raw_event()
172 memcpy(wacom->wacom_wac.data, raw_data, size); in wacom_raw_event()
174 wacom_wac_irq(&wacom->wacom_wac, size); in wacom_raw_event()
218 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_hid_usage_quirk()
228 wacom->wacom_wac.mode_report = field->report->id; in wacom_hid_usage_quirk()
229 wacom->wacom_wac.mode_value = 2; in wacom_hid_usage_quirk()
301 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_feature_mapping()
302 struct hid_data *hid_data = &wacom->wacom_wac.hid_data; in wacom_feature_mapping()
355 wacom->wacom_wac.mode_report = field->report->id; in wacom_feature_mapping()
356 wacom->wacom_wac.mode_value = 0; in wacom_feature_mapping()
361 wacom->wacom_wac.mode_report = field->report->id; in wacom_feature_mapping()
362 wacom->wacom_wac.mode_value = 2; in wacom_feature_mapping()
370 wacom->wacom_wac.mode_report = field->report->id; in wacom_feature_mapping()
371 wacom->wacom_wac.mode_value = 0; in wacom_feature_mapping()
434 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_usage_mapping()
490 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_post_parse_hid() local
494 if (wacom_wac->has_mode_change) { in wacom_post_parse_hid()
495 if (wacom_wac->is_direct_mode) in wacom_post_parse_hid()
503 input_mt_init_slots(wacom_wac->touch_input, in wacom_post_parse_hid()
504 wacom_wac->features.touch_max, in wacom_post_parse_hid()
507 input_mt_init_slots(wacom_wac->touch_input, in wacom_post_parse_hid()
508 wacom_wac->features.touch_max, in wacom_post_parse_hid()
555 struct hid_data *hid_data = &wacom->wacom_wac.hid_data; in wacom_hid_set_device_mode()
572 struct wacom_wac *wacom_wac) in wacom_set_device_mode() argument
580 if (wacom_wac->mode_report < 0) in wacom_set_device_mode()
584 r = re->report_id_hash[wacom_wac->mode_report]; in wacom_set_device_mode()
595 rep_data[0] = wacom_wac->mode_report; in wacom_set_device_mode()
596 rep_data[1] = wacom_wac->mode_value; in wacom_set_device_mode()
604 rep_data[1] != wacom_wac->mode_report && in wacom_set_device_mode()
634 wacom->wacom_wac.bt_high_speed = speed; in wacom_bt_query_tablet_data()
648 wacom->wacom_wac.bt_features &= ~0x20; in wacom_bt_query_tablet_data()
650 wacom->wacom_wac.bt_features |= 0x20; in wacom_bt_query_tablet_data()
653 rep_data[1] = wacom->wacom_wac.bt_features; in wacom_bt_query_tablet_data()
658 wacom->wacom_wac.bt_high_speed = speed; in wacom_bt_query_tablet_data()
675 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in _wacom_query_tablet_data() local
676 struct wacom_features *features = &wacom_wac->features; in _wacom_query_tablet_data()
685 wacom_wac->mode_report = 3; in _wacom_query_tablet_data()
686 wacom_wac->mode_value = 4; in _wacom_query_tablet_data()
688 wacom_wac->mode_report = 18; in _wacom_query_tablet_data()
689 wacom_wac->mode_value = 2; in _wacom_query_tablet_data()
691 wacom_wac->mode_report = 131; in _wacom_query_tablet_data()
692 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()
699 wacom_wac->mode_report = 2; in _wacom_query_tablet_data()
700 wacom_wac->mode_value = 2; in _wacom_query_tablet_data()
705 wacom_set_device_mode(hdev, wacom_wac); in _wacom_query_tablet_data()
757 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_are_sibling()
759 struct wacom_features *sibling_features = &sibling_wacom->wacom_wac.features; in wacom_are_sibling()
858 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_remove_shared_data() local
860 if (wacom_wac->shared) { in wacom_remove_shared_data()
861 data = container_of(wacom_wac->shared, struct wacom_hdev_data, in wacom_remove_shared_data()
864 if (wacom_wac->shared->touch == wacom->hdev) in wacom_remove_shared_data()
865 wacom_wac->shared->touch = NULL; in wacom_remove_shared_data()
866 else if (wacom_wac->shared->pen == wacom->hdev) in wacom_remove_shared_data()
867 wacom_wac->shared->pen = NULL; in wacom_remove_shared_data()
870 wacom_wac->shared = NULL; in wacom_remove_shared_data()
877 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_add_shared_data() local
896 wacom_wac->shared = &data->shared; in wacom_add_shared_data()
905 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) in wacom_add_shared_data()
906 wacom_wac->shared->touch = hdev; in wacom_add_shared_data()
907 else if (wacom_wac->features.device_type & WACOM_DEVICETYPE_PEN) in wacom_add_shared_data()
908 wacom_wac->shared->pen = hdev; in wacom_add_shared_data()
925 if (wacom->wacom_wac.features.type == REMOTE) in wacom_led_control()
928 if (wacom->wacom_wac.pid) { /* wireless connected */ in wacom_led_control()
932 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) { in wacom_led_control()
940 if (wacom->wacom_wac.features.type == HID_GENERIC) { in wacom_led_control()
945 } else if ((wacom->wacom_wac.features.type >= INTUOS5S && in wacom_led_control()
946 wacom->wacom_wac.features.type <= INTUOSPL)) { in wacom_led_control()
958 if (wacom->wacom_wac.pid) { in wacom_led_control()
966 else if (wacom->wacom_wac.features.type == INTUOSP2_BT) { in wacom_led_control()
979 if (wacom->wacom_wac.features.type == WACOM_21UX2 || in wacom_led_control()
980 wacom->wacom_wac.features.type == WACOM_24HD) in wacom_led_control()
1285 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_devm_kfifo_alloc() local
1303 wacom_wac->pen_fifo = pen_fifo; in wacom_devm_kfifo_alloc()
1562 if (!wacom->wacom_wac.pad_input) in wacom_leds_alloc_and_register()
1565 dev = &wacom->wacom_wac.pad_input->dev; in wacom_leds_alloc_and_register()
1586 if (!(wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD)) in wacom_initialize_leds()
1590 switch (wacom->wacom_wac.features.type) { in wacom_initialize_leds()
1731 val->strval = battery->wacom->wacom_wac.name; in wacom_battery_get_property()
1809 if (wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) in wacom_initialize_battery()
1831 return snprintf(buf, PAGE_SIZE, "%i\n", wacom->wacom_wac.bt_high_speed); in wacom_show_speed()
1848 wacom_bt_query_tablet_data(hdev, new_speed, &wacom->wacom_wac.features); in wacom_store_speed()
1995 if (wacom->wacom_wac.features.type != REMOTE) in wacom_initialize_remotes()
2051 struct wacom_wac *wacom_wac = &(wacom->wacom_wac); in wacom_allocate_input() local
2057 input_dev->name = wacom_wac->features.name; in wacom_allocate_input()
2065 input_dev->id.product = wacom_wac->pid ? wacom_wac->pid : hdev->product; in wacom_allocate_input()
2074 struct wacom_wac *wacom_wac = &(wacom->wacom_wac); in wacom_allocate_inputs() local
2076 wacom_wac->pen_input = wacom_allocate_input(wacom); in wacom_allocate_inputs()
2077 wacom_wac->touch_input = wacom_allocate_input(wacom); in wacom_allocate_inputs()
2078 wacom_wac->pad_input = wacom_allocate_input(wacom); in wacom_allocate_inputs()
2079 if (!wacom_wac->pen_input || in wacom_allocate_inputs()
2080 !wacom_wac->touch_input || in wacom_allocate_inputs()
2081 !wacom_wac->pad_input) in wacom_allocate_inputs()
2084 wacom_wac->pen_input->name = wacom_wac->pen_name; in wacom_allocate_inputs()
2085 wacom_wac->touch_input->name = wacom_wac->touch_name; in wacom_allocate_inputs()
2086 wacom_wac->pad_input->name = wacom_wac->pad_name; in wacom_allocate_inputs()
2094 struct wacom_wac *wacom_wac = &(wacom->wacom_wac); in wacom_register_inputs() local
2097 pen_input_dev = wacom_wac->pen_input; in wacom_register_inputs()
2098 touch_input_dev = wacom_wac->touch_input; in wacom_register_inputs()
2099 pad_input_dev = wacom_wac->pad_input; in wacom_register_inputs()
2104 error = wacom_setup_pen_input_capabilities(pen_input_dev, wacom_wac); in wacom_register_inputs()
2108 wacom_wac->pen_input = NULL; in wacom_register_inputs()
2116 error = wacom_setup_touch_input_capabilities(touch_input_dev, wacom_wac); in wacom_register_inputs()
2120 wacom_wac->touch_input = NULL; in wacom_register_inputs()
2128 error = wacom_setup_pad_input_capabilities(pad_input_dev, wacom_wac); in wacom_register_inputs()
2132 wacom_wac->pad_input = NULL; in wacom_register_inputs()
2143 wacom_wac->pad_input = NULL; in wacom_register_inputs()
2144 wacom_wac->touch_input = NULL; in wacom_register_inputs()
2145 wacom_wac->pen_input = NULL; in wacom_register_inputs()
2186 if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
2190 else if (!(wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && in wacom_battery_work()
2215 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_update_name() local
2216 struct wacom_features *features = &wacom_wac->features; in wacom_update_name()
2256 snprintf(wacom_wac->name, sizeof(wacom_wac->name), "%s%s", in wacom_update_name()
2260 snprintf(wacom_wac->pen_name, sizeof(wacom_wac->pen_name), in wacom_update_name()
2262 snprintf(wacom_wac->touch_name, sizeof(wacom_wac->touch_name), in wacom_update_name()
2264 snprintf(wacom_wac->pad_name, sizeof(wacom_wac->pad_name), in wacom_update_name()
2279 wacom->wacom_wac.pen_input = NULL; in wacom_release_resources()
2280 wacom->wacom_wac.touch_input = NULL; in wacom_release_resources()
2281 wacom->wacom_wac.pad_input = NULL; in wacom_release_resources()
2284 static void wacom_set_shared_values(struct wacom_wac *wacom_wac) in wacom_set_shared_values() argument
2286 if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) { in wacom_set_shared_values()
2287 wacom_wac->shared->type = wacom_wac->features.type; in wacom_set_shared_values()
2288 wacom_wac->shared->touch_input = wacom_wac->touch_input; in wacom_set_shared_values()
2291 if (wacom_wac->has_mute_touch_switch) { in wacom_set_shared_values()
2292 wacom_wac->shared->has_mute_touch_switch = true; in wacom_set_shared_values()
2293 wacom_wac->shared->is_touch_on = true; in wacom_set_shared_values()
2296 if (wacom_wac->shared->has_mute_touch_switch && in wacom_set_shared_values()
2297 wacom_wac->shared->touch_input) { in wacom_set_shared_values()
2298 set_bit(EV_SW, wacom_wac->shared->touch_input->evbit); in wacom_set_shared_values()
2299 input_set_capability(wacom_wac->shared->touch_input, EV_SW, in wacom_set_shared_values()
2306 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_parse_and_register() local
2307 struct wacom_features *features = &wacom_wac->features; in wacom_parse_and_register()
2388 if (wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD) { in wacom_parse_and_register()
2425 wacom_set_shared_values(wacom_wac); in wacom_parse_and_register()
2441 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wireless_work() local
2444 struct wacom_wac *wacom_wac1, *wacom_wac2; in wacom_wireless_work()
2460 wacom_wac1 = &(wacom1->wacom_wac); in wacom_wireless_work()
2466 wacom_wac2 = &(wacom2->wacom_wac); in wacom_wireless_work()
2469 if (wacom_wac->pid == 0) { in wacom_wireless_work()
2475 wacom_wac->pid); in wacom_wireless_work()
2479 id->product == wacom_wac->pid) in wacom_wireless_work()
2493 wacom_wac1->pid = wacom_wac->pid; in wacom_wireless_work()
2505 wacom_wac2->pid = wacom_wac->pid; in wacom_wireless_work()
2512 strlcpy(wacom_wac->name, wacom_wac1->name, in wacom_wireless_work()
2513 sizeof(wacom_wac->name)); in wacom_wireless_work()
2590 remote->remotes[index].input->name = wacom->wacom_wac.pad_name; in wacom_remote_create_one()
2598 &wacom->wacom_wac); in wacom_remote_create_one()
2669 wacom_schedule_work(&wacom->wacom_wac, WACOM_WORKER_REMOTE); in wacom_remote_work()
2696 struct wacom_shared *shared = wacom->wacom_wac.shared; in wacom_mode_change_work()
2699 bool is_direct = wacom->wacom_wac.is_direct_mode; in wacom_mode_change_work()
2706 wacom1->wacom_wac.has_mode_change = true; in wacom_mode_change_work()
2707 wacom1->wacom_wac.is_direct_mode = is_direct; in wacom_mode_change_work()
2714 wacom2->wacom_wac.has_mode_change = true; in wacom_mode_change_work()
2715 wacom2->wacom_wac.is_direct_mode = is_direct; in wacom_mode_change_work()
2737 struct wacom_wac *wacom_wac; in wacom_probe() local
2756 wacom_wac = &wacom->wacom_wac; in wacom_probe()
2757 wacom_wac->features = *((struct wacom_features *)id->driver_data); in wacom_probe()
2758 features = &wacom_wac->features; in wacom_probe()
2767 wacom_wac->hid_data.inputmode = -1; in wacom_probe()
2768 wacom_wac->mode_report = -1; in wacom_probe()
2815 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_remove() local
2816 struct wacom_features *features = &wacom_wac->features; in wacom_remove()
2834 if (wacom->wacom_wac.features.type != REMOTE) in wacom_remove()