Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3525
b: refs/heads/master
c: af24604
h: refs/heads/master
i:
  3523: fe8d00b
v: v3
  • Loading branch information
Dmitry Torokhov committed May 29, 2005
1 parent c716291 commit 1d9ea29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 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: 65cde54b8b0299d7e46b8705338b01d1e44a5eb0
refs/heads/master: af246041277674854383cf91b8f0b01217b521e8
19 changes: 7 additions & 12 deletions trunk/drivers/input/touchscreen/mk712.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ MODULE_PARM_DESC(irq, "IRQ of MK712 touchscreen controller");
#define MK712_READ_ONE_POINT 0x20
#define MK712_POWERUP 0x40

static int mk712_used = 0;
static struct input_dev mk712_dev;
static DEFINE_SPINLOCK(mk712_lock);

Expand Down Expand Up @@ -130,17 +129,14 @@ static int mk712_open(struct input_dev *dev)

spin_lock_irqsave(&mk712_lock, flags);

if (!mk712_used++) {
outb(0, mk712_io + MK712_CONTROL); /* Reset */

outb(0, mk712_io + MK712_CONTROL); /* Reset */
outb(MK712_ENABLE_INT | MK712_INT_ON_CONVERSION_COMPLETE |
MK712_INT_ON_CHANGE_IN_TOUCH_STATUS |
MK712_ENABLE_PERIODIC_CONVERSIONS |
MK712_POWERUP, mk712_io + MK712_CONTROL);

outb(MK712_ENABLE_INT | MK712_INT_ON_CONVERSION_COMPLETE |
MK712_INT_ON_CHANGE_IN_TOUCH_STATUS |
MK712_ENABLE_PERIODIC_CONVERSIONS |
MK712_POWERUP, mk712_io + MK712_CONTROL);

outb(10, mk712_io + MK712_RATE); /* 187 points per second */
}
outb(10, mk712_io + MK712_RATE); /* 187 points per second */

spin_unlock_irqrestore(&mk712_lock, flags);

Expand All @@ -153,8 +149,7 @@ static void mk712_close(struct input_dev *dev)

spin_lock_irqsave(&mk712_lock, flags);

if (!--mk712_used)
outb(0, mk712_io + MK712_CONTROL);
outb(0, mk712_io + MK712_CONTROL);

spin_unlock_irqrestore(&mk712_lock, flags);
}
Expand Down

0 comments on commit 1d9ea29

Please sign in to comment.