From: "Guido Martínez" <guido@vanguardiasur.com.ar>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "Michael Hennerich" <michael.hennerich@analog.com>,
"Mike Frysinger" <vapier@gentoo.org>,
linux-input@vger.kernel.org,
"Ezequiel García" <ezequiel@vanguardiasur.com.ar>
Subject: Re: [PATCH 1/3] Input: adp5589-keys: handle i2c errors on the irq handler
Date: Sat, 9 May 2015 16:48:43 -0300 [thread overview]
Message-ID: <20150509194843.GA3969@fox> (raw)
In-Reply-To: <20150506233323.GA5580@dtor-ws>
Dmitry,
On Wed, May 06, 2015 at 04:33:23PM -0700, Dmitry Torokhov wrote:
> On Tue, Apr 21, 2015 at 04:35:04PM +0200, Michael Hennerich wrote:
> > On 04/21/2015 04:21 PM, Guido Martínez wrote:
> > >Bail out if reading the status register fails, otherwise we'll carry
> > >on with a negative error code as if it were read from the keypad, and
> > >falsely report events or errors.
> > >
> > >Fixes: 9d2e173644bb ('Input: ADP5589 - new driver for I2C Keypad Decoder and I/O Expander')
> > >Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
> > Acked-by: Michael Hennerich <michael.hennerich@analog.com>
> > >---
> > > drivers/input/keyboard/adp5589-keys.c | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > >diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c
> > >index a452677..19edd2d 100644
> > >--- a/drivers/input/keyboard/adp5589-keys.c
> > >+++ b/drivers/input/keyboard/adp5589-keys.c
> > >@@ -622,6 +622,9 @@ static irqreturn_t adp5589_irq(int irq, void *handle)
> > > status = adp5589_read(client, ADP5589_5_INT_STATUS);
> > >+ if (status < 0)
> > >+ return IRQ_HANDLED;
> > >+
> > > if (status & OVRFLOW_INT) /* Unlikely and should never happen */
> > > dev_err(&client->dev, "Event Overflow Error\n");
>
> Hmm, what about all other places where we read and ignore errors? Why
> this place is more important than others?
Good point. It's just the error we were hitting on our system since the
i2c controller failed. It should be the most common one should i2c fail,
but I agree that all other ones should be consistent with this one.
I'll work some more on it and resend.
Thanks!
--
Guido Martínez, VanguardiaSur
www.vanguardiasur.com.ar
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-05-09 19:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 14:21 [PATCH 0/3] adp5589 fixes Guido Martínez
2015-04-21 14:21 ` [PATCH 1/3] Input: adp5589-keys: handle i2c errors on the irq handler Guido Martínez
[not found] ` <55366018.8050807@analog.com>
2015-05-06 23:33 ` Dmitry Torokhov
2015-05-09 19:48 ` Guido Martínez [this message]
2015-04-21 14:21 ` [PATCH 2/3] Input: adp5589-keys: fix pull mask setting Guido Martínez
2015-04-21 14:35 ` Michael Hennerich
2015-05-06 23:34 ` Dmitry Torokhov
2015-04-21 14:21 ` [PATCH 3/3] Input: adp5589-keys: fix event count mask Guido Martínez
2015-04-21 14:36 ` Michael Hennerich
2015-05-06 23:36 ` Dmitry Torokhov
2015-10-02 21:28 ` Ezequiel Garcia
2015-10-06 0:29 ` Dmitry Torokhov
2015-10-08 14:21 ` Ezequiel Garcia
2015-05-06 14:04 ` [PATCH 0/3] adp5589 fixes Guido Martínez
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=20150509194843.GA3969@fox \
--to=guido@vanguardiasur.com.ar \
--cc=dmitry.torokhov@gmail.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=linux-input@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=vapier@gentoo.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).