Lines Matching refs:input
118 struct input_dev __rcu *input; member
386 struct input_dev *input; in steam_input_register() local
390 input = rcu_dereference(steam->input); in steam_input_register()
392 if (input) { in steam_input_register()
397 input = input_allocate_device(); in steam_input_register()
398 if (!input) in steam_input_register()
401 input_set_drvdata(input, steam); in steam_input_register()
402 input->dev.parent = &hdev->dev; in steam_input_register()
403 input->open = steam_input_open; in steam_input_register()
404 input->close = steam_input_close; in steam_input_register()
406 input->name = (steam->quirks & STEAM_QUIRK_WIRELESS) ? in steam_input_register()
409 input->phys = hdev->phys; in steam_input_register()
410 input->uniq = steam->serial_no; in steam_input_register()
411 input->id.bustype = hdev->bus; in steam_input_register()
412 input->id.vendor = hdev->vendor; in steam_input_register()
413 input->id.product = hdev->product; in steam_input_register()
414 input->id.version = hdev->version; in steam_input_register()
416 input_set_capability(input, EV_KEY, BTN_TR2); in steam_input_register()
417 input_set_capability(input, EV_KEY, BTN_TL2); in steam_input_register()
418 input_set_capability(input, EV_KEY, BTN_TR); in steam_input_register()
419 input_set_capability(input, EV_KEY, BTN_TL); in steam_input_register()
420 input_set_capability(input, EV_KEY, BTN_Y); in steam_input_register()
421 input_set_capability(input, EV_KEY, BTN_B); in steam_input_register()
422 input_set_capability(input, EV_KEY, BTN_X); in steam_input_register()
423 input_set_capability(input, EV_KEY, BTN_A); in steam_input_register()
424 input_set_capability(input, EV_KEY, BTN_DPAD_UP); in steam_input_register()
425 input_set_capability(input, EV_KEY, BTN_DPAD_RIGHT); in steam_input_register()
426 input_set_capability(input, EV_KEY, BTN_DPAD_LEFT); in steam_input_register()
427 input_set_capability(input, EV_KEY, BTN_DPAD_DOWN); in steam_input_register()
428 input_set_capability(input, EV_KEY, BTN_SELECT); in steam_input_register()
429 input_set_capability(input, EV_KEY, BTN_MODE); in steam_input_register()
430 input_set_capability(input, EV_KEY, BTN_START); in steam_input_register()
431 input_set_capability(input, EV_KEY, BTN_GEAR_DOWN); in steam_input_register()
432 input_set_capability(input, EV_KEY, BTN_GEAR_UP); in steam_input_register()
433 input_set_capability(input, EV_KEY, BTN_THUMBR); in steam_input_register()
434 input_set_capability(input, EV_KEY, BTN_THUMBL); in steam_input_register()
435 input_set_capability(input, EV_KEY, BTN_THUMB); in steam_input_register()
436 input_set_capability(input, EV_KEY, BTN_THUMB2); in steam_input_register()
438 input_set_abs_params(input, ABS_HAT2Y, 0, 255, 0, 0); in steam_input_register()
439 input_set_abs_params(input, ABS_HAT2X, 0, 255, 0, 0); in steam_input_register()
440 input_set_abs_params(input, ABS_X, -32767, 32767, 0, 0); in steam_input_register()
441 input_set_abs_params(input, ABS_Y, -32767, 32767, 0, 0); in steam_input_register()
442 input_set_abs_params(input, ABS_RX, -32767, 32767, in steam_input_register()
444 input_set_abs_params(input, ABS_RY, -32767, 32767, in steam_input_register()
446 input_set_abs_params(input, ABS_HAT0X, -32767, 32767, in steam_input_register()
448 input_set_abs_params(input, ABS_HAT0Y, -32767, 32767, in steam_input_register()
450 input_abs_set_res(input, ABS_X, STEAM_JOYSTICK_RESOLUTION); in steam_input_register()
451 input_abs_set_res(input, ABS_Y, STEAM_JOYSTICK_RESOLUTION); in steam_input_register()
452 input_abs_set_res(input, ABS_RX, STEAM_PAD_RESOLUTION); in steam_input_register()
453 input_abs_set_res(input, ABS_RY, STEAM_PAD_RESOLUTION); in steam_input_register()
454 input_abs_set_res(input, ABS_HAT0X, STEAM_PAD_RESOLUTION); in steam_input_register()
455 input_abs_set_res(input, ABS_HAT0Y, STEAM_PAD_RESOLUTION); in steam_input_register()
456 input_abs_set_res(input, ABS_HAT2Y, STEAM_TRIGGER_RESOLUTION); in steam_input_register()
457 input_abs_set_res(input, ABS_HAT2X, STEAM_TRIGGER_RESOLUTION); in steam_input_register()
459 ret = input_register_device(input); in steam_input_register()
463 rcu_assign_pointer(steam->input, input); in steam_input_register()
467 input_free_device(input); in steam_input_register()
473 struct input_dev *input; in steam_input_unregister() local
475 input = rcu_dereference(steam->input); in steam_input_unregister()
477 if (!input) in steam_input_unregister()
479 RCU_INIT_POINTER(steam->input, NULL); in steam_input_unregister()
481 input_unregister_device(input); in steam_input_unregister()
918 struct input_dev *input, u8 *data) in steam_do_input_event() argument
929 input_report_abs(input, ABS_HAT2Y, data[11]); in steam_do_input_event()
930 input_report_abs(input, ABS_HAT2X, data[12]); in steam_do_input_event()
945 input_report_abs(input, lpad_touched ? ABS_HAT0X : ABS_X, x); in steam_do_input_event()
946 input_report_abs(input, lpad_touched ? ABS_HAT0Y : ABS_Y, y); in steam_do_input_event()
949 input_report_abs(input, ABS_X, 0); in steam_do_input_event()
950 input_report_abs(input, ABS_Y, 0); in steam_do_input_event()
954 input_report_abs(input, ABS_HAT0X, 0); in steam_do_input_event()
955 input_report_abs(input, ABS_HAT0Y, 0); in steam_do_input_event()
958 input_report_abs(input, ABS_RX, steam_le16(data + 20)); in steam_do_input_event()
959 input_report_abs(input, ABS_RY, -steam_le16(data + 22)); in steam_do_input_event()
961 input_event(input, EV_KEY, BTN_TR2, !!(b8 & BIT(0))); in steam_do_input_event()
962 input_event(input, EV_KEY, BTN_TL2, !!(b8 & BIT(1))); in steam_do_input_event()
963 input_event(input, EV_KEY, BTN_TR, !!(b8 & BIT(2))); in steam_do_input_event()
964 input_event(input, EV_KEY, BTN_TL, !!(b8 & BIT(3))); in steam_do_input_event()
965 input_event(input, EV_KEY, BTN_Y, !!(b8 & BIT(4))); in steam_do_input_event()
966 input_event(input, EV_KEY, BTN_B, !!(b8 & BIT(5))); in steam_do_input_event()
967 input_event(input, EV_KEY, BTN_X, !!(b8 & BIT(6))); in steam_do_input_event()
968 input_event(input, EV_KEY, BTN_A, !!(b8 & BIT(7))); in steam_do_input_event()
969 input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4))); in steam_do_input_event()
970 input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5))); in steam_do_input_event()
971 input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6))); in steam_do_input_event()
972 input_event(input, EV_KEY, BTN_GEAR_DOWN, !!(b9 & BIT(7))); in steam_do_input_event()
973 input_event(input, EV_KEY, BTN_GEAR_UP, !!(b10 & BIT(0))); in steam_do_input_event()
974 input_event(input, EV_KEY, BTN_THUMBR, !!(b10 & BIT(2))); in steam_do_input_event()
975 input_event(input, EV_KEY, BTN_THUMBL, !!(b10 & BIT(6))); in steam_do_input_event()
976 input_event(input, EV_KEY, BTN_THUMB, lpad_touched || lpad_and_joy); in steam_do_input_event()
977 input_event(input, EV_KEY, BTN_THUMB2, !!(b10 & BIT(4))); in steam_do_input_event()
978 input_event(input, EV_KEY, BTN_DPAD_UP, !!(b9 & BIT(0))); in steam_do_input_event()
979 input_event(input, EV_KEY, BTN_DPAD_RIGHT, !!(b9 & BIT(1))); in steam_do_input_event()
980 input_event(input, EV_KEY, BTN_DPAD_LEFT, !!(b9 & BIT(2))); in steam_do_input_event()
981 input_event(input, EV_KEY, BTN_DPAD_DOWN, !!(b9 & BIT(3))); in steam_do_input_event()
983 input_sync(input); in steam_do_input_event()
1022 struct input_dev *input; in steam_raw_event() local
1055 input = rcu_dereference(steam->input); in steam_raw_event()
1056 if (likely(input)) in steam_raw_event()
1057 steam_do_input_event(steam, input, data); in steam_raw_event()