Lines Matching refs:input
128 struct input_dev __rcu *input; member
479 struct input_dev *input; in steam_input_register() local
483 input = rcu_dereference(steam->input); in steam_input_register()
485 if (input) { in steam_input_register()
490 input = input_allocate_device(); in steam_input_register()
491 if (!input) in steam_input_register()
494 input_set_drvdata(input, steam); in steam_input_register()
495 input->dev.parent = &hdev->dev; in steam_input_register()
496 input->open = steam_input_open; in steam_input_register()
497 input->close = steam_input_close; in steam_input_register()
499 input->name = (steam->quirks & STEAM_QUIRK_WIRELESS) ? "Wireless Steam Controller" : in steam_input_register()
502 input->phys = hdev->phys; in steam_input_register()
503 input->uniq = steam->serial_no; in steam_input_register()
504 input->id.bustype = hdev->bus; in steam_input_register()
505 input->id.vendor = hdev->vendor; in steam_input_register()
506 input->id.product = hdev->product; in steam_input_register()
507 input->id.version = hdev->version; in steam_input_register()
509 input_set_capability(input, EV_KEY, BTN_TR2); in steam_input_register()
510 input_set_capability(input, EV_KEY, BTN_TL2); in steam_input_register()
511 input_set_capability(input, EV_KEY, BTN_TR); in steam_input_register()
512 input_set_capability(input, EV_KEY, BTN_TL); in steam_input_register()
513 input_set_capability(input, EV_KEY, BTN_Y); in steam_input_register()
514 input_set_capability(input, EV_KEY, BTN_B); in steam_input_register()
515 input_set_capability(input, EV_KEY, BTN_X); in steam_input_register()
516 input_set_capability(input, EV_KEY, BTN_A); in steam_input_register()
517 input_set_capability(input, EV_KEY, BTN_DPAD_UP); in steam_input_register()
518 input_set_capability(input, EV_KEY, BTN_DPAD_RIGHT); in steam_input_register()
519 input_set_capability(input, EV_KEY, BTN_DPAD_LEFT); in steam_input_register()
520 input_set_capability(input, EV_KEY, BTN_DPAD_DOWN); in steam_input_register()
521 input_set_capability(input, EV_KEY, BTN_SELECT); in steam_input_register()
522 input_set_capability(input, EV_KEY, BTN_MODE); in steam_input_register()
523 input_set_capability(input, EV_KEY, BTN_START); in steam_input_register()
524 input_set_capability(input, EV_KEY, BTN_THUMBR); in steam_input_register()
525 input_set_capability(input, EV_KEY, BTN_THUMBL); in steam_input_register()
526 input_set_capability(input, EV_KEY, BTN_THUMB); in steam_input_register()
527 input_set_capability(input, EV_KEY, BTN_THUMB2); in steam_input_register()
529 input_set_capability(input, EV_KEY, BTN_BASE); in steam_input_register()
530 input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY1); in steam_input_register()
531 input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY2); in steam_input_register()
532 input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY3); in steam_input_register()
533 input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY4); in steam_input_register()
535 input_set_capability(input, EV_KEY, BTN_GEAR_DOWN); in steam_input_register()
536 input_set_capability(input, EV_KEY, BTN_GEAR_UP); in steam_input_register()
539 input_set_abs_params(input, ABS_X, -32767, 32767, 0, 0); in steam_input_register()
540 input_set_abs_params(input, ABS_Y, -32767, 32767, 0, 0); in steam_input_register()
542 input_set_abs_params(input, ABS_HAT0X, -32767, 32767, in steam_input_register()
544 input_set_abs_params(input, ABS_HAT0Y, -32767, 32767, in steam_input_register()
548 input_set_abs_params(input, ABS_HAT2Y, 0, 32767, 0, 0); in steam_input_register()
549 input_set_abs_params(input, ABS_HAT2X, 0, 32767, 0, 0); in steam_input_register()
551 input_set_abs_params(input, ABS_RX, -32767, 32767, 0, 0); in steam_input_register()
552 input_set_abs_params(input, ABS_RY, -32767, 32767, 0, 0); in steam_input_register()
554 input_set_abs_params(input, ABS_HAT1X, -32767, 32767, in steam_input_register()
556 input_set_abs_params(input, ABS_HAT1Y, -32767, 32767, in steam_input_register()
559 input_abs_set_res(input, ABS_X, STEAM_DECK_JOYSTICK_RESOLUTION); in steam_input_register()
560 input_abs_set_res(input, ABS_Y, STEAM_DECK_JOYSTICK_RESOLUTION); in steam_input_register()
561 input_abs_set_res(input, ABS_RX, STEAM_DECK_JOYSTICK_RESOLUTION); in steam_input_register()
562 input_abs_set_res(input, ABS_RY, STEAM_DECK_JOYSTICK_RESOLUTION); in steam_input_register()
563 input_abs_set_res(input, ABS_HAT1X, STEAM_PAD_RESOLUTION); in steam_input_register()
564 input_abs_set_res(input, ABS_HAT1Y, STEAM_PAD_RESOLUTION); in steam_input_register()
565 input_abs_set_res(input, ABS_HAT2Y, STEAM_DECK_TRIGGER_RESOLUTION); in steam_input_register()
566 input_abs_set_res(input, ABS_HAT2X, STEAM_DECK_TRIGGER_RESOLUTION); in steam_input_register()
568 input_set_abs_params(input, ABS_HAT2Y, 0, 255, 0, 0); in steam_input_register()
569 input_set_abs_params(input, ABS_HAT2X, 0, 255, 0, 0); in steam_input_register()
571 input_set_abs_params(input, ABS_RX, -32767, 32767, in steam_input_register()
573 input_set_abs_params(input, ABS_RY, -32767, 32767, in steam_input_register()
576 input_abs_set_res(input, ABS_X, STEAM_JOYSTICK_RESOLUTION); in steam_input_register()
577 input_abs_set_res(input, ABS_Y, STEAM_JOYSTICK_RESOLUTION); in steam_input_register()
578 input_abs_set_res(input, ABS_RX, STEAM_PAD_RESOLUTION); in steam_input_register()
579 input_abs_set_res(input, ABS_RY, STEAM_PAD_RESOLUTION); in steam_input_register()
580 input_abs_set_res(input, ABS_HAT2Y, STEAM_TRIGGER_RESOLUTION); in steam_input_register()
581 input_abs_set_res(input, ABS_HAT2X, STEAM_TRIGGER_RESOLUTION); in steam_input_register()
583 input_abs_set_res(input, ABS_HAT0X, STEAM_PAD_RESOLUTION); in steam_input_register()
584 input_abs_set_res(input, ABS_HAT0Y, STEAM_PAD_RESOLUTION); in steam_input_register()
588 input_set_capability(input, EV_FF, FF_RUMBLE); in steam_input_register()
589 ret = input_ff_create_memless(input, NULL, steam_play_effect); in steam_input_register()
595 ret = input_register_device(input); in steam_input_register()
599 rcu_assign_pointer(steam->input, input); in steam_input_register()
603 input_free_device(input); in steam_input_register()
609 struct input_dev *input; in steam_input_unregister() local
611 input = rcu_dereference(steam->input); in steam_input_unregister()
613 if (!input) in steam_input_unregister()
615 RCU_INIT_POINTER(steam->input, NULL); in steam_input_unregister()
617 input_unregister_device(input); in steam_input_unregister()
1078 struct input_dev *input, u8 *data) in steam_do_input_event() argument
1089 input_report_abs(input, ABS_HAT2Y, data[11]); in steam_do_input_event()
1090 input_report_abs(input, ABS_HAT2X, data[12]); in steam_do_input_event()
1105 input_report_abs(input, lpad_touched ? ABS_HAT0X : ABS_X, x); in steam_do_input_event()
1106 input_report_abs(input, lpad_touched ? ABS_HAT0Y : ABS_Y, y); in steam_do_input_event()
1109 input_report_abs(input, ABS_X, 0); in steam_do_input_event()
1110 input_report_abs(input, ABS_Y, 0); in steam_do_input_event()
1114 input_report_abs(input, ABS_HAT0X, 0); in steam_do_input_event()
1115 input_report_abs(input, ABS_HAT0Y, 0); in steam_do_input_event()
1118 input_report_abs(input, ABS_RX, steam_le16(data + 20)); in steam_do_input_event()
1119 input_report_abs(input, ABS_RY, -steam_le16(data + 22)); in steam_do_input_event()
1121 input_event(input, EV_KEY, BTN_TR2, !!(b8 & BIT(0))); in steam_do_input_event()
1122 input_event(input, EV_KEY, BTN_TL2, !!(b8 & BIT(1))); in steam_do_input_event()
1123 input_event(input, EV_KEY, BTN_TR, !!(b8 & BIT(2))); in steam_do_input_event()
1124 input_event(input, EV_KEY, BTN_TL, !!(b8 & BIT(3))); in steam_do_input_event()
1125 input_event(input, EV_KEY, BTN_Y, !!(b8 & BIT(4))); in steam_do_input_event()
1126 input_event(input, EV_KEY, BTN_B, !!(b8 & BIT(5))); in steam_do_input_event()
1127 input_event(input, EV_KEY, BTN_X, !!(b8 & BIT(6))); in steam_do_input_event()
1128 input_event(input, EV_KEY, BTN_A, !!(b8 & BIT(7))); in steam_do_input_event()
1129 input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4))); in steam_do_input_event()
1130 input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5))); in steam_do_input_event()
1131 input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6))); in steam_do_input_event()
1132 input_event(input, EV_KEY, BTN_GEAR_DOWN, !!(b9 & BIT(7))); in steam_do_input_event()
1133 input_event(input, EV_KEY, BTN_GEAR_UP, !!(b10 & BIT(0))); in steam_do_input_event()
1134 input_event(input, EV_KEY, BTN_THUMBR, !!(b10 & BIT(2))); in steam_do_input_event()
1135 input_event(input, EV_KEY, BTN_THUMBL, !!(b10 & BIT(6))); in steam_do_input_event()
1136 input_event(input, EV_KEY, BTN_THUMB, lpad_touched || lpad_and_joy); in steam_do_input_event()
1137 input_event(input, EV_KEY, BTN_THUMB2, !!(b10 & BIT(4))); in steam_do_input_event()
1138 input_event(input, EV_KEY, BTN_DPAD_UP, !!(b9 & BIT(0))); in steam_do_input_event()
1139 input_event(input, EV_KEY, BTN_DPAD_RIGHT, !!(b9 & BIT(1))); in steam_do_input_event()
1140 input_event(input, EV_KEY, BTN_DPAD_LEFT, !!(b9 & BIT(2))); in steam_do_input_event()
1141 input_event(input, EV_KEY, BTN_DPAD_DOWN, !!(b9 & BIT(3))); in steam_do_input_event()
1143 input_sync(input); in steam_do_input_event()
1245 struct input_dev *input, u8 *data) in steam_do_deck_input_event() argument
1261 input_report_abs(input, ABS_HAT0X, steam_le16(data + 16)); in steam_do_deck_input_event()
1262 input_report_abs(input, ABS_HAT0Y, steam_le16(data + 18)); in steam_do_deck_input_event()
1264 input_report_abs(input, ABS_HAT0X, 0); in steam_do_deck_input_event()
1265 input_report_abs(input, ABS_HAT0Y, 0); in steam_do_deck_input_event()
1269 input_report_abs(input, ABS_HAT1X, steam_le16(data + 20)); in steam_do_deck_input_event()
1270 input_report_abs(input, ABS_HAT1Y, steam_le16(data + 22)); in steam_do_deck_input_event()
1272 input_report_abs(input, ABS_HAT1X, 0); in steam_do_deck_input_event()
1273 input_report_abs(input, ABS_HAT1Y, 0); in steam_do_deck_input_event()
1276 input_report_abs(input, ABS_X, steam_le16(data + 48)); in steam_do_deck_input_event()
1277 input_report_abs(input, ABS_Y, -steam_le16(data + 50)); in steam_do_deck_input_event()
1278 input_report_abs(input, ABS_RX, steam_le16(data + 52)); in steam_do_deck_input_event()
1279 input_report_abs(input, ABS_RY, -steam_le16(data + 54)); in steam_do_deck_input_event()
1281 input_report_abs(input, ABS_HAT2Y, steam_le16(data + 44)); in steam_do_deck_input_event()
1282 input_report_abs(input, ABS_HAT2X, steam_le16(data + 46)); in steam_do_deck_input_event()
1284 input_event(input, EV_KEY, BTN_TR2, !!(b8 & BIT(0))); in steam_do_deck_input_event()
1285 input_event(input, EV_KEY, BTN_TL2, !!(b8 & BIT(1))); in steam_do_deck_input_event()
1286 input_event(input, EV_KEY, BTN_TR, !!(b8 & BIT(2))); in steam_do_deck_input_event()
1287 input_event(input, EV_KEY, BTN_TL, !!(b8 & BIT(3))); in steam_do_deck_input_event()
1288 input_event(input, EV_KEY, BTN_Y, !!(b8 & BIT(4))); in steam_do_deck_input_event()
1289 input_event(input, EV_KEY, BTN_B, !!(b8 & BIT(5))); in steam_do_deck_input_event()
1290 input_event(input, EV_KEY, BTN_X, !!(b8 & BIT(6))); in steam_do_deck_input_event()
1291 input_event(input, EV_KEY, BTN_A, !!(b8 & BIT(7))); in steam_do_deck_input_event()
1292 input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4))); in steam_do_deck_input_event()
1293 input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5))); in steam_do_deck_input_event()
1294 input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6))); in steam_do_deck_input_event()
1295 input_event(input, EV_KEY, BTN_TRIGGER_HAPPY3, !!(b9 & BIT(7))); in steam_do_deck_input_event()
1296 input_event(input, EV_KEY, BTN_TRIGGER_HAPPY4, !!(b10 & BIT(0))); in steam_do_deck_input_event()
1297 input_event(input, EV_KEY, BTN_THUMBL, !!(b10 & BIT(6))); in steam_do_deck_input_event()
1298 input_event(input, EV_KEY, BTN_THUMBR, !!(b11 & BIT(2))); in steam_do_deck_input_event()
1299 input_event(input, EV_KEY, BTN_DPAD_UP, !!(b9 & BIT(0))); in steam_do_deck_input_event()
1300 input_event(input, EV_KEY, BTN_DPAD_RIGHT, !!(b9 & BIT(1))); in steam_do_deck_input_event()
1301 input_event(input, EV_KEY, BTN_DPAD_LEFT, !!(b9 & BIT(2))); in steam_do_deck_input_event()
1302 input_event(input, EV_KEY, BTN_DPAD_DOWN, !!(b9 & BIT(3))); in steam_do_deck_input_event()
1303 input_event(input, EV_KEY, BTN_THUMB, !!(b10 & BIT(1))); in steam_do_deck_input_event()
1304 input_event(input, EV_KEY, BTN_THUMB2, !!(b10 & BIT(2))); in steam_do_deck_input_event()
1305 input_event(input, EV_KEY, BTN_TRIGGER_HAPPY1, !!(b13 & BIT(1))); in steam_do_deck_input_event()
1306 input_event(input, EV_KEY, BTN_TRIGGER_HAPPY2, !!(b13 & BIT(2))); in steam_do_deck_input_event()
1307 input_event(input, EV_KEY, BTN_BASE, !!(b14 & BIT(2))); in steam_do_deck_input_event()
1309 input_sync(input); in steam_do_deck_input_event()
1348 struct input_dev *input; in steam_raw_event() local
1382 input = rcu_dereference(steam->input); in steam_raw_event()
1383 if (likely(input)) in steam_raw_event()
1384 steam_do_input_event(steam, input, data); in steam_raw_event()
1391 input = rcu_dereference(steam->input); in steam_raw_event()
1392 if (likely(input)) in steam_raw_event()
1393 steam_do_deck_input_event(steam, input, data); in steam_raw_event()