Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269447
b: refs/heads/master
c: e949674
h: refs/heads/master
i:
  269445: cf59674
  269443: 63b9d23
  269439: 1ded5f9
v: v3
  • Loading branch information
Dmitry Torokhov committed Aug 24, 2011
1 parent 28056b0 commit dff1b8e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 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: c17ca3f5a2c98784739bbbcc3f6b6ee177f4f201
refs/heads/master: e9496746cc0954c43720de0c88fef95a9d229baa
21 changes: 20 additions & 1 deletion trunk/drivers/input/touchscreen/wacom_w8001.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,20 @@ static int w8001_command(struct w8001 *w8001, unsigned char command,
return rc;
}

static int w8001_open(struct input_dev *dev)
{
struct w8001 *w8001 = input_get_drvdata(dev);

return w8001_command(w8001, W8001_CMD_START, false);
}

static void w8001_close(struct input_dev *dev)
{
struct w8001 *w8001 = input_get_drvdata(dev);

w8001_command(w8001, W8001_CMD_STOP, false);
}

static int w8001_setup(struct w8001 *w8001)
{
struct input_dev *dev = w8001->dev;
Expand Down Expand Up @@ -474,7 +488,7 @@ static int w8001_setup(struct w8001 *w8001)

strlcat(w8001->name, " Touchscreen", sizeof(w8001->name));

return w8001_command(w8001, W8001_CMD_START, false);
return 0;
}

/*
Expand Down Expand Up @@ -534,6 +548,11 @@ static int w8001_connect(struct serio *serio, struct serio_driver *drv)
input_dev->id.version = 0x0100;
input_dev->dev.parent = &serio->dev;

input_dev->open = w8001_open;
input_dev->close = w8001_close;

input_set_drvdata(input_dev, w8001);

err = input_register_device(w8001->dev);
if (err)
goto fail3;
Expand Down

0 comments on commit dff1b8e

Please sign in to comment.