Lines Matching full:gamepad
153 struct input_dev *gamepad; member
368 struct input_dev *gamepad; member
515 * Common gamepad buttons across DualShock 3 / 4 and DualSense.
713 struct input_dev *gamepad; in ps_gamepad_create() local
717 gamepad = ps_allocate_input_dev(hdev, NULL); in ps_gamepad_create()
718 if (IS_ERR(gamepad)) in ps_gamepad_create()
719 return ERR_CAST(gamepad); in ps_gamepad_create()
721 input_set_abs_params(gamepad, ABS_X, 0, 255, 0, 0); in ps_gamepad_create()
722 input_set_abs_params(gamepad, ABS_Y, 0, 255, 0, 0); in ps_gamepad_create()
723 input_set_abs_params(gamepad, ABS_Z, 0, 255, 0, 0); in ps_gamepad_create()
724 input_set_abs_params(gamepad, ABS_RX, 0, 255, 0, 0); in ps_gamepad_create()
725 input_set_abs_params(gamepad, ABS_RY, 0, 255, 0, 0); in ps_gamepad_create()
726 input_set_abs_params(gamepad, ABS_RZ, 0, 255, 0, 0); in ps_gamepad_create()
728 input_set_abs_params(gamepad, ABS_HAT0X, -1, 1, 0, 0); in ps_gamepad_create()
729 input_set_abs_params(gamepad, ABS_HAT0Y, -1, 1, 0, 0); in ps_gamepad_create()
732 input_set_capability(gamepad, EV_KEY, ps_gamepad_buttons[i]); in ps_gamepad_create()
736 input_set_capability(gamepad, EV_FF, FF_RUMBLE); in ps_gamepad_create()
737 input_ff_create_memless(gamepad, NULL, play_effect); in ps_gamepad_create()
741 ret = input_register_device(gamepad); in ps_gamepad_create()
745 return gamepad; in ps_gamepad_create()
1352 input_report_abs(ds->gamepad, ABS_X, ds_report->x); in dualsense_parse_report()
1353 input_report_abs(ds->gamepad, ABS_Y, ds_report->y); in dualsense_parse_report()
1354 input_report_abs(ds->gamepad, ABS_RX, ds_report->rx); in dualsense_parse_report()
1355 input_report_abs(ds->gamepad, ABS_RY, ds_report->ry); in dualsense_parse_report()
1356 input_report_abs(ds->gamepad, ABS_Z, ds_report->z); in dualsense_parse_report()
1357 input_report_abs(ds->gamepad, ABS_RZ, ds_report->rz); in dualsense_parse_report()
1362 input_report_abs(ds->gamepad, ABS_HAT0X, ps_gamepad_hat_mapping[value].x); in dualsense_parse_report()
1363 input_report_abs(ds->gamepad, ABS_HAT0Y, ps_gamepad_hat_mapping[value].y); in dualsense_parse_report()
1365 input_report_key(ds->gamepad, BTN_WEST, ds_report->buttons[0] & DS_BUTTONS0_SQUARE); in dualsense_parse_report()
1366 input_report_key(ds->gamepad, BTN_SOUTH, ds_report->buttons[0] & DS_BUTTONS0_CROSS); in dualsense_parse_report()
1367 input_report_key(ds->gamepad, BTN_EAST, ds_report->buttons[0] & DS_BUTTONS0_CIRCLE); in dualsense_parse_report()
1368 input_report_key(ds->gamepad, BTN_NORTH, ds_report->buttons[0] & DS_BUTTONS0_TRIANGLE); in dualsense_parse_report()
1369 input_report_key(ds->gamepad, BTN_TL, ds_report->buttons[1] & DS_BUTTONS1_L1); in dualsense_parse_report()
1370 input_report_key(ds->gamepad, BTN_TR, ds_report->buttons[1] & DS_BUTTONS1_R1); in dualsense_parse_report()
1371 input_report_key(ds->gamepad, BTN_TL2, ds_report->buttons[1] & DS_BUTTONS1_L2); in dualsense_parse_report()
1372 input_report_key(ds->gamepad, BTN_TR2, ds_report->buttons[1] & DS_BUTTONS1_R2); in dualsense_parse_report()
1373 input_report_key(ds->gamepad, BTN_SELECT, ds_report->buttons[1] & DS_BUTTONS1_CREATE); in dualsense_parse_report()
1374 input_report_key(ds->gamepad, BTN_START, ds_report->buttons[1] & DS_BUTTONS1_OPTIONS); in dualsense_parse_report()
1375 input_report_key(ds->gamepad, BTN_THUMBL, ds_report->buttons[1] & DS_BUTTONS1_L3); in dualsense_parse_report()
1376 input_report_key(ds->gamepad, BTN_THUMBR, ds_report->buttons[1] & DS_BUTTONS1_R3); in dualsense_parse_report()
1377 input_report_key(ds->gamepad, BTN_MODE, ds_report->buttons[2] & DS_BUTTONS2_PS_HOME); in dualsense_parse_report()
1378 input_sync(ds->gamepad); in dualsense_parse_report()
1669 ds->gamepad = ps_gamepad_create(hdev, dualsense_play_effect); in dualsense_create()
1670 if (IS_ERR(ds->gamepad)) { in dualsense_create()
1671 ret = PTR_ERR(ds->gamepad); in dualsense_create()
1674 /* Use gamepad input device name as primary device name for e.g. LEDs */ in dualsense_create()
1675 ps_dev->input_dev_name = dev_name(&ds->gamepad->dev); in dualsense_create()
2275 input_report_abs(ds4->gamepad, ABS_X, ds4_report->x); in dualshock4_parse_report()
2276 input_report_abs(ds4->gamepad, ABS_Y, ds4_report->y); in dualshock4_parse_report()
2277 input_report_abs(ds4->gamepad, ABS_RX, ds4_report->rx); in dualshock4_parse_report()
2278 input_report_abs(ds4->gamepad, ABS_RY, ds4_report->ry); in dualshock4_parse_report()
2279 input_report_abs(ds4->gamepad, ABS_Z, ds4_report->z); in dualshock4_parse_report()
2280 input_report_abs(ds4->gamepad, ABS_RZ, ds4_report->rz); in dualshock4_parse_report()
2285 input_report_abs(ds4->gamepad, ABS_HAT0X, ps_gamepad_hat_mapping[value].x); in dualshock4_parse_report()
2286 input_report_abs(ds4->gamepad, ABS_HAT0Y, ps_gamepad_hat_mapping[value].y); in dualshock4_parse_report()
2288 input_report_key(ds4->gamepad, BTN_WEST, ds4_report->buttons[0] & DS_BUTTONS0_SQUARE); in dualshock4_parse_report()
2289 input_report_key(ds4->gamepad, BTN_SOUTH, ds4_report->buttons[0] & DS_BUTTONS0_CROSS); in dualshock4_parse_report()
2290 input_report_key(ds4->gamepad, BTN_EAST, ds4_report->buttons[0] & DS_BUTTONS0_CIRCLE); in dualshock4_parse_report()
2291 input_report_key(ds4->gamepad, BTN_NORTH, ds4_report->buttons[0] & DS_BUTTONS0_TRIANGLE); in dualshock4_parse_report()
2292 input_report_key(ds4->gamepad, BTN_TL, ds4_report->buttons[1] & DS_BUTTONS1_L1); in dualshock4_parse_report()
2293 input_report_key(ds4->gamepad, BTN_TR, ds4_report->buttons[1] & DS_BUTTONS1_R1); in dualshock4_parse_report()
2294 input_report_key(ds4->gamepad, BTN_TL2, ds4_report->buttons[1] & DS_BUTTONS1_L2); in dualshock4_parse_report()
2295 input_report_key(ds4->gamepad, BTN_TR2, ds4_report->buttons[1] & DS_BUTTONS1_R2); in dualshock4_parse_report()
2296 input_report_key(ds4->gamepad, BTN_SELECT, ds4_report->buttons[1] & DS_BUTTONS1_CREATE); in dualshock4_parse_report()
2297 input_report_key(ds4->gamepad, BTN_START, ds4_report->buttons[1] & DS_BUTTONS1_OPTIONS); in dualshock4_parse_report()
2298 input_report_key(ds4->gamepad, BTN_THUMBL, ds4_report->buttons[1] & DS_BUTTONS1_L3); in dualshock4_parse_report()
2299 input_report_key(ds4->gamepad, BTN_THUMBR, ds4_report->buttons[1] & DS_BUTTONS1_R3); in dualshock4_parse_report()
2300 input_report_key(ds4->gamepad, BTN_MODE, ds4_report->buttons[2] & DS_BUTTONS2_PS_HOME); in dualshock4_parse_report()
2301 input_sync(ds4->gamepad); in dualshock4_parse_report()
2628 ds4->gamepad = ps_gamepad_create(hdev, dualshock4_play_effect); in dualshock4_create()
2629 if (IS_ERR(ds4->gamepad)) { in dualshock4_create()
2630 ret = PTR_ERR(ds4->gamepad); in dualshock4_create()
2634 /* Use gamepad input device name as primary device name for e.g. LEDs */ in dualshock4_create()
2635 ps_dev->input_dev_name = dev_name(&ds4->gamepad->dev); in dualshock4_create()