Input: xpad - power off wireless 360 controllers on suspend
authorCameron Gutman <aicommander@gmail.com>
Wed, 27 Jul 2016 21:24:55 +0000 (14:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Dec 2018 08:48:02 +0000 (09:48 +0100)
commit7d17ca91d929c798d711daa4b98e12331b2e26c6
tree2d87c2868189bc0a484331aec1eaa5484125be1d
parent40b3de594d27f9a35aae808bd065e132ed6fa654
Input: xpad - power off wireless 360 controllers on suspend

[ Upstream commit f712a5a05228058f6b74635546549d4a46e117fc ]

When the USB wireless adapter is suspended, the controllers
lose their connection. This causes them to start flashing
their LED rings and searching for the wireless adapter
again, wasting the controller's battery power.

Instead, we will tell the controllers to power down when
we suspend. This mirrors the behavior of the controllers
when connected to the console itself and how the official
Xbox One wireless adapter behaves on Windows.

Signed-off-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/joystick/xpad.c