linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Dushistov <dushistov@mail.ru>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] max7359_keypad: Do not set MAX7359_CFG_INTERRUPT flag
Date: Thu, 14 May 2015 05:34:50 +0300	[thread overview]
Message-ID: <20150514023450.GA28560@fifteen> (raw)

max7359_keypad: Do not set MAX7359_CFG_INTERRUPT flag. 
In datasheet of max7359, there is description of this flag:
0 - INT cleared when FIFO empty,
1 - INT cleared after host read. In this mode, I2C should read
 FIFO until interrupt condition removed, or further INT may be lost.

So, if we set this flag, we have to read FIFO until it become
empty. But in interrupt we read FIFO just once.
This lead to "keyboard" hang until reboot, if we press
several keys, because of interrupt handler read just one
"press" from FIFO and clear interrupt.

Signed-off-by: Evgeniy A. Dushistov <dushistov@mail.ru>
---
 drivers/input/keyboard/max7359_keypad.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/input/keyboard/max7359_keypad.c b/drivers/input/keyboard/max7359_keypad.c
index faa6da5..4e35904 100644
--- a/drivers/input/keyboard/max7359_keypad.c
+++ b/drivers/input/keyboard/max7359_keypad.c
@@ -166,7 +166,6 @@ static void max7359_close(struct input_dev *dev)
 static void max7359_initialize(struct i2c_client *client)
 {
 	max7359_write_reg(client, MAX7359_REG_CONFIG,
-		MAX7359_CFG_INTERRUPT | /* Irq clears after host read */
 		MAX7359_CFG_KEY_RELEASE | /* Key release enable */
 		MAX7359_CFG_WAKEUP); /* Key press wakeup enable */
 
-- 
2.3.6

-- 
/Evgeniy

             reply	other threads:[~2015-05-14  2:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14  2:34 Evgeniy Dushistov [this message]
2015-05-15 20:52 ` [PATCH 1/3] max7359_keypad: Do not set MAX7359_CFG_INTERRUPT flag Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150514023450.GA28560@fifteen \
    --to=dushistov@mail.ru \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).