Lines Matching refs:input

299 	struct input_dev __rcu *input;  member
709 struct input_dev *input; in steam_input_register() local
713 input = rcu_dereference(steam->input); in steam_input_register()
715 if (input) { in steam_input_register()
720 input = input_allocate_device(); in steam_input_register()
721 if (!input) in steam_input_register()
724 input_set_drvdata(input, steam); in steam_input_register()
725 input->dev.parent = &hdev->dev; in steam_input_register()
726 input->open = steam_input_open; in steam_input_register()
727 input->close = steam_input_close; in steam_input_register()
729 input->name = (steam->quirks & STEAM_QUIRK_WIRELESS) ? "Wireless Steam Controller" : in steam_input_register()
732 input->phys = hdev->phys; in steam_input_register()
733 input->uniq = steam->serial_no; in steam_input_register()
734 input->id.bustype = hdev->bus; in steam_input_register()
735 input->id.vendor = hdev->vendor; in steam_input_register()
736 input->id.product = hdev->product; in steam_input_register()
737 input->id.version = hdev->version; in steam_input_register()
739 input_set_capability(input, EV_KEY, BTN_TR2); in steam_input_register()
740 input_set_capability(input, EV_KEY, BTN_TL2); in steam_input_register()
741 input_set_capability(input, EV_KEY, BTN_TR); in steam_input_register()
742 input_set_capability(input, EV_KEY, BTN_TL); in steam_input_register()
743 input_set_capability(input, EV_KEY, BTN_Y); in steam_input_register()
744 input_set_capability(input, EV_KEY, BTN_B); in steam_input_register()
745 input_set_capability(input, EV_KEY, BTN_X); in steam_input_register()
746 input_set_capability(input, EV_KEY, BTN_A); in steam_input_register()
747 input_set_capability(input, EV_KEY, BTN_DPAD_UP); in steam_input_register()
748 input_set_capability(input, EV_KEY, BTN_DPAD_RIGHT); in steam_input_register()
749 input_set_capability(input, EV_KEY, BTN_DPAD_LEFT); in steam_input_register()
750 input_set_capability(input, EV_KEY, BTN_DPAD_DOWN); in steam_input_register()
751 input_set_capability(input, EV_KEY, BTN_SELECT); in steam_input_register()
752 input_set_capability(input, EV_KEY, BTN_MODE); in steam_input_register()
753 input_set_capability(input, EV_KEY, BTN_START); in steam_input_register()
754 input_set_capability(input, EV_KEY, BTN_THUMBR); in steam_input_register()
755 input_set_capability(input, EV_KEY, BTN_THUMBL); in steam_input_register()
756 input_set_capability(input, EV_KEY, BTN_THUMB); in steam_input_register()
757 input_set_capability(input, EV_KEY, BTN_THUMB2); in steam_input_register()
758 input_set_capability(input, EV_KEY, BTN_GRIPL); in steam_input_register()
759 input_set_capability(input, EV_KEY, BTN_GRIPR); 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_GRIPL2); in steam_input_register()
763 input_set_capability(input, EV_KEY, BTN_GRIPR2); in steam_input_register()
766 input_set_abs_params(input, ABS_X, -32767, 32767, 0, 0); in steam_input_register()
767 input_set_abs_params(input, ABS_Y, -32767, 32767, 0, 0); in steam_input_register()
769 input_set_abs_params(input, ABS_HAT0X, -32767, 32767, in steam_input_register()
771 input_set_abs_params(input, ABS_HAT0Y, -32767, 32767, in steam_input_register()
775 input_set_abs_params(input, ABS_HAT2Y, 0, 32767, 0, 0); in steam_input_register()
776 input_set_abs_params(input, ABS_HAT2X, 0, 32767, 0, 0); in steam_input_register()
778 input_set_abs_params(input, ABS_RX, -32767, 32767, 0, 0); in steam_input_register()
779 input_set_abs_params(input, ABS_RY, -32767, 32767, 0, 0); in steam_input_register()
781 input_set_abs_params(input, ABS_HAT1X, -32767, 32767, in steam_input_register()
783 input_set_abs_params(input, ABS_HAT1Y, -32767, 32767, in steam_input_register()
786 input_abs_set_res(input, ABS_X, STEAM_DECK_JOYSTICK_RESOLUTION); in steam_input_register()
787 input_abs_set_res(input, ABS_Y, STEAM_DECK_JOYSTICK_RESOLUTION); in steam_input_register()
788 input_abs_set_res(input, ABS_RX, STEAM_DECK_JOYSTICK_RESOLUTION); in steam_input_register()
789 input_abs_set_res(input, ABS_RY, STEAM_DECK_JOYSTICK_RESOLUTION); in steam_input_register()
790 input_abs_set_res(input, ABS_HAT1X, STEAM_PAD_RESOLUTION); in steam_input_register()
791 input_abs_set_res(input, ABS_HAT1Y, STEAM_PAD_RESOLUTION); in steam_input_register()
792 input_abs_set_res(input, ABS_HAT2Y, STEAM_DECK_TRIGGER_RESOLUTION); in steam_input_register()
793 input_abs_set_res(input, ABS_HAT2X, STEAM_DECK_TRIGGER_RESOLUTION); in steam_input_register()
795 input_set_abs_params(input, ABS_HAT2Y, 0, 255, 0, 0); in steam_input_register()
796 input_set_abs_params(input, ABS_HAT2X, 0, 255, 0, 0); in steam_input_register()
798 input_set_abs_params(input, ABS_RX, -32767, 32767, in steam_input_register()
800 input_set_abs_params(input, ABS_RY, -32767, 32767, in steam_input_register()
803 input_abs_set_res(input, ABS_X, STEAM_JOYSTICK_RESOLUTION); in steam_input_register()
804 input_abs_set_res(input, ABS_Y, STEAM_JOYSTICK_RESOLUTION); in steam_input_register()
805 input_abs_set_res(input, ABS_RX, STEAM_PAD_RESOLUTION); in steam_input_register()
806 input_abs_set_res(input, ABS_RY, STEAM_PAD_RESOLUTION); in steam_input_register()
807 input_abs_set_res(input, ABS_HAT2Y, STEAM_TRIGGER_RESOLUTION); in steam_input_register()
808 input_abs_set_res(input, ABS_HAT2X, STEAM_TRIGGER_RESOLUTION); in steam_input_register()
810 input_abs_set_res(input, ABS_HAT0X, STEAM_PAD_RESOLUTION); in steam_input_register()
811 input_abs_set_res(input, ABS_HAT0Y, STEAM_PAD_RESOLUTION); in steam_input_register()
815 input_set_capability(input, EV_FF, FF_RUMBLE); in steam_input_register()
816 ret = input_ff_create_memless(input, NULL, steam_play_effect); in steam_input_register()
822 ret = input_register_device(input); in steam_input_register()
826 rcu_assign_pointer(steam->input, input); in steam_input_register()
830 input_free_device(input); in steam_input_register()
904 struct input_dev *input; in steam_input_unregister() local
906 input = rcu_dereference(steam->input); in steam_input_unregister()
908 if (!input) in steam_input_unregister()
910 RCU_INIT_POINTER(steam->input, NULL); in steam_input_unregister()
912 input_unregister_device(input); in steam_input_unregister()
1431 struct input_dev *input, u8 *data) in steam_do_input_event() argument
1442 input_report_abs(input, ABS_HAT2Y, data[11]); in steam_do_input_event()
1443 input_report_abs(input, ABS_HAT2X, data[12]); in steam_do_input_event()
1458 input_report_abs(input, lpad_touched ? ABS_HAT0X : ABS_X, x); in steam_do_input_event()
1459 input_report_abs(input, lpad_touched ? ABS_HAT0Y : ABS_Y, y); in steam_do_input_event()
1462 input_report_abs(input, ABS_X, 0); in steam_do_input_event()
1463 input_report_abs(input, ABS_Y, 0); in steam_do_input_event()
1467 input_report_abs(input, ABS_HAT0X, 0); in steam_do_input_event()
1468 input_report_abs(input, ABS_HAT0Y, 0); in steam_do_input_event()
1471 input_report_abs(input, ABS_RX, steam_le16(data + 20)); in steam_do_input_event()
1472 input_report_abs(input, ABS_RY, -steam_le16(data + 22)); in steam_do_input_event()
1474 input_event(input, EV_KEY, BTN_TR2, !!(b8 & BIT(0))); in steam_do_input_event()
1475 input_event(input, EV_KEY, BTN_TL2, !!(b8 & BIT(1))); in steam_do_input_event()
1476 input_event(input, EV_KEY, BTN_TR, !!(b8 & BIT(2))); in steam_do_input_event()
1477 input_event(input, EV_KEY, BTN_TL, !!(b8 & BIT(3))); in steam_do_input_event()
1478 input_event(input, EV_KEY, BTN_Y, !!(b8 & BIT(4))); in steam_do_input_event()
1479 input_event(input, EV_KEY, BTN_B, !!(b8 & BIT(5))); in steam_do_input_event()
1480 input_event(input, EV_KEY, BTN_X, !!(b8 & BIT(6))); in steam_do_input_event()
1481 input_event(input, EV_KEY, BTN_A, !!(b8 & BIT(7))); in steam_do_input_event()
1482 input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4))); in steam_do_input_event()
1483 input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5))); in steam_do_input_event()
1484 input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6))); in steam_do_input_event()
1485 input_event(input, EV_KEY, BTN_GRIPL, !!(b9 & BIT(7))); in steam_do_input_event()
1486 input_event(input, EV_KEY, BTN_GRIPR, !!(b10 & BIT(0))); in steam_do_input_event()
1487 input_event(input, EV_KEY, BTN_THUMBR, !!(b10 & BIT(2))); in steam_do_input_event()
1488 input_event(input, EV_KEY, BTN_THUMBL, !!(b10 & BIT(6))); in steam_do_input_event()
1489 input_event(input, EV_KEY, BTN_THUMB, lpad_touched || lpad_and_joy); in steam_do_input_event()
1490 input_event(input, EV_KEY, BTN_THUMB2, !!(b10 & BIT(4))); in steam_do_input_event()
1491 input_event(input, EV_KEY, BTN_DPAD_UP, !!(b9 & BIT(0))); in steam_do_input_event()
1492 input_event(input, EV_KEY, BTN_DPAD_RIGHT, !!(b9 & BIT(1))); in steam_do_input_event()
1493 input_event(input, EV_KEY, BTN_DPAD_LEFT, !!(b9 & BIT(2))); in steam_do_input_event()
1494 input_event(input, EV_KEY, BTN_DPAD_DOWN, !!(b9 & BIT(3))); in steam_do_input_event()
1496 input_sync(input); in steam_do_input_event()
1598 struct input_dev *input, u8 *data) in steam_do_deck_input_event() argument
1625 input_report_abs(input, ABS_HAT0X, steam_le16(data + 16)); in steam_do_deck_input_event()
1626 input_report_abs(input, ABS_HAT0Y, steam_le16(data + 18)); in steam_do_deck_input_event()
1628 input_report_abs(input, ABS_HAT0X, 0); in steam_do_deck_input_event()
1629 input_report_abs(input, ABS_HAT0Y, 0); in steam_do_deck_input_event()
1633 input_report_abs(input, ABS_HAT1X, steam_le16(data + 20)); in steam_do_deck_input_event()
1634 input_report_abs(input, ABS_HAT1Y, steam_le16(data + 22)); in steam_do_deck_input_event()
1636 input_report_abs(input, ABS_HAT1X, 0); in steam_do_deck_input_event()
1637 input_report_abs(input, ABS_HAT1Y, 0); in steam_do_deck_input_event()
1640 input_report_abs(input, ABS_X, steam_le16(data + 48)); in steam_do_deck_input_event()
1641 input_report_abs(input, ABS_Y, -steam_le16(data + 50)); in steam_do_deck_input_event()
1642 input_report_abs(input, ABS_RX, steam_le16(data + 52)); in steam_do_deck_input_event()
1643 input_report_abs(input, ABS_RY, -steam_le16(data + 54)); in steam_do_deck_input_event()
1645 input_report_abs(input, ABS_HAT2Y, steam_le16(data + 44)); in steam_do_deck_input_event()
1646 input_report_abs(input, ABS_HAT2X, steam_le16(data + 46)); in steam_do_deck_input_event()
1648 input_event(input, EV_KEY, BTN_TR2, !!(b8 & BIT(0))); in steam_do_deck_input_event()
1649 input_event(input, EV_KEY, BTN_TL2, !!(b8 & BIT(1))); in steam_do_deck_input_event()
1650 input_event(input, EV_KEY, BTN_TR, !!(b8 & BIT(2))); in steam_do_deck_input_event()
1651 input_event(input, EV_KEY, BTN_TL, !!(b8 & BIT(3))); in steam_do_deck_input_event()
1652 input_event(input, EV_KEY, BTN_Y, !!(b8 & BIT(4))); in steam_do_deck_input_event()
1653 input_event(input, EV_KEY, BTN_B, !!(b8 & BIT(5))); in steam_do_deck_input_event()
1654 input_event(input, EV_KEY, BTN_X, !!(b8 & BIT(6))); in steam_do_deck_input_event()
1655 input_event(input, EV_KEY, BTN_A, !!(b8 & BIT(7))); in steam_do_deck_input_event()
1656 input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4))); in steam_do_deck_input_event()
1657 input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5))); in steam_do_deck_input_event()
1658 input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6))); in steam_do_deck_input_event()
1659 input_event(input, EV_KEY, BTN_GRIPL2, !!(b9 & BIT(7))); in steam_do_deck_input_event()
1660 input_event(input, EV_KEY, BTN_GRIPR2, !!(b10 & BIT(0))); in steam_do_deck_input_event()
1661 input_event(input, EV_KEY, BTN_THUMBL, !!(b10 & BIT(6))); in steam_do_deck_input_event()
1662 input_event(input, EV_KEY, BTN_THUMBR, !!(b11 & BIT(2))); in steam_do_deck_input_event()
1663 input_event(input, EV_KEY, BTN_DPAD_UP, !!(b9 & BIT(0))); in steam_do_deck_input_event()
1664 input_event(input, EV_KEY, BTN_DPAD_RIGHT, !!(b9 & BIT(1))); in steam_do_deck_input_event()
1665 input_event(input, EV_KEY, BTN_DPAD_LEFT, !!(b9 & BIT(2))); in steam_do_deck_input_event()
1666 input_event(input, EV_KEY, BTN_DPAD_DOWN, !!(b9 & BIT(3))); in steam_do_deck_input_event()
1667 input_event(input, EV_KEY, BTN_THUMB, !!(b10 & BIT(1))); in steam_do_deck_input_event()
1668 input_event(input, EV_KEY, BTN_THUMB2, !!(b10 & BIT(2))); in steam_do_deck_input_event()
1669 input_event(input, EV_KEY, BTN_GRIPL, !!(b13 & BIT(1))); in steam_do_deck_input_event()
1670 input_event(input, EV_KEY, BTN_GRIPR, !!(b13 & BIT(2))); in steam_do_deck_input_event()
1671 input_event(input, EV_KEY, BTN_BASE, !!(b14 & BIT(2))); in steam_do_deck_input_event()
1673 input_sync(input); in steam_do_deck_input_event()
1738 struct input_dev *input; in steam_raw_event() local
1773 input = rcu_dereference(steam->input); in steam_raw_event()
1774 if (likely(input)) in steam_raw_event()
1775 steam_do_input_event(steam, input, data); in steam_raw_event()
1782 input = rcu_dereference(steam->input); in steam_raw_event()
1783 if (likely(input)) in steam_raw_event()
1784 steam_do_deck_input_event(steam, input, data); in steam_raw_event()