[Vivid][SRU][PATCH 1/2] HID: i2c-hid: The interrupt should be level sensitive v2
Phidias Chiang
phidias.chiang at canonical.com
Fri Oct 16 08:20:59 UTC 2015
From: Mika Westerberg <mika.westerberg at linux.intel.com>
BugLink: http://bugs.launchpad.net/bugs/1501187
The Microsoft HID over I2C specification says two things regarding the
interrupt:
1) The interrupt should be level sensitive
2) The device keeps the interrupt asserted as long as it has more reports
available.
We've seen that at least some Atmel and N-Trig panels keep the line low as
long as they have something to send. The current version of the driver only
detects the first edge but then fails to read rest of the reports (as the
line is still asserted).
Make the driver follow the specification and configure the HID interrupt to
be level sensitive.
The Windows HID over I2C driver also seems to do the same.
Signed-off-by: Mika Westerberg <mika.westerberg at linux.intel.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires at redhat.com>
Signed-off-by: Jiri Kosina <jkosina at suse.cz>
(cherry picked from commit f2de746c3f03de4d33a9e69a91e821bd4c2c1030)
Signed-off-by: Phidias Chiang <phidias.chiang at canonical.com>
Reviewed-by: Wen-chien Jesse Sung <jesse.sung at canonical.com>
---
drivers/hid/i2c-hid/i2c-hid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 829a62c..21f242a 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -788,7 +788,7 @@ static int i2c_hid_init_irq(struct i2c_client *client)
dev_dbg(&client->dev, "Requesting IRQ: %d\n", client->irq);
ret = request_threaded_irq(client->irq, NULL, i2c_hid_irq,
- IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
+ IRQF_TRIGGER_LOW | IRQF_ONESHOT,
client->name, ihid);
if (ret < 0) {
dev_warn(&client->dev,
--
1.7.9.5
More information about the kernel-team
mailing list