Skip to content

Commit a573298

Browse files
marvintwentyfourgregkh
authored andcommitted
staging: nvec: ps2: disable/enable mouse on suspend/resume
This change makes the touchpad buttons work after suspend/resume. Signed-off-by: Marc Dietrich <[email protected]> Signed-off-by: Julian Andres Klode <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0eedab7 commit a573298

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/staging/nvec/nvec_ps2.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ static int nvec_mouse_suspend(struct platform_device *pdev, pm_message_t state)
123123
{
124124
struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
125125

126+
/* disable mouse */
127+
nvec_write_async(nvec, "\x06\xf4", 2);
128+
126129
/* send cancel autoreceive */
127130
nvec_write_async(nvec, "\x06\x04", 2);
128131

@@ -131,8 +134,13 @@ static int nvec_mouse_suspend(struct platform_device *pdev, pm_message_t state)
131134

132135
static int nvec_mouse_resume(struct platform_device *pdev)
133136
{
137+
struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
138+
134139
ps2_startstreaming(ps2_dev.ser_dev);
135140

141+
/* enable mouse */
142+
nvec_write_async(nvec, "\x06\xf5", 2);
143+
136144
return 0;
137145
}
138146

0 commit comments

Comments
 (0)