Commit graph

4 commits

Author SHA1 Message Date
Dmitry Torokhov 8fa8bea728 auxdisplay: ht16k33: remove private workqueue
There is no need for the driver to use private workqueue, standard system
workqueue should suffice as they are going to use the same worker pool
anyway.

Acked-by: Robin van der Gracht <robin@protonic.nl>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-10 15:57:28 +01:00
Dmitry Torokhov cac513f1a9 auxdisplay: ht16k33: rework input device initialization
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>
Tested-by: Robin van der Gracht <robin@protonic.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-10 15:57:28 +01:00
Dmitry Torokhov bbd39d1e4a auxdisplay: ht16k33: do not try to free fbdev
'fbdev' is allocated as part of larger ht16k33_priv structure; trying to
free it will cause troubles.

Acked-by: Robin van der Gracht <robin@protonic.nl>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-10 15:57:28 +01:00
Robin van der Gracht 8992da44c6 auxdisplay: ht16k33: Driver for LED controller
Added a driver for the Holtek HT16K33 LED controller with keyscan.

Signed-off-by: Robin van der Gracht <robin@protonic.nl>
CC: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10 16:53:19 +01:00