All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin van der Gracht <robin@protonic.nl>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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 v2 2/3] auxdisplay: ht16k33: rework input device initialization
Date: Fri, 10 Feb 2017 09:32:08 +0100	[thread overview]
Message-ID: <20170210093208.4a0d7e51@erd979> (raw)
In-Reply-To: <20170209181553.17277-2-dmitry.torokhov@gmail.com>

On Thu,  9 Feb 2017 10:15:52 -0800
Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:

> This patch fixes following issues in input device (keypad) handling:
> 
> - requesting IRQ before allocating and initializing parts of the device
>   that can be referenced from IRQ handler is racy, even if we try to
>   disable interrupt after requesting it. Let's move allocations around
>   so that everything is ready by the time we request IRQ.
> 
> - using threaded interrupt handler to schedule a work item it sub-optimal.
>   Disabling and then re-enabling interrupts in work item and in open/close
>   methods is prone to races and exactly the reason theraded interrupts were
>   introduced. Let's use the infrastructure properly and keep scanning the
>   matrix array in IRQ thread, stopping when there are no keys, or when told
>   to do so.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> 
> v2: addressed Robin's feedback - changed interrupt trigger from
>     IRQF_TRIGGER_RISING to IRQF_TRIGGER_HIGH
> 

Works like a charm!

Tested-by: Robin van der Gracht <robin@protonic.nl>

  reply	other threads:[~2017-02-10  8:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 18:15 [PATCH v2 1/3] auxdisplay: ht16k33: do not try to free fbdev Dmitry Torokhov
2017-02-09 18:15 ` [PATCH v2 2/3] auxdisplay: ht16k33: rework input device initialization Dmitry Torokhov
2017-02-10  8:32   ` Robin van der Gracht [this message]
2017-02-09 18:15 ` [PATCH v2 3/3] auxdisplay: ht16k33: remove private workqueue 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=20170210093208.4a0d7e51@erd979 \
    --to=robin@protonic.nl \
    --cc=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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.