Some GPIOs do not support falling edge only interrupt, so make interrupt flag configurable. Signed-off-by: Joo Aun Saw <jasaw81@xxxxxxxxx> --- drivers/input/keyboard/qt2160.c | 11 +++++++++-- include/linux/input/qt2160.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/input/keyboard/qt2160.c b/drivers/input/keyboard/qt2160.c index 8316fde..d2ce573 100755 --- a/drivers/input/keyboard/qt2160.c +++ b/drivers/input/keyboard/qt2160.c @@ -487,8 +487,15 @@ static int __devinit qt2160_probe(struct i2c_client *client, } if (client->irq) { - error = request_irq(client->irq, qt2160_irq, - IRQF_TRIGGER_FALLING, "qt2160", qt2160); + if (hw_info->irq_flags) { + error = request_irq(client->irq, qt2160_irq, + hw_info->irq_flags, "qt2160", + qt2160); + } else { + error = request_irq(client->irq, qt2160_irq, + IRQF_TRIGGER_FALLING, "qt2160", + qt2160); + } if (error) { dev_err(&client->dev, "failed to allocate irq %d\n", client->irq); diff --git a/include/linux/input/qt2160.h b/include/linux/input/qt2160.h index 4eb7e18..dad11bb 100755 --- a/include/linux/input/qt2160.h +++ b/include/linux/input/qt2160.h @@ -21,6 +21,7 @@ * @key_burst_length: key sensitivity; 0 use default * @low_power_mode: value 0 use default; each +1 increment causes the chip to * sleep 16ms longer before detecting a touch (slower response); max 255 + * @irq_flags: value 0 use default IRQF_TRIGGER_FALLING */ struct qt2160_info { void *data; @@ -31,6 +32,7 @@ struct qt2160_info { unsigned char key_aks[QT2160_MAXKEYS]; unsigned char key_burst_length[QT2160_MAXKEYS]; unsigned char low_power_mode; + unsigned long irq_flags; }; #endif /* __QT2160_H__ */ -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html