HID: sony: Save and restore the controller state on suspend and resume
On hardware which provides standby power for charging devices the state of the
LEDs and force-feedback on controllers can persist even when the system is in
standby. Additionally, the state of the controllers on resume may be different
from the state they were in at the time when they were suspended (ie. LEDs are
cleared on resume).
This implements the suspend and resume callbacks which saves and clears the
state of the LEDs on suspend and restores them on resume. Force-feedback is
stopped on suspend but not automatically restored on resume until a new event is
received to avoid potentially damaging hardware.
USB Sixaxis and navigation controllers must be reinitialized when the hardware
is reset on resume or they won't send any input reports.
Signed-off-by: Frank Praznik <frank.praznik@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>