Lines Matching refs:input
299 struct input_dev __rcu *input; member
711 struct input_dev *input; in steam_input_register() local
715 input = rcu_dereference(steam->input); in steam_input_register()
717 if (input) { in steam_input_register()
722 input = input_allocate_device(); in steam_input_register()
723 if (!input) in steam_input_register()
726 input_set_drvdata(input, steam); in steam_input_register()
727 input->dev.parent = &hdev->dev; in steam_input_register()
728 input->open = steam_input_open; in steam_input_register()
729 input->close = steam_input_close; in steam_input_register()
731 input->name = (steam->quirks & STEAM_QUIRK_WIRELESS) ? "Wireless Steam Controller" : in steam_input_register()
734 input->phys = hdev->phys; in steam_input_register()
735 input->uniq = steam->serial_no; in steam_input_register()
736 input->id.bustype = hdev->bus; in steam_input_register()
737 input->id.vendor = hdev->vendor; in steam_input_register()
738 input->id.product = hdev->product; in steam_input_register()
739 input->id.version = hdev->version; in steam_input_register()
741 input_set_capability(input, EV_KEY, BTN_TR2); in steam_input_register()
742 input_set_capability(input, EV_KEY, BTN_TL2); in steam_input_register()
743 input_set_capability(input, EV_KEY, BTN_TR); in steam_input_register()
744 input_set_capability(input, EV_KEY, BTN_TL); in steam_input_register()
745 input_set_capability(input, EV_KEY, BTN_Y); in steam_input_register()
746 input_set_capability(input, EV_KEY, BTN_B); in steam_input_register()
747 input_set_capability(input, EV_KEY, BTN_X); in steam_input_register()
748 input_set_capability(input, EV_KEY, BTN_A); in steam_input_register()
749 input_set_capability(input, EV_KEY, BTN_DPAD_UP); in steam_input_register()
750 input_set_capability(input, EV_KEY, BTN_DPAD_RIGHT); in steam_input_register()
751 input_set_capability(input, EV_KEY, BTN_DPAD_LEFT); in steam_input_register()
752 input_set_capability(input, EV_KEY, BTN_DPAD_DOWN); in steam_input_register()
753 input_set_capability(input, EV_KEY, BTN_SELECT); in steam_input_register()
754 input_set_capability(input, EV_KEY, BTN_MODE); in steam_input_register()
755 input_set_capability(input, EV_KEY, BTN_START); in steam_input_register()
756 input_set_capability(input, EV_KEY, BTN_THUMBR); in steam_input_register()
757 input_set_capability(input, EV_KEY, BTN_THUMBL); in steam_input_register()
758 input_set_capability(input, EV_KEY, BTN_THUMB); in steam_input_register()
759 input_set_capability(input, EV_KEY, BTN_THUMB2); in steam_input_register()
761 input_set_capability(input, EV_KEY, BTN_BASE); in steam_input_register()
762 input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY1); in steam_input_register()
763 input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY2); in steam_input_register()
764 input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY3); in steam_input_register()
765 input_set_capability(input, EV_KEY, BTN_TRIGGER_HAPPY4); in steam_input_register()
767 input_set_capability(input, EV_KEY, BTN_GEAR_DOWN); in steam_input_register()
768 input_set_capability(input, EV_KEY, BTN_GEAR_UP); in steam_input_register()
771 input_set_abs_params(input, ABS_X, -32767, 32767, 0, 0); in steam_input_register()
772 input_set_abs_params(input, ABS_Y, -32767, 32767, 0, 0); in steam_input_register()
774 input_set_abs_params(input, ABS_HAT0X, -32767, 32767, in steam_input_register()
776 input_set_abs_params(input, ABS_HAT0Y, -32767, 32767, in steam_input_register()
780 input_set_abs_params(input, ABS_HAT2Y, 0, 32767, 0, 0); in steam_input_register()
781 input_set_abs_params(input, ABS_HAT2X, 0, 32767, 0, 0); in steam_input_register()
783 input_set_abs_params(input, ABS_RX, -32767, 32767, 0, 0); in steam_input_register()
784 input_set_abs_params(input, ABS_RY, -32767, 32767, 0, 0); in steam_input_register()
786 input_set_abs_params(input, ABS_HAT1X, -32767, 32767, in steam_input_register()
788 input_set_abs_params(input, ABS_HAT1Y, -32767, 32767, in steam_input_register()
791 input_abs_set_res(input, ABS_X, STEAM_DECK_JOYSTICK_RESOLUTION); in steam_input_register()
792 input_abs_set_res(input, ABS_Y, STEAM_DECK_JOYSTICK_RESOLUTION); in steam_input_register()
793 input_abs_set_res(input, ABS_RX, STEAM_DECK_JOYSTICK_RESOLUTION); in steam_input_register()
794 input_abs_set_res(input, ABS_RY, STEAM_DECK_JOYSTICK_RESOLUTION); in steam_input_register()
795 input_abs_set_res(input, ABS_HAT1X, STEAM_PAD_RESOLUTION); in steam_input_register()
796 input_abs_set_res(input, ABS_HAT1Y, STEAM_PAD_RESOLUTION); in steam_input_register()
797 input_abs_set_res(input, ABS_HAT2Y, STEAM_DECK_TRIGGER_RESOLUTION); in steam_input_register()
798 input_abs_set_res(input, ABS_HAT2X, STEAM_DECK_TRIGGER_RESOLUTION); in steam_input_register()
800 input_set_abs_params(input, ABS_HAT2Y, 0, 255, 0, 0); in steam_input_register()
801 input_set_abs_params(input, ABS_HAT2X, 0, 255, 0, 0); in steam_input_register()
803 input_set_abs_params(input, ABS_RX, -32767, 32767, in steam_input_register()
805 input_set_abs_params(input, ABS_RY, -32767, 32767, in steam_input_register()
808 input_abs_set_res(input, ABS_X, STEAM_JOYSTICK_RESOLUTION); in steam_input_register()
809 input_abs_set_res(input, ABS_Y, STEAM_JOYSTICK_RESOLUTION); in steam_input_register()
810 input_abs_set_res(input, ABS_RX, STEAM_PAD_RESOLUTION); in steam_input_register()
811 input_abs_set_res(input, ABS_RY, STEAM_PAD_RESOLUTION); in steam_input_register()
812 input_abs_set_res(input, ABS_HAT2Y, STEAM_TRIGGER_RESOLUTION); in steam_input_register()
813 input_abs_set_res(input, ABS_HAT2X, STEAM_TRIGGER_RESOLUTION); in steam_input_register()
815 input_abs_set_res(input, ABS_HAT0X, STEAM_PAD_RESOLUTION); in steam_input_register()
816 input_abs_set_res(input, ABS_HAT0Y, STEAM_PAD_RESOLUTION); in steam_input_register()
820 input_set_capability(input, EV_FF, FF_RUMBLE); in steam_input_register()
821 ret = input_ff_create_memless(input, NULL, steam_play_effect); in steam_input_register()
827 ret = input_register_device(input); in steam_input_register()
831 rcu_assign_pointer(steam->input, input); in steam_input_register()
835 input_free_device(input); in steam_input_register()
909 struct input_dev *input; in steam_input_unregister() local
911 input = rcu_dereference(steam->input); in steam_input_unregister()
913 if (!input) in steam_input_unregister()
915 RCU_INIT_POINTER(steam->input, NULL); in steam_input_unregister()
917 input_unregister_device(input); in steam_input_unregister()
1414 struct input_dev *input, u8 *data) in steam_do_input_event() argument
1425 input_report_abs(input, ABS_HAT2Y, data[11]); in steam_do_input_event()
1426 input_report_abs(input, ABS_HAT2X, data[12]); in steam_do_input_event()
1441 input_report_abs(input, lpad_touched ? ABS_HAT0X : ABS_X, x); in steam_do_input_event()
1442 input_report_abs(input, lpad_touched ? ABS_HAT0Y : ABS_Y, y); in steam_do_input_event()
1445 input_report_abs(input, ABS_X, 0); in steam_do_input_event()
1446 input_report_abs(input, ABS_Y, 0); in steam_do_input_event()
1450 input_report_abs(input, ABS_HAT0X, 0); in steam_do_input_event()
1451 input_report_abs(input, ABS_HAT0Y, 0); in steam_do_input_event()
1454 input_report_abs(input, ABS_RX, steam_le16(data + 20)); in steam_do_input_event()
1455 input_report_abs(input, ABS_RY, -steam_le16(data + 22)); in steam_do_input_event()
1457 input_event(input, EV_KEY, BTN_TR2, !!(b8 & BIT(0))); in steam_do_input_event()
1458 input_event(input, EV_KEY, BTN_TL2, !!(b8 & BIT(1))); in steam_do_input_event()
1459 input_event(input, EV_KEY, BTN_TR, !!(b8 & BIT(2))); in steam_do_input_event()
1460 input_event(input, EV_KEY, BTN_TL, !!(b8 & BIT(3))); in steam_do_input_event()
1461 input_event(input, EV_KEY, BTN_Y, !!(b8 & BIT(4))); in steam_do_input_event()
1462 input_event(input, EV_KEY, BTN_B, !!(b8 & BIT(5))); in steam_do_input_event()
1463 input_event(input, EV_KEY, BTN_X, !!(b8 & BIT(6))); in steam_do_input_event()
1464 input_event(input, EV_KEY, BTN_A, !!(b8 & BIT(7))); in steam_do_input_event()
1465 input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4))); in steam_do_input_event()
1466 input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5))); in steam_do_input_event()
1467 input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6))); in steam_do_input_event()
1468 input_event(input, EV_KEY, BTN_GEAR_DOWN, !!(b9 & BIT(7))); in steam_do_input_event()
1469 input_event(input, EV_KEY, BTN_GEAR_UP, !!(b10 & BIT(0))); in steam_do_input_event()
1470 input_event(input, EV_KEY, BTN_THUMBR, !!(b10 & BIT(2))); in steam_do_input_event()
1471 input_event(input, EV_KEY, BTN_THUMBL, !!(b10 & BIT(6))); in steam_do_input_event()
1472 input_event(input, EV_KEY, BTN_THUMB, lpad_touched || lpad_and_joy); in steam_do_input_event()
1473 input_event(input, EV_KEY, BTN_THUMB2, !!(b10 & BIT(4))); in steam_do_input_event()
1474 input_event(input, EV_KEY, BTN_DPAD_UP, !!(b9 & BIT(0))); in steam_do_input_event()
1475 input_event(input, EV_KEY, BTN_DPAD_RIGHT, !!(b9 & BIT(1))); in steam_do_input_event()
1476 input_event(input, EV_KEY, BTN_DPAD_LEFT, !!(b9 & BIT(2))); in steam_do_input_event()
1477 input_event(input, EV_KEY, BTN_DPAD_DOWN, !!(b9 & BIT(3))); in steam_do_input_event()
1479 input_sync(input); in steam_do_input_event()
1581 struct input_dev *input, u8 *data) in steam_do_deck_input_event() argument
1608 input_report_abs(input, ABS_HAT0X, steam_le16(data + 16)); in steam_do_deck_input_event()
1609 input_report_abs(input, ABS_HAT0Y, steam_le16(data + 18)); in steam_do_deck_input_event()
1611 input_report_abs(input, ABS_HAT0X, 0); in steam_do_deck_input_event()
1612 input_report_abs(input, ABS_HAT0Y, 0); in steam_do_deck_input_event()
1616 input_report_abs(input, ABS_HAT1X, steam_le16(data + 20)); in steam_do_deck_input_event()
1617 input_report_abs(input, ABS_HAT1Y, steam_le16(data + 22)); in steam_do_deck_input_event()
1619 input_report_abs(input, ABS_HAT1X, 0); in steam_do_deck_input_event()
1620 input_report_abs(input, ABS_HAT1Y, 0); in steam_do_deck_input_event()
1623 input_report_abs(input, ABS_X, steam_le16(data + 48)); in steam_do_deck_input_event()
1624 input_report_abs(input, ABS_Y, -steam_le16(data + 50)); in steam_do_deck_input_event()
1625 input_report_abs(input, ABS_RX, steam_le16(data + 52)); in steam_do_deck_input_event()
1626 input_report_abs(input, ABS_RY, -steam_le16(data + 54)); in steam_do_deck_input_event()
1628 input_report_abs(input, ABS_HAT2Y, steam_le16(data + 44)); in steam_do_deck_input_event()
1629 input_report_abs(input, ABS_HAT2X, steam_le16(data + 46)); in steam_do_deck_input_event()
1631 input_event(input, EV_KEY, BTN_TR2, !!(b8 & BIT(0))); in steam_do_deck_input_event()
1632 input_event(input, EV_KEY, BTN_TL2, !!(b8 & BIT(1))); in steam_do_deck_input_event()
1633 input_event(input, EV_KEY, BTN_TR, !!(b8 & BIT(2))); in steam_do_deck_input_event()
1634 input_event(input, EV_KEY, BTN_TL, !!(b8 & BIT(3))); in steam_do_deck_input_event()
1635 input_event(input, EV_KEY, BTN_Y, !!(b8 & BIT(4))); in steam_do_deck_input_event()
1636 input_event(input, EV_KEY, BTN_B, !!(b8 & BIT(5))); in steam_do_deck_input_event()
1637 input_event(input, EV_KEY, BTN_X, !!(b8 & BIT(6))); in steam_do_deck_input_event()
1638 input_event(input, EV_KEY, BTN_A, !!(b8 & BIT(7))); in steam_do_deck_input_event()
1639 input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4))); in steam_do_deck_input_event()
1640 input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5))); in steam_do_deck_input_event()
1641 input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6))); in steam_do_deck_input_event()
1642 input_event(input, EV_KEY, BTN_TRIGGER_HAPPY3, !!(b9 & BIT(7))); in steam_do_deck_input_event()
1643 input_event(input, EV_KEY, BTN_TRIGGER_HAPPY4, !!(b10 & BIT(0))); in steam_do_deck_input_event()
1644 input_event(input, EV_KEY, BTN_THUMBL, !!(b10 & BIT(6))); in steam_do_deck_input_event()
1645 input_event(input, EV_KEY, BTN_THUMBR, !!(b11 & BIT(2))); in steam_do_deck_input_event()
1646 input_event(input, EV_KEY, BTN_DPAD_UP, !!(b9 & BIT(0))); in steam_do_deck_input_event()
1647 input_event(input, EV_KEY, BTN_DPAD_RIGHT, !!(b9 & BIT(1))); in steam_do_deck_input_event()
1648 input_event(input, EV_KEY, BTN_DPAD_LEFT, !!(b9 & BIT(2))); in steam_do_deck_input_event()
1649 input_event(input, EV_KEY, BTN_DPAD_DOWN, !!(b9 & BIT(3))); in steam_do_deck_input_event()
1650 input_event(input, EV_KEY, BTN_THUMB, !!(b10 & BIT(1))); in steam_do_deck_input_event()
1651 input_event(input, EV_KEY, BTN_THUMB2, !!(b10 & BIT(2))); in steam_do_deck_input_event()
1652 input_event(input, EV_KEY, BTN_TRIGGER_HAPPY1, !!(b13 & BIT(1))); in steam_do_deck_input_event()
1653 input_event(input, EV_KEY, BTN_TRIGGER_HAPPY2, !!(b13 & BIT(2))); in steam_do_deck_input_event()
1654 input_event(input, EV_KEY, BTN_BASE, !!(b14 & BIT(2))); in steam_do_deck_input_event()
1656 input_sync(input); in steam_do_deck_input_event()
1721 struct input_dev *input; in steam_raw_event() local
1756 input = rcu_dereference(steam->input); in steam_raw_event()
1757 if (likely(input)) in steam_raw_event()
1758 steam_do_input_event(steam, input, data); in steam_raw_event()
1765 input = rcu_dereference(steam->input); in steam_raw_event()
1766 if (likely(input)) in steam_raw_event()
1767 steam_do_deck_input_event(steam, input, data); in steam_raw_event()