From 07514b25f0e596367f59545fa48acb26c1f708de Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Mon, 23 Nov 2020 11:39:52 +0000 Subject: [PATCH] tests: Add details of Sony DualSense (PS5) controller We only have details of the gamepad part for now. I've asked whether it also has accelerometer and touchpad device nodes like the PS4 controller did. Thanks: Sam Lantinga Signed-off-by: Simon McVittie <smcv@collabora.com> --- tests/input-device.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/input-device.c b/tests/input-device.c index f721a5916..9de1c2229 100644 --- a/tests/input-device.c +++ b/tests/input-device.c @@ -695,6 +695,24 @@ static const GuessTest guess_tests[] = /* 0x100 */ ZEROx4, 0x00, 0x00, 0xdb, 0x7c, }, }, + { + .name = "DualSense (PS5) - gamepad", + .bus_type = 0x0003, + .vendor_id = 0x054c, + .product_id = 0x0ce6, + .version = 0x111, + .expected = SRT_INPUT_DEVICE_TYPE_FLAGS_JOYSTICK, + /* SYN, KEY, ABS */ + .ev = { 0x0b }, + /* X, Y, Z, RX, RY, RZ, HAT0X, HAT0Y */ + .abs = { 0x3f, 0x00, 0x03 }, + .keys = { + /* 0x00-0xff */ ZEROx8, ZEROx8, ZEROx8, ZEROx8, + /* ABC, XYZ, TL, TR, TL2, TR2, select, start, mode, thumbl, + * thumbr */ + /* 0x100 */ ZEROx4, 0x00, 0x00, 0xff, 0x7f, + }, + }, { .name = "DualShock 4 - gamepad", .bus_type = 0x0003, -- GitLab