]> git.baikalelectronics.ru Git - kernel.git/commit
HID: sony: Save and restore the controller state on suspend and resume
authorFrank Praznik <frank.praznik@gmail.com>
Wed, 11 Nov 2015 14:49:38 +0000 (09:49 -0500)
committerJiri Kosina <jkosina@suse.cz>
Thu, 19 Nov 2015 10:16:13 +0000 (11:16 +0100)
commit349c13c39ab64869f7982e9e81f1c5de1abcbcb6
treea9f7db8979aaff92e253f0787737eac43ebebc4c
parentb6045680490ec0a55e8e27dc063710f6365d3efc
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>
drivers/hid/hid-sony.c