From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756981AbbA2UKP (ORCPT ); Thu, 29 Jan 2015 15:10:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39421 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754926AbbA2UKN (ORCPT ); Thu, 29 Jan 2015 15:10:13 -0500 Date: Thu, 29 Jan 2015 15:09:50 -0500 From: Benjamin Tissoires To: Mika Westerberg Cc: Jiri Kosina , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Jarkko Nikula , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] HID: i2c-hid: The interrupt should be level sensitive Message-ID: <20150129200950.GC27265@mail.corp.redhat.com> References: <1422282573-18215-1-git-send-email-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1422282573-18215-1-git-send-email-mika.westerberg@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Jan 26 2015 or thereabouts, Mika Westerberg wrote: > 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 > --- FWIW, this one is Acked-by: Benjamin Tissoires looks like we are going to drop 2/2, but this one is still valid. Cheers, Benjamin > 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 d43e967e7533..8f1dfc5c5d9c 100644 > --- a/drivers/hid/i2c-hid/i2c-hid.c > +++ b/drivers/hid/i2c-hid/i2c-hid.c > @@ -785,7 +785,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, > -- > 2.1.4 >