diff options
author | Thomas Kuehne <thomas.kuehne@gmx.li> | 2024-04-13 12:39:17 +0000 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.com> | 2024-05-06 23:16:41 +0200 |
commit | 311e435c9b918ee45ba2ed2791ea4d848f5b05e5 (patch) | |
tree | cae5ee51caa1053192889ae6a3f02a15379623c5 | |
parent | 132ea824930d485ab82c1635cb4b0b38db95eb80 (diff) |
HID: hid-debug: add EV_FF and FF_STATUS mappings
Currently hid-debug only output question marks for all force
feedback related input mapping making debugging gamepads
with force feedback a challenge.
This adds the necessary mapping information to output
EV_FF and FF_STATUS related information.
Signed-off-by: Thomas Kuehne <thomas.kuehne@gmx.li>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
-rw-r--r-- | drivers/hid/hid-debug.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index 28b458fc6972..87a961cae775 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c @@ -3572,12 +3572,38 @@ static const char *software[SW_CNT] = { [SW_MACHINE_COVER] = "MachineCover", }; +static const char *force[FF_CNT] = { + [FF_RUMBLE] = "FF_RUMBLE", + [FF_PERIODIC] = "FF_PERIODIC", + [FF_CONSTANT] = "FF_CONSTANT", + [FF_SPRING] = "FF_SPRING", + [FF_FRICTION] = "FF_FRICTION", + [FF_DAMPER] = "FF_DAMPER", + [FF_INERTIA] = "FF_INERTIA", + [FF_RAMP] = "FF_RAMP", + [FF_SQUARE] = "FF_SQUARE", + [FF_TRIANGLE] = "FF_TRIANGLE", + [FF_SINE] = "FF_SINE", + [FF_SAW_UP] = "FF_SAW_UP", + [FF_SAW_DOWN] = "FF_SAW_DOWN", + [FF_CUSTOM] = "FF_CUSTOM", + [FF_GAIN] = "FF_GAIN", + [FF_AUTOCENTER] = "FF_AUTOCENTER", + [FF_MAX] = "FF_MAX", +}; + +static const char *force_status[FF_STATUS_MAX + 1] = { + [FF_STATUS_STOPPED] = "FF_STATUS_STOPPED", + [FF_STATUS_PLAYING] = "FF_STATUS_PLAYING", +}; + static const char **names[EV_MAX + 1] = { [EV_SYN] = syncs, [EV_KEY] = keys, [EV_REL] = relatives, [EV_ABS] = absolutes, [EV_MSC] = misc, [EV_LED] = leds, [EV_SND] = sounds, [EV_REP] = repeats, - [EV_SW] = software, + [EV_SW] = software, [EV_FF] = force, + [EV_FF_STATUS] = force_status, }; static void hid_resolv_event(__u8 type, __u16 code, struct seq_file *f) |