Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354272
b: refs/heads/master
c: 85a9052
h: refs/heads/master
v: v3
  • Loading branch information
Marc Dietrich authored and Greg Kroah-Hartman committed Jan 30, 2013
1 parent e52b6ec commit 8dc8982
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 518945fbfbe9e2bc39057115aa23e25b084a03e0
refs/heads/master: 85a90528b2b4f2d38a56df5b3f137223983aad4b
16 changes: 7 additions & 9 deletions trunk/drivers/staging/nvec/nvec_ps2.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
#define STOP_STREAMING {'\x06', '\x04'}
#define SEND_COMMAND {'\x06', '\x01', '\xf4', '\x01'}

#define ENABLE_MOUSE 0xf4
#define DISABLE_MOUSE 0xf5

#ifdef NVEC_PS2_DEBUG
#define NVEC_PHD(str, buf, len) \
print_hex_dump(KERN_DEBUG, str, DUMP_PREFIX_NONE, \
Expand Down Expand Up @@ -133,27 +136,22 @@ static int nvec_mouse_remove(struct platform_device *pdev)
#ifdef CONFIG_PM_SLEEP
static int nvec_mouse_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);

/* disable mouse */
nvec_write_async(nvec, "\x06\xf4", 2);
ps2_sendcommand(ps2_dev.ser_dev, DISABLE_MOUSE);

/* send cancel autoreceive */
nvec_write_async(nvec, "\x06\x04", 2);
ps2_stopstreaming(ps2_dev.ser_dev);

return 0;
}

static int nvec_mouse_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);

/* start streaming */
ps2_startstreaming(ps2_dev.ser_dev);

/* enable mouse */
nvec_write_async(nvec, "\x06\xf5", 2);
ps2_sendcommand(ps2_dev.ser_dev, ENABLE_MOUSE);

return 0;
}
Expand Down

0 comments on commit 8dc8982

Please sign in to comment.