]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: applesmc: restore accelerometer and keyboard backlight on resume
authorHenrik Rydberg <rydberg@euromail.se>
Tue, 22 Sep 2009 00:04:50 +0000 (17:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Sep 2009 14:17:49 +0000 (07:17 -0700)
commitf0ed9b2408d7e66a3e0f0cce8fc3d7733ca8fe70
tree36c0c1b9d424649421dde1f1d553bd17179a5264
parent25cd5c9b95eab3582b9430fc49d5d01962d9ccff
hwmon: applesmc: restore accelerometer and keyboard backlight on resume

On resume from suspend, the driver currently resets the logical state as
if it was brought up from halt.  This patch uses the
dev_pm_ops.resume/restore methods to synchronize the hardware with the
memorized logical state, in effect bringing back the accelerometer and
backlight to the state prior to suspend.  Works for both suspend to ram
and hibernation.  The patch has zero effect on the running state.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Cc: Nicolas Boichat <nicolas@boichat.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/hwmon/applesmc.c