Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165591
b: refs/heads/master
c: 3b0a9ce
h: refs/heads/master
i:
  165589: 70de167
  165587: a5516b8
  165583: 317f36d
v: v3
  • Loading branch information
Dmitry Torokhov committed Sep 18, 2009
1 parent ebf9914 commit 06b3ea9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 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: 30b37131aa63f4f73ebc48a026666448e5907255
refs/heads/master: 3b0a9ce0a6918e881c3f44bf1fc2194a8d019104
26 changes: 9 additions & 17 deletions trunk/drivers/input/misc/dm355evm_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ static struct {
{ 0x3169, KEY_PAUSE, },
};

/* runs in an IRQ thread -- can (and will!) sleep */
/*
* Because we communicate with the MSP430 using I2C, and all I2C calls
* in Linux sleep, we use a threaded IRQ handler. The IRQ itself is
* active low, but we go through the GPIO controller so we can trigger
* on falling edges and not worry about enabling/disabling the IRQ in
* the keypress handling path.
*/
static irqreturn_t dm355evm_keys_irq(int irq, void *_keys)
{
struct dm355evm_keys *keys = _keys;
Expand Down Expand Up @@ -171,18 +177,6 @@ static irqreturn_t dm355evm_keys_irq(int irq, void *_keys)
return IRQ_HANDLED;
}

/*
* Because we communicate with the MSP430 using I2C, and all I2C calls
* in Linux sleep, we use a threaded IRQ handler. The IRQ itself is
* active low, but we go through the GPIO controller so we can trigger
* on falling edges and not worry about enabling/disabling the IRQ in
* the keypress handling path.
*/
static irqreturn_t dm355evm_keys_hardirq(int irq, void *_keys)
{
return IRQ_WAKE_THREAD;
}

static int dm355evm_setkeycode(struct input_dev *dev, int index, int keycode)
{
u16 old_keycode;
Expand Down Expand Up @@ -257,10 +251,8 @@ static int __devinit dm355evm_keys_probe(struct platform_device *pdev)

/* REVISIT: flush the event queue? */

status = request_threaded_irq(keys->irq,
dm355evm_keys_hardirq, dm355evm_keys_irq,
IRQF_TRIGGER_FALLING,
dev_name(&pdev->dev), keys);
status = request_threaded_irq(keys->irq, NULL, dm355evm_keys_irq,
IRQF_TRIGGER_FALLING, dev_name(&pdev->dev), keys);
if (status < 0)
goto fail1;

Expand Down

0 comments on commit 06b3ea9

Please sign in to comment.