HID: hid-playstation: DS4: Update rumble and lightbar together
authorMax Staudt <max@enpas.org>
Sun, 11 Aug 2024 13:09:06 +0000 (22:09 +0900)
committerJiri Kosina <jkosina@suse.com>
Wed, 21 Aug 2024 22:24:09 +0000 (00:24 +0200)
commit2933aa8b77be957d57d1a1ba71617e09cdaa2cbb
treecd0b88968ce0bea3ccdc5bd90bc7a93b207973e6
parent6e4436539ae182dc86d57d13849862bcafaa4709
HID: hid-playstation: DS4: Update rumble and lightbar together

Some 3rd party gamepads expect updates to rumble and lightbar together,
and setting one may cancel the other.

Let's maximise compatibility by always sending rumble and lightbar
updates together, even when only one has been scheduled.

Further background reading:

- Apparently the PS4 always sends rumble and lightbar updates together:

  https://eleccelerator.com/wiki/index.php?title=DualShock_4#0x11_2

- 3rd party gamepads may not implement lightbar_blink, and may simply
  ignore updates with 0x07 set, according to:

  https://github.com/Ryochan7/DS4Windows/pull/1839

[jkosina@suse.com: fix shortlog]
Acked-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Max Staudt <max@enpas.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-playstation.c