Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346970
b: refs/heads/master
c: bf7f531
h: refs/heads/master
v: v3
  • Loading branch information
Alban Bedel authored and Dmitry Torokhov committed Nov 29, 2012
1 parent 5510228 commit 77d8c59
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 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: e89e29b8585379c844b03fb3aa2cca73e2bc5b26
refs/heads/master: bf7f5316cbacbcb7d3c337eba36322cab255dec0
10 changes: 7 additions & 3 deletions trunk/drivers/input/keyboard/tca8418_keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,18 @@ static irqreturn_t tca8418_irq_handler(int irq, void *dev_id)
if (error) {
dev_err(&keypad_data->client->dev,
"unable to read REG_INT_STAT\n");
goto exit;
return IRQ_NONE;
}

if (!reg)
return IRQ_NONE;

if (reg & INT_STAT_OVR_FLOW_INT)
dev_warn(&keypad_data->client->dev, "overflow occurred\n");

if (reg & INT_STAT_K_INT)
tca8418_read_keypad(keypad_data);

exit:
/* Clear all interrupts, even IRQs we didn't check (GPI, CAD, LCK) */
reg = 0xff;
error = tca8418_write_byte(keypad_data, REG_INT_STAT, reg);
Expand Down Expand Up @@ -374,7 +376,9 @@ static int tca8418_keypad_probe(struct i2c_client *client,
client->irq = gpio_to_irq(client->irq);

error = request_threaded_irq(client->irq, NULL, tca8418_irq_handler,
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
IRQF_TRIGGER_FALLING |
IRQF_SHARED |
IRQF_ONESHOT,
client->name, keypad_data);
if (error) {
dev_dbg(&client->dev,
Expand Down

0 comments on commit 77d8c59

Please sign in to comment.