]> git.baikalelectronics.ru Git - kernel.git/commit
Input: xpad - correctly handle concurrent LED and FF requests
authorPavel Rojtberg <rojtberg@gmail.com>
Wed, 9 Dec 2015 19:57:01 +0000 (11:57 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 4 Jan 2016 19:39:38 +0000 (11:39 -0800)
commit2ae04a42c1b0841d82c14f6a7beee00903e513ca
treeda2f8d034b5a494a6eaf962465bdbe97e72474b7
parenta7beabd29ce9aa6366f31b6542b5a5e0ca3212c1
Input: xpad - correctly handle concurrent LED and FF requests

Track the status of the irq_out URB to prevent submission iof new requests
while current one is active. Failure to do so results in the "URB submitted
while active" warning/stack trace.

Store pending brightness and FF effect in the driver structure and replace
it with the latest requests until the device is ready to process next
request. Alternate serving LED vs FF requests to make sure one does not
starve another. See [1] for discussion. Inspired by patch of Sarah Bessmer
[2].

[1]: http://www.spinics.net/lists/linux-input/msg40708.html
[2]: http://www.spinics.net/lists/linux-input/msg31450.html

Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/joystick/xpad.c