aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/nvec
diff options
context:
space:
mode:
authorMarc Dietrich <marvin24@gmx.de>2011-12-26 17:57:36 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-31 10:27:58 -0800
commita573298b81ffd05856ddaa222826471eabf3953b (patch)
treee2830a7743a96e087b001c521132ea71fa22f5b8 /drivers/staging/nvec
parent0eedab704ed93d03b1ac392fd329f7ed20ab2279 (diff)
staging: nvec: ps2: disable/enable mouse on suspend/resume
This change makes the touchpad buttons work after suspend/resume. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Julian Andres Klode <jak@jak-linux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/nvec')
-rw-r--r--drivers/staging/nvec/nvec_ps2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/staging/nvec/nvec_ps2.c b/drivers/staging/nvec/nvec_ps2.c
index 7f470ba1160..4be3d220a63 100644
--- a/drivers/staging/nvec/nvec_ps2.c
+++ b/drivers/staging/nvec/nvec_ps2.c
@@ -123,6 +123,9 @@ static int nvec_mouse_suspend(struct platform_device *pdev, pm_message_t state)
{
struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
+ /* disable mouse */
+ nvec_write_async(nvec, "\x06\xf4", 2);
+
/* send cancel autoreceive */
nvec_write_async(nvec, "\x06\x04", 2);
@@ -131,8 +134,13 @@ static int nvec_mouse_suspend(struct platform_device *pdev, pm_message_t state)
static int nvec_mouse_resume(struct platform_device *pdev)
{
+ struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
+
ps2_startstreaming(ps2_dev.ser_dev);
+ /* enable mouse */
+ nvec_write_async(nvec, "\x06\xf5", 2);
+
return 0;
}