Lines Matching refs:wacom_wac
75 static void wacom_notify_battery(struct wacom_wac *wacom_wac, in wacom_notify_battery() argument
79 struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac); in wacom_notify_battery()
85 static int wacom_penpartner_irq(struct wacom_wac *wacom) in wacom_penpartner_irq()
129 static int wacom_pl_irq(struct wacom_wac *wacom) in wacom_pl_irq()
190 static int wacom_ptu_irq(struct wacom_wac *wacom) in wacom_ptu_irq()
219 static int wacom_dtu_irq(struct wacom_wac *wacom) in wacom_dtu_irq()
249 static int wacom_dtus_irq(struct wacom_wac *wacom) in wacom_dtus_irq()
300 static int wacom_graphire_irq(struct wacom_wac *wacom) in wacom_graphire_irq()
454 static void wacom_intuos_schedule_prox_event(struct wacom_wac *wacom_wac) in wacom_intuos_schedule_prox_event() argument
456 struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac); in wacom_intuos_schedule_prox_event()
457 struct wacom_features *features = &wacom_wac->features; in wacom_intuos_schedule_prox_event()
471 static int wacom_intuos_pad(struct wacom_wac *wacom) in wacom_intuos_pad()
678 static int wacom_intuos_inout(struct wacom_wac *wacom) in wacom_intuos_inout()
766 static int wacom_remote_irq(struct wacom_wac *wacom_wac, size_t len) in wacom_remote_irq() argument
768 unsigned char *data = wacom_wac->data; in wacom_remote_irq()
770 struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac); in wacom_remote_irq()
784 wacom_wac->id[0] = PAD_DEVICE_ID; in wacom_remote_irq()
854 static void wacom_remote_status_irq(struct wacom_wac *wacom_wac, size_t len) in wacom_remote_status_irq() argument
856 struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac); in wacom_remote_status_irq()
857 unsigned char *data = wacom_wac->data; in wacom_remote_status_irq()
888 wacom_schedule_work(wacom_wac, WACOM_WORKER_REMOTE); in wacom_remote_status_irq()
891 static inline bool report_touch_events(struct wacom_wac *wacom) in report_touch_events()
896 static inline bool delay_pen_events(struct wacom_wac *wacom) in delay_pen_events()
901 static int wacom_intuos_general(struct wacom_wac *wacom) in wacom_intuos_general()
1071 static int wacom_intuos_irq(struct wacom_wac *wacom) in wacom_intuos_irq()
1116 static void wacom_intuos_bt_process_data(struct wacom_wac *wacom, in wacom_intuos_bt_process_data()
1127 static int wacom_intuos_bt_irq(struct wacom_wac *wacom, size_t len) in wacom_intuos_bt_irq()
1162 static int wacom_wac_finger_count_touches(struct wacom_wac *wacom) in wacom_wac_finger_count_touches()
1186 static int wacom_24hdt_irq(struct wacom_wac *wacom) in wacom_24hdt_irq()
1254 static int wacom_mt_touch(struct wacom_wac *wacom) in wacom_mt_touch()
1305 static int wacom_tpc_mt_touch(struct wacom_wac *wacom) in wacom_tpc_mt_touch()
1333 static int wacom_tpc_single_touch(struct wacom_wac *wacom, size_t len) in wacom_tpc_single_touch()
1369 static int wacom_tpc_pen(struct wacom_wac *wacom) in wacom_tpc_pen()
1399 static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len) in wacom_tpc_irq()
1471 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_pen_usage_mapping() local
1472 struct input_dev *input = wacom_wac->pen_input; in wacom_wac_pen_usage_mapping()
1511 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_pen_event() local
1512 struct input_dev *input = wacom_wac->pen_input; in wacom_wac_pen_event()
1517 wacom_wac->hid_data.inrange_state = value; in wacom_wac_pen_event()
1520 wacom_wac->hid_data.invert_state = value; in wacom_wac_pen_event()
1524 wacom_wac->hid_data.tipswitch |= value; in wacom_wac_pen_event()
1531 if (!usage->type || delay_pen_events(wacom_wac)) in wacom_wac_pen_event()
1549 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_pen_report() local
1550 struct input_dev *input = wacom_wac->pen_input; in wacom_wac_pen_report()
1551 bool prox = wacom_wac->hid_data.inrange_state; in wacom_wac_pen_report()
1553 if (!wacom_wac->shared->stylus_in_proximity) /* first in prox */ in wacom_wac_pen_report()
1555 wacom_wac->tool[0] = wacom_wac->hid_data.invert_state ? in wacom_wac_pen_report()
1559 wacom_wac->shared->stylus_in_proximity = prox; in wacom_wac_pen_report()
1561 if (!delay_pen_events(wacom_wac)) { in wacom_wac_pen_report()
1563 wacom_wac->hid_data.tipswitch); in wacom_wac_pen_report()
1564 input_report_key(input, wacom_wac->tool[0], prox); in wacom_wac_pen_report()
1566 wacom_wac->hid_data.tipswitch = false; in wacom_wac_pen_report()
1576 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_finger_usage_mapping() local
1577 struct input_dev *input = wacom_wac->touch_input; in wacom_wac_finger_usage_mapping()
1578 unsigned touch_max = wacom_wac->features.touch_max; in wacom_wac_finger_usage_mapping()
1605 wacom_wac->hid_data.cc_report = field->report->id; in wacom_wac_finger_usage_mapping()
1606 wacom_wac->hid_data.cc_index = field->index; in wacom_wac_finger_usage_mapping()
1607 wacom_wac->hid_data.cc_value_index = usage->usage_index; in wacom_wac_finger_usage_mapping()
1612 static void wacom_wac_finger_slot(struct wacom_wac *wacom_wac, in wacom_wac_finger_slot() argument
1615 struct hid_data *hid_data = &wacom_wac->hid_data; in wacom_wac_finger_slot()
1616 bool mt = wacom_wac->features.touch_max > 1; in wacom_wac_finger_slot()
1618 report_touch_events(wacom_wac); in wacom_wac_finger_slot()
1620 wacom_wac->hid_data.num_received++; in wacom_wac_finger_slot()
1621 if (wacom_wac->hid_data.num_received > wacom_wac->hid_data.num_expected) in wacom_wac_finger_slot()
1654 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_finger_event() local
1658 wacom_wac->hid_data.x = value; in wacom_wac_finger_event()
1661 wacom_wac->hid_data.y = value; in wacom_wac_finger_event()
1664 wacom_wac->hid_data.width = value; in wacom_wac_finger_event()
1667 wacom_wac->hid_data.height = value; in wacom_wac_finger_event()
1670 wacom_wac->hid_data.id = value; in wacom_wac_finger_event()
1673 wacom_wac->hid_data.tipswitch = value; in wacom_wac_finger_event()
1679 if (usage->hid == wacom_wac->hid_data.last_slot_field) in wacom_wac_finger_event()
1680 wacom_wac_finger_slot(wacom_wac, wacom_wac->touch_input); in wacom_wac_finger_event()
1690 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_finger_pre_report() local
1691 struct hid_data* hid_data = &wacom_wac->hid_data; in wacom_wac_finger_pre_report()
1729 hid_data->num_expected = wacom_wac->features.touch_max; in wacom_wac_finger_pre_report()
1737 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_finger_report() local
1738 struct input_dev *input = wacom_wac->touch_input; in wacom_wac_finger_report()
1739 unsigned touch_max = wacom_wac->features.touch_max; in wacom_wac_finger_report()
1745 if (wacom_wac->hid_data.num_received < wacom_wac->hid_data.num_expected) in wacom_wac_finger_report()
1752 wacom_wac->hid_data.num_received = 0; in wacom_wac_finger_report()
1755 wacom_wac->shared->touch_down = wacom_wac_finger_count_touches(wacom_wac); in wacom_wac_finger_report()
1762 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_usage_mapping() local
1763 struct wacom_features *features = &wacom_wac->features; in wacom_wac_usage_mapping()
1780 if (wacom->wacom_wac.features.type != HID_GENERIC) in wacom_wac_event()
1814 struct wacom_wac *wacom_wac = &wacom->wacom_wac; in wacom_wac_report() local
1817 if (wacom_wac->features.type != HID_GENERIC) in wacom_wac_report()
1835 static int wacom_bpt_touch(struct wacom_wac *wacom) in wacom_bpt_touch()
1876 static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data) in wacom_bpt3_touch_msg()
1919 static void wacom_bpt3_button_msg(struct wacom_wac *wacom, unsigned char *data) in wacom_bpt3_button_msg()
1935 static int wacom_bpt3_touch(struct wacom_wac *wacom) in wacom_bpt3_touch()
1966 static int wacom_bpt_pen(struct wacom_wac *wacom) in wacom_bpt_pen()
2037 static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len) in wacom_bpt_irq()
2054 static void wacom_bamboo_pad_pen_event(struct wacom_wac *wacom, in wacom_bamboo_pad_pen_event()
2080 static int wacom_bamboo_pad_touch_event(struct wacom_wac *wacom, in wacom_bamboo_pad_touch_event()
2120 static int wacom_bamboo_pad_irq(struct wacom_wac *wacom, size_t len) in wacom_bamboo_pad_irq()
2138 static int wacom_wireless_irq(struct wacom_wac *wacom, size_t len) in wacom_wireless_irq()
2179 static int wacom_status_irq(struct wacom_wac *wacom_wac, size_t len) in wacom_status_irq() argument
2181 struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac); in wacom_status_irq()
2182 struct wacom_features *features = &wacom_wac->features; in wacom_status_irq()
2183 unsigned char *data = wacom_wac->data; in wacom_status_irq()
2190 wacom_wac->shared->touch_input && in wacom_status_irq()
2192 input_report_switch(wacom_wac->shared->touch_input, in wacom_status_irq()
2194 input_sync(wacom_wac->shared->touch_input); in wacom_status_irq()
2201 wacom_notify_battery(wacom_wac, battery, charging, in wacom_status_irq()
2207 wacom_schedule_work(wacom_wac, WACOM_WORKER_BATTERY); in wacom_status_irq()
2213 wacom_schedule_work(wacom_wac, WACOM_WORKER_BATTERY); in wacom_status_irq()
2214 wacom_notify_battery(wacom_wac, 0, 0, 0, 0); in wacom_status_irq()
2219 void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len) in wacom_wac_irq() argument
2223 switch (wacom_wac->features.type) { in wacom_wac_irq()
2225 sync = wacom_penpartner_irq(wacom_wac); in wacom_wac_irq()
2229 sync = wacom_pl_irq(wacom_wac); in wacom_wac_irq()
2236 sync = wacom_graphire_irq(wacom_wac); in wacom_wac_irq()
2240 sync = wacom_ptu_irq(wacom_wac); in wacom_wac_irq()
2244 sync = wacom_dtu_irq(wacom_wac); in wacom_wac_irq()
2249 sync = wacom_dtus_irq(wacom_wac); in wacom_wac_irq()
2269 sync = wacom_intuos_irq(wacom_wac); in wacom_wac_irq()
2273 sync = wacom_intuos_bt_irq(wacom_wac, len); in wacom_wac_irq()
2278 sync = wacom_24hdt_irq(wacom_wac); in wacom_wac_irq()
2288 sync = wacom_bpt3_touch(wacom_wac); in wacom_wac_irq()
2289 else if (wacom_wac->data[0] == WACOM_REPORT_USB) in wacom_wac_irq()
2290 sync = wacom_status_irq(wacom_wac, len); in wacom_wac_irq()
2292 sync = wacom_intuos_irq(wacom_wac); in wacom_wac_irq()
2301 sync = wacom_tpc_irq(wacom_wac, len); in wacom_wac_irq()
2309 if (wacom_wac->data[0] == WACOM_REPORT_USB) in wacom_wac_irq()
2310 sync = wacom_status_irq(wacom_wac, len); in wacom_wac_irq()
2312 sync = wacom_bpt_irq(wacom_wac, len); in wacom_wac_irq()
2316 sync = wacom_bamboo_pad_irq(wacom_wac, len); in wacom_wac_irq()
2320 sync = wacom_wireless_irq(wacom_wac, len); in wacom_wac_irq()
2325 if (wacom_wac->data[0] == WACOM_REPORT_DEVICE_LIST) in wacom_wac_irq()
2326 wacom_remote_status_irq(wacom_wac, len); in wacom_wac_irq()
2328 sync = wacom_remote_irq(wacom_wac, len); in wacom_wac_irq()
2337 if (wacom_wac->pen_input) in wacom_wac_irq()
2338 input_sync(wacom_wac->pen_input); in wacom_wac_irq()
2339 if (wacom_wac->touch_input) in wacom_wac_irq()
2340 input_sync(wacom_wac->touch_input); in wacom_wac_irq()
2341 if (wacom_wac->pad_input) in wacom_wac_irq()
2342 input_sync(wacom_wac->pad_input); in wacom_wac_irq()
2346 static void wacom_setup_basic_pro_pen(struct wacom_wac *wacom_wac) in wacom_setup_basic_pro_pen() argument
2348 struct input_dev *input_dev = wacom_wac->pen_input; in wacom_setup_basic_pro_pen()
2357 0, wacom_wac->features.distance_max, wacom_wac->features.distance_fuzz, 0); in wacom_setup_basic_pro_pen()
2360 static void wacom_setup_cintiq(struct wacom_wac *wacom_wac) in wacom_setup_cintiq() argument
2362 struct input_dev *input_dev = wacom_wac->pen_input; in wacom_setup_cintiq()
2363 struct wacom_features *features = &wacom_wac->features; in wacom_setup_cintiq()
2365 wacom_setup_basic_pro_pen(wacom_wac); in wacom_setup_cintiq()
2379 static void wacom_setup_intuos(struct wacom_wac *wacom_wac) in wacom_setup_intuos() argument
2381 struct input_dev *input_dev = wacom_wac->pen_input; in wacom_setup_intuos()
2385 wacom_setup_cintiq(wacom_wac); in wacom_setup_intuos()
2402 struct wacom_features *features = &wacom->wacom_wac.features; in wacom_setup_device_quirks()
2515 struct wacom_wac *wacom_wac) in wacom_setup_pen_input_capabilities() argument
2517 struct wacom_features *features = &wacom_wac->features; in wacom_setup_pen_input_capabilities()
2584 wacom_setup_cintiq(wacom_wac); in wacom_setup_pen_input_capabilities()
2599 wacom_setup_intuos(wacom_wac); in wacom_setup_pen_input_capabilities()
2615 wacom_setup_intuos(wacom_wac); in wacom_setup_pen_input_capabilities()
2654 wacom_setup_basic_pro_pen(wacom_wac); in wacom_setup_pen_input_capabilities()
2674 struct wacom_wac *wacom_wac) in wacom_setup_touch_input_capabilities() argument
2676 struct wacom_features *features = &wacom_wac->features; in wacom_setup_touch_input_capabilities()
2828 if (wacom->wacom_wac.features.type == WACOM_21UX2) in wacom_is_led_toggled()
2843 if (wacom->wacom_wac.features.type == WACOM_24HD) in wacom_update_led()
2896 struct wacom_wac *wacom_wac) in wacom_setup_pad_input_capabilities() argument
2898 struct wacom_features *features = &wacom_wac->features; in wacom_setup_pad_input_capabilities()
2906 if (features->type == REMOTE && input_dev == wacom_wac->pad_input) in wacom_setup_pad_input_capabilities()