The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Robin van der Gracht <robin@protonic.nl>
Cc: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>,
	linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 2/3] auxdisplay: ht16k33: rework input device initialization
Date: Thu, 9 Feb 2017 10:10:18 -0800	[thread overview]
Message-ID: <20170209181018.GB8862@dtor-ws> (raw)
In-Reply-To: <20170208174802.26c370f6@erd979>

Hi Robin,

On Wed, Feb 08, 2017 at 05:48:02PM +0100, Robin van der Gracht wrote:
> On Tue, 31 Jan 2017 12:54:37 -0800
> Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> > +
> > +	err = devm_request_threaded_irq(&client->dev, client->irq,
> > +					NULL, ht16k33_keypad_irq_thread,
> > +					IRQF_TRIGGER_RISING | IRQF_ONESHOT,
> > +					DRIVER_NAME, keypad);
> 
> I believe the interrupt trigger should be switched to IRQF_TRIGGER_HIGH
> combined with IRQF_ONESHOT, for this new setup. This is causing a race
> condition.
> 
> In the previous situation a 'key data' read was triggered by
> ht16k33_keypad_start(). This cleared the IRQ and gave a (somewhat racy)
> known state. Now, when the IRQ line is HIGH during probe keyscan
> wont work. 
> 
> Also, when ht16k33_keypad_stop() is run while the irq thread is waiting
> for debounce, the scan will be skipped and irq will never be cleared.
> This also breaks keyscan.


You are absolutely right, I shoudl have changed this to
IRQF_TRIGGER_HIGH. I'll resend updated patch series in a minute.

Thanks.

-- 
Dmitry

  reply	other threads:[~2017-02-09 18:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 20:54 [PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev Dmitry Torokhov
2017-01-31 20:54 ` [PATCH 2/3] auxdisplay: ht16k33: rework input device initialization Dmitry Torokhov
2017-02-08 16:48   ` Robin van der Gracht
2017-02-09 18:10     ` Dmitry Torokhov [this message]
2017-01-31 20:54 ` [PATCH 3/3] auxdisplay: ht16k33: remove private workqueue Dmitry Torokhov
2017-02-08 16:52   ` Robin van der Gracht
2017-02-07  7:45 ` [PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev Robin van der Gracht
2017-02-08 16:12 ` Robin van der Gracht

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=20170209181018.GB8862@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=robin@protonic.nl \
    /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