Lines Matching refs:wacom_wac

78 static void wacom_notify_battery(struct wacom_wac *wacom_wac,  in wacom_notify_battery()  argument
82 struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac); in wacom_notify_battery()
88 static int wacom_penpartner_irq(struct wacom_wac *wacom) in wacom_penpartner_irq()
132 static int wacom_pl_irq(struct wacom_wac *wacom) in wacom_pl_irq()
193 static int wacom_ptu_irq(struct wacom_wac *wacom) in wacom_ptu_irq()
222 static int wacom_dtu_irq(struct wacom_wac *wacom) in wacom_dtu_irq()
252 static int wacom_dtus_irq(struct wacom_wac *wacom) in wacom_dtus_irq()
303 static int wacom_graphire_irq(struct wacom_wac *wacom) in wacom_graphire_irq()
458 static void wacom_intuos_schedule_prox_event(struct wacom_wac *wacom_wac) in wacom_intuos_schedule_prox_event() argument
460 struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac); in wacom_intuos_schedule_prox_event()
461 struct wacom_features *features = &wacom_wac->features; in wacom_intuos_schedule_prox_event()
475 static int wacom_intuos_pad(struct wacom_wac *wacom) in wacom_intuos_pad()
739 static void wacom_exit_report(struct wacom_wac *wacom) in wacom_exit_report()
778 static int wacom_intuos_inout(struct wacom_wac *wacom) in wacom_intuos_inout()
837 static inline bool touch_is_muted(struct wacom_wac *wacom_wac) in touch_is_muted() argument
839 return wacom_wac->probe_complete && in touch_is_muted()
840 wacom_wac->shared->has_mute_touch_switch && in touch_is_muted()
841 !wacom_wac->shared->is_touch_on; in touch_is_muted()
844 static inline bool report_touch_events(struct wacom_wac *wacom) in report_touch_events()
849 static inline bool delay_pen_events(struct wacom_wac *wacom) in delay_pen_events()
854 static int wacom_intuos_general(struct wacom_wac *wacom) in wacom_intuos_general()
1027 static int wacom_intuos_irq(struct wacom_wac *wacom) in wacom_intuos_irq()
1064 static int wacom_remote_irq(struct wacom_wac *wacom_wac, size_t len) in wacom_remote_irq() argument
1066 unsigned char *data = wacom_wac->data; in wacom_remote_irq()
1068 struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac); in wacom_remote_irq()
1082 wacom_wac->id[0] = PAD_DEVICE_ID; in wacom_remote_irq()
1153 static void wacom_remote_status_irq(struct wacom_wac *wacom_wac, size_t len) in wacom_remote_status_irq() argument
1155 struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac); in wacom_remote_status_irq()
1156 unsigned char *data = wacom_wac->data; in wacom_remote_status_irq()
1187 wacom_schedule_work(wacom_wac, WACOM_WORKER_REMOTE); in wacom_remote_status_irq()
1198 static void wacom_intuos_bt_process_data(struct wacom_wac *wacom, in wacom_intuos_bt_process_data()
1209 static int wacom_intuos_bt_irq(struct wacom_wac *wacom, size_t len) in wacom_intuos_bt_irq()
1245 static int wacom_wac_finger_count_touches(struct wacom_wac *wacom) in wacom_wac_finger_count_touches()
1269 static void wacom_intuos_pro2_bt_pen(struct wacom_wac *wacom) in wacom_intuos_pro2_bt_pen()
1376 static void wacom_intuos_pro2_bt_touch(struct wacom_wac *wacom) in wacom_intuos_pro2_bt_touch()
1443 static void wacom_intuos_pro2_bt_pad(struct wacom_wac *wacom) in wacom_intuos_pro2_bt_pad()
1473 static void wacom_intuos_pro2_bt_battery(struct wacom_wac *wacom) in wacom_intuos_pro2_bt_battery()
1484 static void wacom_intuos_gen3_bt_pad(struct wacom_wac *wacom) in wacom_intuos_gen3_bt_pad()
1500 static void wacom_intuos_gen3_bt_battery(struct wacom_wac *wacom) in wacom_intuos_gen3_bt_battery()
1511 static int wacom_intuos_pro2_bt_irq(struct wacom_wac *wacom, size_t len) in wacom_intuos_pro2_bt_irq()
1534 static int wacom_24hdt_irq(struct wacom_wac *wacom) in wacom_24hdt_irq()
1605 static int wacom_mt_touch(struct wacom_wac *wacom) in wacom_mt_touch()
1656 static int wacom_tpc_mt_touch(struct wacom_wac *wacom) in wacom_tpc_mt_touch()
1684 static int wacom_tpc_single_touch(struct wacom_wac *wacom, size_t len) in wacom_tpc_single_touch()
1720 static int wacom_tpc_pen(struct wacom_wac *wacom) in wacom_tpc_pen()
1750 static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len) in wacom_tpc_irq()
1856 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_map_usage() local
1857 struct wacom_features *features = &wacom_wac->features; in wacom_map_usage()
1897 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_battery_usage_mapping() local
1898 struct wacom_features *features = &wacom_wac->features; in wacom_wac_battery_usage_mapping()
1914 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_battery_event() local
1920 wacom_wac->hid_data.bat_status = POWER_SUPPLY_STATUS_UNKNOWN; in wacom_wac_battery_event()
1924 wacom_wac->hid_data.battery_capacity = value; in wacom_wac_battery_event()
1925 wacom_wac->hid_data.bat_connected = 1; in wacom_wac_battery_event()
1926 wacom_wac->hid_data.bat_status = WACOM_POWER_SUPPLY_STATUS_AUTO; in wacom_wac_battery_event()
1931 wacom_wac->hid_data.battery_capacity = value; in wacom_wac_battery_event()
1932 wacom_wac->hid_data.bat_connected = 1; in wacom_wac_battery_event()
1933 wacom_wac->hid_data.bat_status = WACOM_POWER_SUPPLY_STATUS_AUTO; in wacom_wac_battery_event()
1936 wacom_wac->hid_data.bat_charging = value; in wacom_wac_battery_event()
1937 wacom_wac->hid_data.ps_connected = value; in wacom_wac_battery_event()
1938 wacom_wac->hid_data.bat_connected = 1; in wacom_wac_battery_event()
1939 wacom_wac->hid_data.bat_status = WACOM_POWER_SUPPLY_STATUS_AUTO; in wacom_wac_battery_event()
1954 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_battery_report() local
1955 struct wacom_features *features = &wacom_wac->features; in wacom_wac_battery_report()
1958 int status = wacom_wac->hid_data.bat_status; in wacom_wac_battery_report()
1959 int capacity = wacom_wac->hid_data.battery_capacity; in wacom_wac_battery_report()
1960 bool charging = wacom_wac->hid_data.bat_charging; in wacom_wac_battery_report()
1961 bool connected = wacom_wac->hid_data.bat_connected; in wacom_wac_battery_report()
1962 bool powered = wacom_wac->hid_data.ps_connected; in wacom_wac_battery_report()
1964 wacom_notify_battery(wacom_wac, status, capacity, charging, in wacom_wac_battery_report()
1973 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_pad_usage_mapping() local
1974 struct wacom_features *features = &wacom_wac->features; in wacom_wac_pad_usage_mapping()
1975 struct input_dev *input = wacom_wac->pad_input; in wacom_wac_pad_usage_mapping()
2008 wacom_wac->is_soft_touch_switch = true; in wacom_wac_pad_usage_mapping()
2019 wacom_wac->has_mute_touch_switch = true; in wacom_wac_pad_usage_mapping()
2059 if (!wacom_wac->has_mode_change) { in wacom_wac_pad_usage_mapping()
2060 wacom_wac->has_mode_change = true; in wacom_wac_pad_usage_mapping()
2061 wacom_wac->is_direct_mode = true; in wacom_wac_pad_usage_mapping()
2082 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_pad_event() local
2083 struct input_dev *input = wacom_wac->pad_input; in wacom_wac_pad_event()
2084 struct wacom_features *features = &wacom_wac->features; in wacom_wac_pad_event()
2098 wacom_wac->hid_data.inrange_state |= value; in wacom_wac_pad_event()
2107 if (wacom_wac->shared->touch_input) { in wacom_wac_pad_event()
2108 bool *is_touch_on = &wacom_wac->shared->is_touch_on; in wacom_wac_pad_event()
2115 input_report_switch(wacom_wac->shared->touch_input, in wacom_wac_pad_event()
2117 input_sync(wacom_wac->shared->touch_input); in wacom_wac_pad_event()
2161 if (wacom_wac->is_direct_mode != value) { in wacom_wac_pad_event()
2162 wacom_wac->is_direct_mode = value; in wacom_wac_pad_event()
2163 wacom_schedule_work(&wacom->wacom_wac, WACOM_WORKER_MODE_CHANGE); in wacom_wac_pad_event()
2180 wacom_wac->hid_data.pad_input_event_flag = true; in wacom_wac_pad_event()
2188 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_pad_pre_report() local
2190 wacom_wac->hid_data.inrange_state = 0; in wacom_wac_pad_pre_report()
2197 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_pad_report() local
2198 struct input_dev *input = wacom_wac->pad_input; in wacom_wac_pad_report()
2199 bool active = wacom_wac->hid_data.inrange_state != 0; in wacom_wac_pad_report()
2202 if (wacom_wac->hid_data.pad_input_event_flag) { in wacom_wac_pad_report()
2206 wacom_wac->hid_data.pad_input_event_flag = false; in wacom_wac_pad_report()
2210 static void wacom_set_barrel_switch3_usage(struct wacom_wac *wacom_wac) in wacom_set_barrel_switch3_usage() argument
2212 struct input_dev *input = wacom_wac->pen_input; in wacom_set_barrel_switch3_usage()
2213 struct wacom_features *features = &wacom_wac->features; in wacom_set_barrel_switch3_usage()
2216 wacom_wac->hid_data.barrelswitch && in wacom_set_barrel_switch3_usage()
2217 wacom_wac->hid_data.barrelswitch2 && in wacom_set_barrel_switch3_usage()
2218 wacom_wac->hid_data.serialhi && in wacom_set_barrel_switch3_usage()
2219 !wacom_wac->hid_data.barrelswitch3) { in wacom_set_barrel_switch3_usage()
2229 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_pen_usage_mapping() local
2230 struct wacom_features *features = &wacom_wac->features; in wacom_wac_pen_usage_mapping()
2231 struct input_dev *input = wacom_wac->pen_input; in wacom_wac_pen_usage_mapping()
2273 wacom_wac->hid_data.barrelswitch = true; in wacom_wac_pen_usage_mapping()
2274 wacom_set_barrel_switch3_usage(wacom_wac); in wacom_wac_pen_usage_mapping()
2278 wacom_wac->hid_data.barrelswitch2 = true; in wacom_wac_pen_usage_mapping()
2279 wacom_set_barrel_switch3_usage(wacom_wac); in wacom_wac_pen_usage_mapping()
2294 wacom_wac->hid_data.serialhi = true; in wacom_wac_pen_usage_mapping()
2295 wacom_set_barrel_switch3_usage(wacom_wac); in wacom_wac_pen_usage_mapping()
2303 wacom_wac->hid_data.barrelswitch3 = true; in wacom_wac_pen_usage_mapping()
2314 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_pen_event() local
2315 struct wacom_features *features = &wacom_wac->features; in wacom_wac_pen_event()
2316 struct input_dev *input = wacom_wac->pen_input; in wacom_wac_pen_event()
2319 if (wacom_wac->is_invalid_bt_frame) in wacom_wac_pen_event()
2332 wacom_wac->hid_data.inrange_state = value; in wacom_wac_pen_event()
2334 wacom_wac->hid_data.sense_state = value; in wacom_wac_pen_event()
2337 wacom_wac->hid_data.invert_state = value; in wacom_wac_pen_event()
2341 wacom_wac->hid_data.tipswitch |= value; in wacom_wac_pen_event()
2344 wacom_wac->hid_data.barrelswitch = value; in wacom_wac_pen_event()
2347 wacom_wac->hid_data.barrelswitch2 = value; in wacom_wac_pen_event()
2351 wacom_wac->serial[0] = (wacom_wac->serial[0] & ~0xFFFFFFFFULL); in wacom_wac_pen_event()
2352 wacom_wac->serial[0] |= wacom_s32tou(value, field->report_size); in wacom_wac_pen_event()
2357 if (!wacom_is_art_pen(wacom_wac->id[0])) return; in wacom_wac_pen_event()
2367 wacom_wac->hid_data.sense_state = value; in wacom_wac_pen_event()
2373 wacom_wac->serial[0] = (wacom_wac->serial[0] & 0xFFFFFFFF); in wacom_wac_pen_event()
2374 wacom_wac->serial[0] |= ((__u64)raw_value) << 32; in wacom_wac_pen_event()
2381 wacom_wac->id[0] |= raw_value & 0xFFFFF; in wacom_wac_pen_event()
2393 wacom_wac->id[0] |= wacom_s32tou(value, field->report_size); in wacom_wac_pen_event()
2424 wacom_wac->is_invalid_bt_frame = !value; in wacom_wac_pen_event()
2427 wacom_wac->hid_data.barrelswitch3 = value; in wacom_wac_pen_event()
2430 if (wacom_wac->hid_data.sequence_number != value) in wacom_wac_pen_event()
2431 …hid_warn(hdev, "Dropped %hu packets", (unsigned short)(value - wacom_wac->hid_data.sequence_number… in wacom_wac_pen_event()
2432 wacom_wac->hid_data.sequence_number = value + 1; in wacom_wac_pen_event()
2439 if (!usage->type || delay_pen_events(wacom_wac)) in wacom_wac_pen_event()
2443 if (wacom_wac->hid_data.inrange_state) in wacom_wac_pen_event()
2445 else if (wacom_wac->shared->stylus_in_proximity && !wacom_wac->hid_data.sense_state) in wacom_wac_pen_event()
2453 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_pen_pre_report() local
2455 wacom_wac->is_invalid_bt_frame = false; in wacom_wac_pen_pre_report()
2463 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_pen_report() local
2464 struct input_dev *input = wacom_wac->pen_input; in wacom_wac_pen_report()
2465 bool range = wacom_wac->hid_data.inrange_state; in wacom_wac_pen_report()
2466 bool sense = wacom_wac->hid_data.sense_state; in wacom_wac_pen_report()
2468 if (wacom_wac->is_invalid_bt_frame) in wacom_wac_pen_report()
2471 if (!wacom_wac->tool[0] && range) { /* first in range */ in wacom_wac_pen_report()
2473 if (wacom_wac->hid_data.invert_state) in wacom_wac_pen_report()
2474 wacom_wac->tool[0] = BTN_TOOL_RUBBER; in wacom_wac_pen_report()
2475 else if (wacom_wac->id[0]) in wacom_wac_pen_report()
2476 wacom_wac->tool[0] = wacom_intuos_get_tool_type(wacom_wac->id[0]); in wacom_wac_pen_report()
2478 wacom_wac->tool[0] = BTN_TOOL_PEN; in wacom_wac_pen_report()
2482 wacom_wac->shared->stylus_in_proximity = sense; in wacom_wac_pen_report()
2484 if (!delay_pen_events(wacom_wac) && wacom_wac->tool[0]) { in wacom_wac_pen_report()
2485 int id = wacom_wac->id[0]; in wacom_wac_pen_report()
2486 if (wacom_wac->features.quirks & WACOM_QUIRK_PEN_BUTTON3 && in wacom_wac_pen_report()
2487 wacom_wac->hid_data.barrelswitch & wacom_wac->hid_data.barrelswitch2) { in wacom_wac_pen_report()
2488 wacom_wac->hid_data.barrelswitch = 0; in wacom_wac_pen_report()
2489 wacom_wac->hid_data.barrelswitch2 = 0; in wacom_wac_pen_report()
2490 wacom_wac->hid_data.barrelswitch3 = 1; in wacom_wac_pen_report()
2492 input_report_key(input, BTN_STYLUS, wacom_wac->hid_data.barrelswitch); in wacom_wac_pen_report()
2493 input_report_key(input, BTN_STYLUS2, wacom_wac->hid_data.barrelswitch2); in wacom_wac_pen_report()
2494 input_report_key(input, BTN_STYLUS3, wacom_wac->hid_data.barrelswitch3); in wacom_wac_pen_report()
2500 if (wacom_wac->serial[0] >> 52 == 1) in wacom_wac_pen_report()
2509 wacom_wac->hid_data.tipswitch); in wacom_wac_pen_report()
2510 input_report_key(input, wacom_wac->tool[0], sense); in wacom_wac_pen_report()
2511 if (wacom_wac->serial[0]) { in wacom_wac_pen_report()
2512 input_event(input, EV_MSC, MSC_SERIAL, wacom_wac->serial[0]); in wacom_wac_pen_report()
2516 wacom_wac->hid_data.tipswitch = false; in wacom_wac_pen_report()
2522 wacom_wac->tool[0] = 0; in wacom_wac_pen_report()
2523 wacom_wac->id[0] = 0; in wacom_wac_pen_report()
2524 wacom_wac->serial[0] = 0; in wacom_wac_pen_report()
2532 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_finger_usage_mapping() local
2533 struct input_dev *input = wacom_wac->touch_input; in wacom_wac_finger_usage_mapping()
2534 unsigned touch_max = wacom_wac->features.touch_max; in wacom_wac_finger_usage_mapping()
2562 wacom_wac->hid_data.cc_report = field->report->id; in wacom_wac_finger_usage_mapping()
2563 wacom_wac->hid_data.cc_index = field->index; in wacom_wac_finger_usage_mapping()
2564 wacom_wac->hid_data.cc_value_index = usage->usage_index; in wacom_wac_finger_usage_mapping()
2582 static void wacom_wac_finger_slot(struct wacom_wac *wacom_wac, in wacom_wac_finger_slot() argument
2585 struct hid_data *hid_data = &wacom_wac->hid_data; in wacom_wac_finger_slot()
2586 bool mt = wacom_wac->features.touch_max > 1; in wacom_wac_finger_slot()
2588 report_touch_events(wacom_wac); in wacom_wac_finger_slot()
2590 if (touch_is_muted(wacom_wac)) { in wacom_wac_finger_slot()
2591 if (!wacom_wac->shared->touch_down) in wacom_wac_finger_slot()
2596 wacom_wac->hid_data.num_received++; in wacom_wac_finger_slot()
2597 if (wacom_wac->hid_data.num_received > wacom_wac->hid_data.num_expected) in wacom_wac_finger_slot()
2660 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_finger_event() local
2662 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_wac_finger_event()
2664 if (touch_is_muted(wacom_wac) && !wacom_wac->shared->touch_down) in wacom_wac_finger_event()
2667 if (wacom_wac->is_invalid_bt_frame) in wacom_wac_finger_event()
2672 wacom_wac->hid_data.confidence = value; in wacom_wac_finger_event()
2675 wacom_wac->hid_data.x = value; in wacom_wac_finger_event()
2678 wacom_wac->hid_data.y = value; in wacom_wac_finger_event()
2681 wacom_wac->hid_data.width = value; in wacom_wac_finger_event()
2684 wacom_wac->hid_data.height = value; in wacom_wac_finger_event()
2687 wacom_wac->hid_data.id = value; in wacom_wac_finger_event()
2690 wacom_wac->hid_data.tipswitch = value; in wacom_wac_finger_event()
2693 wacom_wac->is_invalid_bt_frame = !value; in wacom_wac_finger_event()
2706 if (equivalent_usage == wacom_wac->hid_data.last_slot_field) { in wacom_wac_finger_event()
2707 bool touch_removed = wacom_wac_slot_is_active(wacom_wac->touch_input, in wacom_wac_finger_event()
2708 wacom_wac->hid_data.id) && !wacom_wac->hid_data.tipswitch; in wacom_wac_finger_event()
2710 if (wacom_wac->hid_data.confidence || touch_removed) { in wacom_wac_finger_event()
2711 wacom_wac_finger_slot(wacom_wac, wacom_wac->touch_input); in wacom_wac_finger_event()
2721 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_finger_pre_report() local
2722 struct hid_data* hid_data = &wacom_wac->hid_data; in wacom_wac_finger_pre_report()
2725 if (touch_is_muted(wacom_wac) && !wacom_wac->shared->touch_down) in wacom_wac_finger_pre_report()
2728 wacom_wac->is_invalid_bt_frame = false; in wacom_wac_finger_pre_report()
2775 hid_data->num_expected = wacom_wac->features.touch_max; in wacom_wac_finger_pre_report()
2784 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_finger_report() local
2785 struct input_dev *input = wacom_wac->touch_input; in wacom_wac_finger_report()
2786 unsigned touch_max = wacom_wac->features.touch_max; in wacom_wac_finger_report()
2789 if (wacom_wac->hid_data.num_expected == 0) in wacom_wac_finger_report()
2796 if (wacom_wac->hid_data.num_received < wacom_wac->hid_data.num_expected) in wacom_wac_finger_report()
2803 wacom_wac->hid_data.num_received = 0; in wacom_wac_finger_report()
2804 wacom_wac->hid_data.num_expected = 0; in wacom_wac_finger_report()
2807 wacom_wac->shared->touch_down = wacom_wac_finger_count_touches(wacom_wac); in wacom_wac_finger_report()
2814 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_usage_mapping() local
2815 struct wacom_features *features = &wacom_wac->features; in wacom_wac_usage_mapping()
2836 if (wacom->wacom_wac.features.type != HID_GENERIC) in wacom_wac_event()
2847 else if (WACOM_PEN_FIELD(field) && wacom->wacom_wac.pen_input) in wacom_wac_event()
2849 else if (WACOM_FINGER_FIELD(field) && wacom->wacom_wac.touch_input) in wacom_wac_event()
2899 else if (WACOM_PEN_FIELD(field) && wacom->wacom_wac.pen_input) in wacom_wac_collection()
2901 else if (WACOM_FINGER_FIELD(field) && wacom->wacom_wac.touch_input) in wacom_wac_collection()
2910 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_report() local
2917 if (wacom_wac->features.type != HID_GENERIC) in wacom_wac_report()
2935 if (pad_in_hid_field && wacom->wacom_wac.pad_input) in wacom_wac_report()
2937 if (pen_in_hid_field && wacom->wacom_wac.pen_input) in wacom_wac_report()
2939 if (finger_in_hid_field && wacom->wacom_wac.touch_input) in wacom_wac_report()
2955 if (true_pad && wacom->wacom_wac.pad_input) in wacom_wac_report()
2959 static int wacom_bpt_touch(struct wacom_wac *wacom) in wacom_bpt_touch()
3000 static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data) in wacom_bpt3_touch_msg()
3043 static void wacom_bpt3_button_msg(struct wacom_wac *wacom, unsigned char *data) in wacom_bpt3_button_msg()
3059 static int wacom_bpt3_touch(struct wacom_wac *wacom) in wacom_bpt3_touch()
3090 static int wacom_bpt_pen(struct wacom_wac *wacom) in wacom_bpt_pen()
3165 static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len) in wacom_bpt_irq()
3182 static void wacom_bamboo_pad_pen_event(struct wacom_wac *wacom, in wacom_bamboo_pad_pen_event()
3208 static int wacom_bamboo_pad_touch_event(struct wacom_wac *wacom, in wacom_bamboo_pad_touch_event()
3248 static int wacom_bamboo_pad_irq(struct wacom_wac *wacom, size_t len) in wacom_bamboo_pad_irq()
3266 static int wacom_wireless_irq(struct wacom_wac *wacom, size_t len) in wacom_wireless_irq()
3308 static int wacom_status_irq(struct wacom_wac *wacom_wac, size_t len) in wacom_status_irq() argument
3310 struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac); in wacom_status_irq()
3311 struct wacom_features *features = &wacom_wac->features; in wacom_status_irq()
3312 unsigned char *data = wacom_wac->data; in wacom_status_irq()
3319 wacom_wac->shared->touch_input && in wacom_status_irq()
3321 input_report_switch(wacom_wac->shared->touch_input, in wacom_status_irq()
3323 input_sync(wacom_wac->shared->touch_input); in wacom_status_irq()
3330 wacom_notify_battery(wacom_wac, WACOM_POWER_SUPPLY_STATUS_AUTO, in wacom_status_irq()
3336 wacom_schedule_work(wacom_wac, WACOM_WORKER_BATTERY); in wacom_status_irq()
3342 wacom_schedule_work(wacom_wac, WACOM_WORKER_BATTERY); in wacom_status_irq()
3343 wacom_notify_battery(wacom_wac, POWER_SUPPLY_STATUS_UNKNOWN, 0, 0, 0, 0); in wacom_status_irq()
3348 void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len) in wacom_wac_irq() argument
3352 switch (wacom_wac->features.type) { in wacom_wac_irq()
3354 sync = wacom_penpartner_irq(wacom_wac); in wacom_wac_irq()
3358 sync = wacom_pl_irq(wacom_wac); in wacom_wac_irq()
3365 sync = wacom_graphire_irq(wacom_wac); in wacom_wac_irq()
3369 sync = wacom_ptu_irq(wacom_wac); in wacom_wac_irq()
3373 sync = wacom_dtu_irq(wacom_wac); in wacom_wac_irq()
3378 sync = wacom_dtus_irq(wacom_wac); in wacom_wac_irq()
3398 sync = wacom_intuos_irq(wacom_wac); in wacom_wac_irq()
3402 sync = wacom_intuos_bt_irq(wacom_wac, len); in wacom_wac_irq()
3407 sync = wacom_24hdt_irq(wacom_wac); in wacom_wac_irq()
3417 sync = wacom_bpt3_touch(wacom_wac); in wacom_wac_irq()
3418 else if (wacom_wac->data[0] == WACOM_REPORT_USB) in wacom_wac_irq()
3419 sync = wacom_status_irq(wacom_wac, len); in wacom_wac_irq()
3421 sync = wacom_intuos_irq(wacom_wac); in wacom_wac_irq()
3427 sync = wacom_intuos_pro2_bt_irq(wacom_wac, len); in wacom_wac_irq()
3436 sync = wacom_tpc_irq(wacom_wac, len); in wacom_wac_irq()
3444 if (wacom_wac->data[0] == WACOM_REPORT_USB) in wacom_wac_irq()
3445 sync = wacom_status_irq(wacom_wac, len); in wacom_wac_irq()
3447 sync = wacom_bpt_irq(wacom_wac, len); in wacom_wac_irq()
3451 sync = wacom_bamboo_pad_irq(wacom_wac, len); in wacom_wac_irq()
3455 sync = wacom_wireless_irq(wacom_wac, len); in wacom_wac_irq()
3460 if (wacom_wac->data[0] == WACOM_REPORT_DEVICE_LIST) in wacom_wac_irq()
3461 wacom_remote_status_irq(wacom_wac, len); in wacom_wac_irq()
3463 sync = wacom_remote_irq(wacom_wac, len); in wacom_wac_irq()
3472 if (wacom_wac->pen_input) in wacom_wac_irq()
3473 input_sync(wacom_wac->pen_input); in wacom_wac_irq()
3474 if (wacom_wac->touch_input) in wacom_wac_irq()
3475 input_sync(wacom_wac->touch_input); in wacom_wac_irq()
3476 if (wacom_wac->pad_input) in wacom_wac_irq()
3477 input_sync(wacom_wac->pad_input); in wacom_wac_irq()
3481 static void wacom_setup_basic_pro_pen(struct wacom_wac *wacom_wac) in wacom_setup_basic_pro_pen() argument
3483 struct input_dev *input_dev = wacom_wac->pen_input; in wacom_setup_basic_pro_pen()
3492 0, wacom_wac->features.distance_max, wacom_wac->features.distance_fuzz, 0); in wacom_setup_basic_pro_pen()
3495 static void wacom_setup_cintiq(struct wacom_wac *wacom_wac) in wacom_setup_cintiq() argument
3497 struct input_dev *input_dev = wacom_wac->pen_input; in wacom_setup_cintiq()
3498 struct wacom_features *features = &wacom_wac->features; in wacom_setup_cintiq()
3500 wacom_setup_basic_pro_pen(wacom_wac); in wacom_setup_cintiq()
3514 static void wacom_setup_intuos(struct wacom_wac *wacom_wac) in wacom_setup_intuos() argument
3516 struct input_dev *input_dev = wacom_wac->pen_input; in wacom_setup_intuos()
3520 wacom_setup_cintiq(wacom_wac); in wacom_setup_intuos()
3537 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_setup_device_quirks() local
3538 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_setup_device_quirks()
3674 __clear_bit(BTN_TOOL_BRUSH, wacom_wac->pen_input->keybit); in wacom_setup_device_quirks()
3675 __clear_bit(BTN_TOOL_PENCIL, wacom_wac->pen_input->keybit); in wacom_setup_device_quirks()
3676 __clear_bit(BTN_TOOL_AIRBRUSH, wacom_wac->pen_input->keybit); in wacom_setup_device_quirks()
3677 __clear_bit(ABS_Z, wacom_wac->pen_input->absbit); in wacom_setup_device_quirks()
3678 __clear_bit(ABS_DISTANCE, wacom_wac->pen_input->absbit); in wacom_setup_device_quirks()
3679 __clear_bit(ABS_TILT_X, wacom_wac->pen_input->absbit); in wacom_setup_device_quirks()
3680 __clear_bit(ABS_TILT_Y, wacom_wac->pen_input->absbit); in wacom_setup_device_quirks()
3681 __clear_bit(ABS_WHEEL, wacom_wac->pen_input->absbit); in wacom_setup_device_quirks()
3682 __clear_bit(ABS_MISC, wacom_wac->pen_input->absbit); in wacom_setup_device_quirks()
3683 __clear_bit(MSC_SERIAL, wacom_wac->pen_input->mscbit); in wacom_setup_device_quirks()
3684 __clear_bit(EV_MSC, wacom_wac->pen_input->evbit); in wacom_setup_device_quirks()
3689 struct wacom_wac *wacom_wac) in wacom_setup_pen_input_capabilities() argument
3691 struct wacom_features *features = &wacom_wac->features; in wacom_setup_pen_input_capabilities()
3760 wacom_setup_cintiq(wacom_wac); in wacom_setup_pen_input_capabilities()
3775 wacom_setup_intuos(wacom_wac); in wacom_setup_pen_input_capabilities()
3793 wacom_setup_intuos(wacom_wac); in wacom_setup_pen_input_capabilities()
3834 wacom_setup_basic_pro_pen(wacom_wac); in wacom_setup_pen_input_capabilities()
3854 struct wacom_wac *wacom_wac) in wacom_setup_touch_input_capabilities() argument
3856 struct wacom_features *features = &wacom_wac->features; in wacom_setup_touch_input_capabilities()
3900 if (wacom_wac->shared->touch->product == 0x361) { in wacom_setup_touch_input_capabilities()
3906 else if (wacom_wac->shared->touch->product == 0x360) { in wacom_setup_touch_input_capabilities()
3912 else if (wacom_wac->shared->touch->product == 0x393) { in wacom_setup_touch_input_capabilities()
3942 if (wacom_wac->shared->touch->product == 0x32C || in wacom_setup_touch_input_capabilities()
3943 wacom_wac->shared->touch->product == 0xF6) { in wacom_setup_touch_input_capabilities()
3946 wacom_wac->has_mute_touch_switch = true; in wacom_setup_touch_input_capabilities()
3947 wacom_wac->is_soft_touch_switch = true; in wacom_setup_touch_input_capabilities()
4056 if (wacom->wacom_wac.features.type == WACOM_21UX2) in wacom_is_led_toggled()
4061 if (wacom->wacom_wac.features.type == INTUOSP2_BT) in wacom_is_led_toggled()
4074 if (wacom->wacom_wac.features.type == WACOM_24HD) in wacom_update_led()
4127 struct wacom_wac *wacom_wac) in wacom_setup_pad_input_capabilities() argument
4129 struct wacom_features *features = &wacom_wac->features; in wacom_setup_pad_input_capabilities()
4137 if (features->type == REMOTE && input_dev == wacom_wac->pad_input) in wacom_setup_pad_input_capabilities()