Lines Matching refs:tool

56 	input_report_key(input, wacom_wac->tool[0], 0);
62 wacom_wac->tool[0] = 0;
78 hid_warn(wacom->hdev, "%s: tool appears to be hung in-prox. forcing it out.\n", __func__);
134 wacom->tool[0] = (data[5] & 0x20) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN;
136 input_report_key(input, wacom->tool[0], 1);
137 input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */
144 input_report_key(input, wacom->tool[0], 0);
145 input_report_abs(input, ABS_MISC, 0); /* report tool id */
153 input_report_abs(input, ABS_MISC, STYLUS_DEVICE_ID); /* report tool id */
187 wacom->tool[0] = BTN_TOOL_RUBBER;
191 wacom->tool[0] = BTN_TOOL_PEN;
200 if (wacom->tool[0] == BTN_TOOL_RUBBER && !(data[4] & 0x20)) {
204 wacom->tool[0] = BTN_TOOL_PEN;
220 /* Only allow the stylus2 button to be reported for the pen tool. */
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);
251 input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */
270 /* Going into proximity select tool */
271 wacom->tool[0] = (data[1] & 0x0c) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN;
272 if (wacom->tool[0] == BTN_TOOL_PEN)
285 input_report_key(input, wacom->tool[0], prox);
314 wacom->tool[0] = BTN_TOOL_RUBBER;
319 wacom->tool[0] = BTN_TOOL_PEN;
335 input_report_key(input, wacom->tool[0], prox);
371 wacom->tool[0] = BTN_TOOL_PEN;
376 wacom->tool[0] = BTN_TOOL_RUBBER;
385 wacom->tool[0] = BTN_TOOL_MOUSE;
392 if (wacom->tool[0] != BTN_TOOL_MOUSE) {
432 input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */
433 input_report_key(input, wacom->tool[0], prox);
527 /* pad packets. Works as a second tool and is always in prox */
666 input_report_key(input, wacom->tool[1], prox ? 1 : 0);
796 if (wacom->tool[idx] >= BTN_TOOL_MOUSE) {
813 input_report_key(input, wacom->tool[idx], 0);
814 input_report_abs(input, ABS_MISC, 0); /* reset tool id */
833 /* serial number of the tool */
841 wacom->tool[idx] = wacom_intuos_get_tool_type(wacom->id[idx]);
904 /* don't report events if we don't know the tool ID */
906 /* but reschedule a read of the current tool */
918 (wacom->tool[idx] == BTN_TOOL_LENS &&
1018 if (wacom->tool[idx] == BTN_TOOL_MOUSE) {
1032 else if (wacom->tool[idx] == BTN_TOOL_LENS) {
1054 wacom_intuos_id_mangle(wacom->id[idx])); /* report tool id */
1055 input_report_key(input, wacom->tool[idx], 1);
1366 wacom->tool[0] = 0;
1374 if (!wacom->tool[0]) { /* first in range */
1375 /* Going into range select tool */
1377 wacom->tool[0] = BTN_TOOL_RUBBER;
1379 wacom->tool[0] = wacom_intuos_get_tool_type(wacom->id[0]);
1381 wacom->tool[0] = BTN_TOOL_PEN;
1407 if (wacom->tool[0]) {
1422 input_report_key(pen_input, wacom->tool[0], prox);
1425 wacom_intuos_id_mangle(wacom->id[0])); /* report tool id */
1527 input_report_key(pad_input, wacom->tool[1], prox ? 1 : 0);
1554 input_report_key(pad_input, wacom->tool[1], buttons ? 1 : 0);
1791 /* Going into proximity select tool */
1792 wacom->tool[0] = (data[1] & 0x0c) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN;
1807 input_report_key(input, wacom->tool[0], prox);
2368 * increases in value as the tool moves from low to high.
2418 * Non-USI EMR devices may contain additional tool type
2430 * devices as well) do not return the complete tool
2505 if (!wacom_wac->tool[0] && range) { /* first in range */
2506 /* Going into range select tool */
2508 wacom_wac->tool[0] = BTN_TOOL_RUBBER;
2510 wacom_wac->tool[0] = wacom_intuos_get_tool_type(wacom_wac->id[0]);
2512 wacom_wac->tool[0] = BTN_TOOL_PEN;
2518 if (!delay_pen_events(wacom_wac) && wacom_wac->tool[0]) {
2541 input_report_key(input, wacom_wac->tool[0], sense);
2560 wacom_wac->tool[0] = 0;
3111 wacom->tool[0] = BTN_TOOL_RUBBER;
3114 wacom->tool[0] = BTN_TOOL_PEN;
3144 input_report_key(input, wacom->tool[0], range); /* PEN or RUBBER */