Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1577845

Re: [PATCH 2/3] auxdisplay: ht16k33: rework input device initialization

From Dmitry Torokhov <dmitry.torokhov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3] auxdisplay: ht16k33: rework input device initialization
Date 2017-02-09 19:20 +0100
Message-ID <t91u2-15t-25@gated-at.bofh.it> (permalink)
References <t5NGV-5im-13@gated-at.bofh.it> <t5NGX-5im-45@gated-at.bofh.it> <t8DBn-2Hv-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-31 22:00 +0100
  [PATCH 2/3] auxdisplay: ht16k33: rework input device initialization Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-31 22:00 +0100
    Re: [PATCH 2/3] auxdisplay: ht16k33: rework input device  initialization Robin van der Gracht <robin@protonic.nl> - 2017-02-08 17:50 +0100
      Re: [PATCH 2/3] auxdisplay: ht16k33: rework input device  initialization Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-09 19:20 +0100
  [PATCH 3/3] auxdisplay: ht16k33: remove private workqueue Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-31 22:00 +0100
    Re: [PATCH 3/3] auxdisplay: ht16k33: remove private workqueue Robin van der Gracht <robin@protonic.nl> - 2017-02-08 18:30 +0100
  Re: [PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev Robin van der Gracht <robin@protonic.nl> - 2017-02-07 09:20 +0100
  Re: [PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev Robin van der Gracht <robin@protonic.nl> - 2017-02-08 17:50 +0100

csiph-web