Lines Matching defs:input
3 * drivers/input/tablet/wacom_wac.c
13 #include <linux/input/mt.h>
48 struct input_dev *input = wacom_wac->pen_input;
52 input_report_key(input, BTN_TOUCH, 0);
53 input_report_key(input, BTN_STYLUS, 0);
54 input_report_key(input, BTN_STYLUS2, 0);
55 input_report_key(input, BTN_STYLUS3, 0);
56 input_report_key(input, wacom_wac->tool[0], 0);
58 input_report_abs(input, ABS_MISC, 0);
60 input_report_abs(input, ABS_PRESSURE, 0);
66 input_sync(input);
129 struct input_dev *input = wacom->pen_input;
136 input_report_key(input, wacom->tool[0], 1);
137 input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */
138 input_report_abs(input, ABS_X, get_unaligned_le16(&data[1]));
139 input_report_abs(input, ABS_Y, get_unaligned_le16(&data[3]));
140 input_report_abs(input, ABS_PRESSURE, (signed char)data[6] + 127);
141 input_report_key(input, BTN_TOUCH, ((signed char)data[6] > -127));
142 input_report_key(input, BTN_STYLUS, (data[5] & 0x40));
144 input_report_key(input, wacom->tool[0], 0);
145 input_report_abs(input, ABS_MISC, 0); /* report tool id */
146 input_report_abs(input, ABS_PRESSURE, -1);
147 input_report_key(input, BTN_TOUCH, 0);
152 input_report_key(input, BTN_TOOL_PEN, 1);
153 input_report_abs(input, ABS_MISC, STYLUS_DEVICE_ID); /* report tool id */
154 input_report_abs(input, ABS_X, get_unaligned_le16(&data[1]));
155 input_report_abs(input, ABS_Y, get_unaligned_le16(&data[3]));
156 input_report_abs(input, ABS_PRESSURE, (signed char)data[6] + 127);
157 input_report_key(input, BTN_TOUCH, ((signed char)data[6] > -80) && !(data[5] & 0x20));
158 input_report_key(input, BTN_STYLUS, (data[5] & 0x40));
162 dev_dbg(input->dev.parent,
174 struct input_dev *input = wacom->pen_input;
178 dev_dbg(input->dev.parent,
201 input_report_key(input, BTN_TOOL_RUBBER, 0);
202 input_report_abs(input, ABS_MISC, 0);
203 input_sync(input);
214 input_report_abs(input, ABS_X, data[3] | (data[2] << 7) | ((data[1] & 0x03) << 14));
215 input_report_abs(input, ABS_Y, data[6] | (data[5] << 7) | ((data[4] & 0x03) << 14));
216 input_report_abs(input, ABS_PRESSURE, pressure);
218 input_report_key(input, BTN_TOUCH, data[4] & 0x08);
219 input_report_key(input, BTN_STYLUS, data[4] & 0x10);
221 input_report_key(input, BTN_STYLUS2, (wacom->tool[0] == BTN_TOOL_PEN) && (data[4] & 0x20));
226 input_report_key(input, wacom->tool[0], prox);
227 input_report_abs(input, ABS_MISC, wacom->id[0]);
234 struct input_dev *input = wacom->pen_input;
237 dev_dbg(input->dev.parent,
243 input_report_key(input, BTN_TOOL_RUBBER, data[1] & 0x20);
244 input_report_key(input, BTN_TOUCH, data[1] & 0x08);
247 input_report_key(input, BTN_TOOL_PEN, data[1] & 0x20);
248 input_report_key(input, BTN_TOUCH, data[1] & 0x01);
251 input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */
252 input_report_abs(input, ABS_X, le16_to_cpup((__le16 *)&data[2]));
253 input_report_abs(input, ABS_Y, le16_to_cpup((__le16 *)&data[4]));
254 input_report_abs(input, ABS_PRESSURE, le16_to_cpup((__le16 *)&data[6]));
255 input_report_key(input, BTN_STYLUS, data[1] & 0x02);
256 input_report_key(input, BTN_STYLUS2, data[1] & 0x10);
263 struct input_dev *input = wacom->pen_input;
266 dev_dbg(input->dev.parent,
277 input_report_key(input, BTN_STYLUS, data[1] & 0x02);
278 input_report_key(input, BTN_STYLUS2, data[1] & 0x10);
279 input_report_abs(input, ABS_X, le16_to_cpup((__le16 *)&data[2]));
280 input_report_abs(input, ABS_Y, le16_to_cpup((__le16 *)&data[4]));
281 input_report_abs(input, ABS_PRESSURE, ((data[7] & 0x01) << 8) | data[6]);
282 input_report_key(input, BTN_TOUCH, data[1] & 0x05);
285 input_report_key(input, wacom->tool[0], prox);
286 input_report_abs(input, ABS_MISC, wacom->id[0]);
293 struct input_dev *input = wacom->pen_input;
297 dev_dbg(input->dev.parent,
301 input = wacom->pad_input;
302 input_report_key(input, BTN_0, (data[1] & 0x01));
303 input_report_key(input, BTN_1, (data[1] & 0x02));
304 input_report_key(input, BTN_2, (data[1] & 0x04));
305 input_report_key(input, BTN_3, (data[1] & 0x08));
306 input_report_abs(input, ABS_MISC,
325 input_report_key(input, BTN_STYLUS, data[1] & 0x20);
326 input_report_key(input, BTN_STYLUS2, data[1] & 0x40);
327 input_report_abs(input, ABS_X, get_unaligned_be16(&data[3]));
328 input_report_abs(input, ABS_Y, get_unaligned_be16(&data[5]));
330 input_report_abs(input, ABS_PRESSURE, pressure);
331 input_report_key(input, BTN_TOUCH, pressure > 10);
335 input_report_key(input, wacom->tool[0], prox);
336 input_report_abs(input, ABS_MISC, wacom->id[0]);
345 struct input_dev *input = wacom->pen_input;
354 dev_dbg(input->dev.parent,
360 dev_dbg(input->dev.parent,
381 input_report_key(input, BTN_MIDDLE, data[1] & 0x04);
390 input_report_abs(input, ABS_X, le16_to_cpup((__le16 *)&data[2]));
391 input_report_abs(input, ABS_Y, le16_to_cpup((__le16 *)&data[4]));
394 input_report_abs(input, ABS_PRESSURE, data[6] |
397 input_report_abs(input, ABS_PRESSURE, data[6] |
399 input_report_key(input, BTN_TOUCH, data[1] & 0x01);
400 input_report_key(input, BTN_STYLUS, data[1] & 0x02);
401 input_report_key(input, BTN_STYLUS2, data[1] & 0x04);
403 input_report_key(input, BTN_LEFT, data[1] & 0x01);
404 input_report_key(input, BTN_RIGHT, data[1] & 0x02);
407 input_report_abs(input, ABS_DISTANCE, data[6] & 0x3f);
413 input_report_abs(input, ABS_DISTANCE, rw);
416 input_report_key(input, BTN_MIDDLE,
424 input_report_abs(input, ABS_DISTANCE, data[7] & 0x3f);
427 input_report_rel(input, REL_WHEEL, rw);
432 input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */
433 input_report_key(input, wacom->tool[0], prox);
434 input_sync(input); /* sync last event */
517 struct input_dev *input = wacom->pad_input;
581 input_report_abs(input, ABS_X, be16_to_cpup((__be16 *)&data[4]));
582 input_report_abs(input, ABS_Y, be16_to_cpup((__be16 *)&data[6]));
583 input_report_abs(input, ABS_Z, be16_to_cpup((__be16 *)&data[8]));
643 wacom_report_numbered_buttons(input, nbuttons, buttons);
646 input_report_key(input, KEY_PROG1 + i, keys & (1 << i));
648 input_report_key(input, KEY_BUTTONCONFIG, wrench);
649 input_report_key(input, KEY_ONSCREEN_KEYBOARD, keyboard);
650 input_report_key(input, KEY_CONTROLPANEL, menu);
651 input_report_key(input, KEY_INFO, info);
660 input_report_abs(input, ABS_RX, strip1);
661 input_report_abs(input, ABS_RY, strip2);
663 input_report_abs(input, ABS_WHEEL, (ring1 & 0x80) ? (ring1 & 0x7f) : 0);
664 input_report_abs(input, ABS_THROTTLE, (ring2 & 0x80) ? (ring2 & 0x7f) : 0);
666 input_report_key(input, wacom->tool[1], prox ? 1 : 0);
667 input_report_abs(input, ABS_MISC, prox ? PAD_DEVICE_ID : 0);
669 input_event(input, EV_MSC, MSC_SERIAL, 0xffffffff);
782 struct input_dev *input = wacom->pen_input;
791 input_report_abs(input, ABS_X, 0);
792 input_report_abs(input, ABS_Y, 0);
793 input_report_abs(input, ABS_DISTANCE, 0);
794 input_report_abs(input, ABS_TILT_X, 0);
795 input_report_abs(input, ABS_TILT_Y, 0);
797 input_report_key(input, BTN_LEFT, 0);
798 input_report_key(input, BTN_MIDDLE, 0);
799 input_report_key(input, BTN_RIGHT, 0);
800 input_report_key(input, BTN_SIDE, 0);
801 input_report_key(input, BTN_EXTRA, 0);
802 input_report_abs(input, ABS_THROTTLE, 0);
803 input_report_abs(input, ABS_RZ, 0);
805 input_report_abs(input, ABS_PRESSURE, 0);
806 input_report_key(input, BTN_STYLUS, 0);
807 input_report_key(input, BTN_STYLUS2, 0);
808 input_report_key(input, BTN_TOUCH, 0);
809 input_report_abs(input, ABS_WHEEL, 0);
811 input_report_abs(input, ABS_Z, 0);
813 input_report_key(input, wacom->tool[idx], 0);
814 input_report_abs(input, ABS_MISC, 0); /* reset tool id */
815 input_event(input, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
823 struct input_dev *input = wacom->pen_input;
854 input_report_key(input, BTN_TOUCH, 0);
855 input_report_abs(input, ABS_PRESSURE, 0);
856 input_report_abs(input, ABS_DISTANCE, wacom->features.distance_max);
892 struct input_dev *input = wacom->pen_input;
941 input_report_abs(input, ABS_X, x);
942 input_report_abs(input, ABS_Y, y);
943 input_report_abs(input, ABS_DISTANCE, distance);
954 input_report_abs(input, ABS_PRESSURE, t);
956 input_report_abs(input, ABS_TILT_X,
958 input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64);
960 input_report_key(input, BTN_STYLUS, data[1] & 2);
961 input_report_key(input, BTN_STYLUS2, data[1] & 4);
962 input_report_key(input, BTN_TOUCH, t > 10);
967 input_report_abs(input, ABS_WHEEL,
969 input_report_abs(input, ABS_TILT_X,
971 input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64);
981 input_report_abs(input, ABS_Z, t);
985 input_report_abs(input, ABS_RZ, (data[7] & 0x20) ?
992 input_report_key(input, BTN_LEFT, data[8] & 0x01);
993 input_report_key(input, BTN_MIDDLE, data[8] & 0x02);
994 input_report_key(input, BTN_RIGHT, data[8] & 0x04);
996 input_report_key(input, BTN_SIDE, data[8] & 0x20);
997 input_report_key(input, BTN_EXTRA, data[8] & 0x10);
999 input_report_abs(input, ABS_THROTTLE, (data[8] & 0x08) ? -t : t);
1004 input_report_key(input, BTN_LEFT, data[6] & 0x01);
1005 input_report_key(input, BTN_MIDDLE, data[6] & 0x02);
1006 input_report_key(input, BTN_RIGHT, data[6] & 0x04);
1007 input_report_rel(input, REL_WHEEL, ((data[7] & 0x80) >> 7)
1009 input_report_key(input, BTN_SIDE, data[6] & 0x08);
1010 input_report_key(input, BTN_EXTRA, data[6] & 0x10);
1012 input_report_abs(input, ABS_TILT_X,
1014 input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64);
1020 input_report_key(input, BTN_LEFT, data[8] & 0x04);
1021 input_report_key(input, BTN_MIDDLE, data[8] & 0x08);
1022 input_report_key(input, BTN_RIGHT, data[8] & 0x10);
1023 input_report_rel(input, REL_WHEEL, (data[8] & 0x01)
1028 input_report_key(input, BTN_SIDE, data[8] & 0x40);
1029 input_report_key(input, BTN_EXTRA, data[8] & 0x20);
1034 input_report_key(input, BTN_LEFT, data[8] & 0x01);
1035 input_report_key(input, BTN_MIDDLE, data[8] & 0x02);
1036 input_report_key(input, BTN_RIGHT, data[8] & 0x04);
1037 input_report_key(input, BTN_SIDE, data[8] & 0x10);
1038 input_report_key(input, BTN_EXTRA, data[8] & 0x08);
1053 input_report_abs(input, ABS_MISC,
1055 input_report_key(input, wacom->tool[idx], 1);
1056 input_event(input, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
1064 struct input_dev *input = wacom->pen_input;
1075 dev_dbg(input->dev.parent,
1101 struct input_dev *input;
1131 input = remote->remotes[index].input;
1133 input_report_key(input, BTN_0, (data[9] & 0x01));
1134 input_report_key(input, BTN_1, (data[9] & 0x02));
1135 input_report_key(input, BTN_2, (data[9] & 0x04));
1136 input_report_key(input, BTN_3, (data[9] & 0x08));
1137 input_report_key(input, BTN_4, (data[9] & 0x10));
1138 input_report_key(input, BTN_5, (data[9] & 0x20));
1139 input_report_key(input, BTN_6, (data[9] & 0x40));
1140 input_report_key(input, BTN_7, (data[9] & 0x80));
1142 input_report_key(input, BTN_8, (data[10] & 0x01));
1143 input_report_key(input, BTN_9, (data[10] & 0x02));
1144 input_report_key(input, BTN_A, (data[10] & 0x04));
1145 input_report_key(input, BTN_B, (data[10] & 0x08));
1146 input_report_key(input, BTN_C, (data[10] & 0x10));
1147 input_report_key(input, BTN_X, (data[10] & 0x20));
1148 input_report_key(input, BTN_Y, (data[10] & 0x40));
1149 input_report_key(input, BTN_Z, (data[10] & 0x80));
1151 input_report_key(input, BTN_BASE, (data[11] & 0x01));
1152 input_report_key(input, BTN_BASE2, (data[11] & 0x02));
1155 input_report_abs(input, ABS_WHEEL, (data[12] & 0x7f) - 1);
1157 input_report_abs(input, ABS_WHEEL, 0);
1163 input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
1165 input_report_abs(input, ABS_MISC, 0);
1167 input_event(input, EV_MSC, MSC_SERIAL, serial);
1169 input_sync(input);
1282 struct input_dev *input = wacom->touch_input;
1291 return test_bit(BTN_TOUCH, input->key) &&
1294 for (i = 0; i < input->mt->num_slots; i++) {
1295 struct input_mt_slot *ps = &input->mt->slots[i];
1597 struct input_dev *input = wacom->touch_input;
1631 int slot = input_mt_get_slot_by_key(input, data[offset + 1]);
1635 input_mt_slot(input, slot);
1636 input_mt_report_slot_state(input, MT_TOOL_FINGER, touch);
1642 input_report_abs(input, ABS_MT_POSITION_X, t_x);
1643 input_report_abs(input, ABS_MT_POSITION_Y, t_y);
1651 input_report_abs(input, ABS_MT_TOUCH_MAJOR, min(w,h));
1652 input_report_abs(input, ABS_MT_WIDTH_MAJOR,
1654 input_report_abs(input, ABS_MT_WIDTH_MINOR, min(w, h));
1655 input_report_abs(input, ABS_MT_ORIENTATION, w > h);
1659 input_mt_sync_frame(input);
1671 struct input_dev *input = wacom->touch_input;
1696 int slot = input_mt_get_slot_by_key(input, id);
1701 input_mt_slot(input, slot);
1702 input_mt_report_slot_state(input, MT_TOOL_FINGER, touch);
1706 input_report_abs(input, ABS_MT_POSITION_X, x);
1707 input_report_abs(input, ABS_MT_POSITION_Y, y);
1710 input_mt_sync_frame(input);
1722 struct input_dev *input = wacom->touch_input;
1730 input_mt_slot(input, i);
1731 input_mt_report_slot_state(input, MT_TOOL_FINGER, touch);
1736 input_report_abs(input, ABS_MT_POSITION_X, x);
1737 input_report_abs(input, ABS_MT_POSITION_Y, y);
1740 input_mt_sync_frame(input);
1751 struct input_dev *input = wacom->touch_input;
1773 input_report_abs(input, ABS_X, x);
1774 input_report_abs(input, ABS_Y, y);
1776 input_report_key(input, BTN_TOUCH, prox);
1787 struct input_dev *input = wacom->pen_input;
1801 input_report_key(input, BTN_STYLUS, data[1] & 0x02);
1802 input_report_key(input, BTN_STYLUS2, data[1] & 0x10);
1803 input_report_abs(input, ABS_X, le16_to_cpup((__le16 *)&data[2]));
1804 input_report_abs(input, ABS_Y, le16_to_cpup((__le16 *)&data[4]));
1805 input_report_abs(input, ABS_PRESSURE, ((data[7] & 0x07) << 8) | data[6]);
1806 input_report_key(input, BTN_TOUCH, data[1] & 0x05);
1807 input_report_key(input, wacom->tool[0], prox);
1856 static int wacom_offset_rotation(struct input_dev *input, struct hid_usage *usage,
1859 struct input_absinfo *abs = &input->absinfo[usage->code];
1914 static void wacom_map_usage(struct input_dev *input, struct hid_usage *usage,
1917 struct wacom *wacom = input_get_drvdata(input);
1942 set_bit(type, input->evbit);
1946 input_set_abs_params(input, code, fmin, fmax, fuzz, 0);
1951 hid_warn(input,
1955 input_abs_set_res(input, code, resolution);
1958 input_set_capability(input, EV_KEY, code);
1961 input_set_capability(input, EV_MSC, code);
1964 input_set_capability(input, EV_SW, code);
2040 struct input_dev *input = wacom_wac->pad_input;
2045 __set_bit(INPUT_PROP_ACCELEROMETER, input->propbit);
2046 wacom_map_usage(input, usage, field, EV_ABS, ABS_X, 0);
2050 __set_bit(INPUT_PROP_ACCELEROMETER, input->propbit);
2051 wacom_map_usage(input, usage, field, EV_ABS, ABS_Y, 0);
2055 __set_bit(INPUT_PROP_ACCELEROMETER, input->propbit);
2056 wacom_map_usage(input, usage, field, EV_ABS, ABS_Z, 0);
2065 wacom_map_usage(input, usage, field, EV_KEY,
2086 wacom_map_usage(input, usage, field, EV_ABS, ABS_RX, 0);
2090 wacom_map_usage(input, usage, field, EV_ABS, ABS_RY, 0);
2094 wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0);
2104 set_bit(EV_ABS, input->evbit);
2108 wacom_map_usage(input, usage, field, EV_KEY, KEY_BUTTONCONFIG, 0);
2112 wacom_map_usage(input, usage, field, EV_KEY, KEY_ONSCREEN_KEYBOARD, 0);
2116 wacom_map_usage(input, usage, field, EV_KEY, KEY_CONTROLPANEL, 0);
2131 wacom_map_usage(input, usage, field, EV_KEY,
2145 struct input_dev *input = wacom_wac->pad_input;
2184 if (!input)
2206 value = wacom_offset_rotation(input, usage, value, 3, 16);
2210 value = wacom_offset_rotation(input, usage, value, 1, 2);
2213 value = wacom_offset_rotation(input, usage, value, 1, 4);
2219 input_event(input, usage->type, usage->code, 0);
2240 input_event(input, usage->type, usage->code, value);
2260 struct input_dev *input = wacom_wac->pad_input;
2265 input_event(input, EV_ABS, ABS_MISC, active ? PAD_DEVICE_ID : 0);
2266 input_sync(input);
2278 struct input_dev *input = wacom_wac->pen_input;
2283 wacom_map_usage(input, usage, field, EV_ABS, ABS_X, 4);
2286 wacom_map_usage(input, usage, field, EV_ABS, ABS_Y, 4);
2290 wacom_map_usage(input, usage, field, EV_ABS, ABS_DISTANCE, 0);
2293 wacom_map_usage(input, usage, field, EV_ABS, ABS_PRESSURE, 0);
2296 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOOL_PEN, 0);
2299 wacom_map_usage(input, usage, field, EV_KEY,
2303 wacom_map_usage(input, usage, field, EV_ABS, ABS_TILT_X, 0);
2306 wacom_map_usage(input, usage, field, EV_ABS, ABS_TILT_Y, 0);
2309 wacom_map_usage(input, usage, field, EV_ABS, ABS_Z, 0);
2313 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOUCH, 0);
2316 wacom_map_usage(input, usage, field, EV_KEY, BTN_STYLUS, 0);
2319 wacom_map_usage(input, usage, field, EV_KEY, BTN_STYLUS2, 0);
2323 wacom_map_usage(input, usage, field, EV_MSC, MSC_SERIAL, 0);
2327 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOOL_PEN, 0);
2330 wacom_map_usage(input, usage, field, EV_ABS, ABS_MISC, 0);
2333 set_bit(EV_KEY, input->evbit);
2334 input_set_capability(input, EV_KEY, BTN_TOOL_PEN);
2335 input_set_capability(input, EV_KEY, BTN_TOOL_RUBBER);
2336 input_set_capability(input, EV_KEY, BTN_TOOL_BRUSH);
2337 input_set_capability(input, EV_KEY, BTN_TOOL_PENCIL);
2338 input_set_capability(input, EV_KEY, BTN_TOOL_AIRBRUSH);
2340 input_set_capability(input, EV_KEY, BTN_TOOL_MOUSE);
2341 input_set_capability(input, EV_KEY, BTN_TOOL_LENS);
2346 wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0);
2357 struct input_dev *input = wacom_wac->pen_input;
2406 value = wacom_offset_rotation(input, usage, value, 1, 4);
2478 input_event(input, usage->type, usage->code, value);
2480 input_event(input, usage->type, usage->code, 0);
2498 struct input_dev *input = wacom_wac->pen_input;
2523 input_report_key(input, BTN_STYLUS, sw_state == 1);
2524 input_report_key(input, BTN_STYLUS2, sw_state == 2);
2525 input_report_key(input, BTN_STYLUS3, sw_state == 3);
2535 * To ensure compatibility with xf86-input-wacom, we should
2539 input_report_key(input, BTN_TOUCH,
2541 input_report_key(input, wacom_wac->tool[0], sense);
2544 * xf86-input-wacom does not accept a serial number
2550 input_event(input, EV_MSC, MSC_SERIAL, (int)(serial_lo ? serial_lo : serial_hi));
2551 input_report_abs(input, ABS_MISC, sense ? id : 0);
2556 input_sync(input);
2571 struct input_dev *input = wacom_wac->touch_input;
2578 wacom_map_usage(input, usage, field, EV_ABS, ABS_X, 4);
2580 wacom_map_usage(input, usage, field, EV_ABS,
2585 wacom_map_usage(input, usage, field, EV_ABS, ABS_Y, 4);
2587 wacom_map_usage(input, usage, field, EV_ABS,
2592 wacom_map_usage(input, usage, field, EV_ABS, ABS_MT_TOUCH_MAJOR, 0);
2593 wacom_map_usage(input, usage, field, EV_ABS, ABS_MT_TOUCH_MINOR, 0);
2594 input_set_abs_params(input, ABS_MT_ORIENTATION, 0, 1, 0, 0);
2597 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOUCH, 0);
2618 struct input_dev *input)
2639 slot = input_mt_get_slot_by_key(input, hid_data->id);
2640 input_mt_slot(input, slot);
2641 input_mt_report_slot_state(input, MT_TOOL_FINGER, prox);
2644 input_report_key(input, BTN_TOUCH, prox);
2648 input_report_abs(input, mt ? ABS_MT_POSITION_X : ABS_X,
2650 input_report_abs(input, mt ? ABS_MT_POSITION_Y : ABS_Y,
2653 if (test_bit(ABS_MT_TOUCH_MAJOR, input->absbit)) {
2654 input_report_abs(input, ABS_MT_TOUCH_MAJOR, max(hid_data->width, hid_data->height));
2655 input_report_abs(input, ABS_MT_TOUCH_MINOR, min(hid_data->width, hid_data->height));
2657 input_report_abs(input, ABS_MT_ORIENTATION, hid_data->width <= hid_data->height ? 0 : 1);
2779 struct input_dev *input = wacom_wac->touch_input;
2790 input_mt_sync_frame(input);
2792 input_sync(input);
2878 * Non-input reports may be sent prior to the device being
2952 struct input_dev *input = wacom->touch_input;
2965 input_mt_slot(input, i);
2966 input_mt_report_slot_state(input, MT_TOOL_FINGER, touch);
2974 input_report_abs(input, ABS_MT_POSITION_X, x);
2975 input_report_abs(input, ABS_MT_POSITION_Y, y);
2979 input_mt_sync_frame(input);
2993 struct input_dev *input = wacom->touch_input;
2995 int slot = input_mt_get_slot_by_key(input, data[0]);
3002 input_mt_slot(input, slot);
3003 input_mt_report_slot_state(input, MT_TOOL_FINGER, touch);
3020 int x_res = input_abs_get_res(input, ABS_MT_POSITION_X);
3021 int y_res = input_abs_get_res(input, ABS_MT_POSITION_Y);
3026 input_report_abs(input, ABS_MT_POSITION_X, x);
3027 input_report_abs(input, ABS_MT_POSITION_Y, y);
3028 input_report_abs(input, ABS_MT_TOUCH_MAJOR, width);
3029 input_report_abs(input, ABS_MT_TOUCH_MINOR, height);
3035 struct input_dev *input = wacom->pad_input;
3039 input_report_key(input, BTN_LEFT, (data[1] & 0x02) != 0);
3040 input_report_key(input, BTN_BACK, (data[1] & 0x08) != 0);
3042 input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0);
3043 input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0);
3045 input_report_key(input, BTN_FORWARD, (data[1] & 0x04) != 0);
3046 input_report_key(input, BTN_RIGHT, (data[1] & 0x01) != 0);
3083 struct input_dev *input = wacom->pen_input;
3133 input_report_key(input, BTN_TOUCH, pen);
3134 input_report_key(input, BTN_STYLUS, btn1);
3135 input_report_key(input, BTN_STYLUS2, btn2);
3138 input_report_abs(input, ABS_X, x);
3139 input_report_abs(input, ABS_Y, y);
3141 input_report_abs(input, ABS_PRESSURE, p);
3142 input_report_abs(input, ABS_DISTANCE, d);
3144 input_report_key(input, wacom->tool[0], range); /* PEN or RUBBER */
3145 input_report_abs(input, ABS_MISC, wacom->id[0]); /* TOOL ID */
3201 struct input_dev *input = wacom->touch_input;
3213 input_mt_slot(input, id);
3214 input_mt_report_slot_state(input, MT_TOOL_FINGER, valid);
3223 input_report_abs(input, ABS_MT_POSITION_X, x);
3224 input_report_abs(input, ABS_MT_POSITION_Y, y);
3227 input_mt_sync_frame(input);
3229 input_report_key(input, BTN_LEFT, prefix & 0x40);
3230 input_report_key(input, BTN_RIGHT, prefix & 0x80);
4133 /* kept for making legacy xf86-input-wacom working with the wheels */
4136 /* kept for making legacy xf86-input-wacom accepting the pad */