input: ideapad_slidebar: new input driver
Subsystems (3)
Andrey Moiseev
maintainerPATCH v2 1/1 input: ideapad_slidebar: new input driver
v2: added myself as a maintainer
ideapad_slidebar is a new driver which enables slidebars on some Lenovo IdeaPad laptops (the slidebars work with SlideNav/Desktop Navigator under Windows)
Fixes this: https://bugzilla.kernel.org/show_bug.cgi?id=16004
Registers 'IdeaPad Slidebar' input device and /sys/devices/platform/ideapad_slidebar/slidebar_mode for switching slidebar's modes.
Now works on:
IdeaPad Y550, Y550P.
May work on (testing and adding new models is needed):
Ideapad Y560, Y460, Y450, Y650,
and, probably, some others.
Driver source: https://github.com/o2genum/ideapad-slidebar.git
Patch is generated against current version of the mainline kernel.
--- MAINTAINERS | 7 + drivers/input/misc/Kconfig | 9 + drivers/input/misc/Makefile | 1 + drivers/input/misc/ideapad_slidebar.c | 378 ++++++++++++++++++++++++++++++++++ 4 files changed, 395 insertions(+) create mode 100644 drivers/input/misc/ideapad_slidebar.c
MAINTAINERS +7 -0
@@ -4096,6 +4096,13 @@ W: http://launchpad.net/ideapad-laptop S: Maintained F: drivers/platform/x86/ideapad-laptop.c +IDEAPAD LAPTOP SLIDEBAR DRIVER +M: Andrey Moiseev <[email protected]> +L: [email protected] +W: https://github.com/o2genum/ideapad-slidebar +S: Maintained +F: drivers/input/misc/ideapad_slidebar.c + IDE/ATAPI DRIVERS M: Borislav Petkov <[email protected]> L: [email protected]
drivers/input/misc/Kconfig +9 -0
@@ -647,4 +647,13 @@ config INPUT_SIRFSOC_ONKEY If unsure, say N. +config INPUT_IDEAPAD_SLIDEBAR + tristate "IdeaPad Laptop Slidebar" + depends on INPUT + help + Input driver for slidebars on some Lenovo IdeaPad laptops. + + If you have an IdeaPad laptop with a slidebar, say Y or M here. + Module name is ideapad_slidebar. + endif
drivers/input/misc/Makefile +1 -0
@@ -61,3 +61,4 @@ obj-$(CONFIG_INPUT_WISTRON_BTNS) += wistron_btns.o obj-$(CONFIG_INPUT_WM831X_ON) += wm831x-on.o obj-$(CONFIG_INPUT_XEN_KBDDEV_FRONTEND) += xen-kbdfront.o obj-$(CONFIG_INPUT_YEALINK) += yealink.o +obj-$(CONFIG_INPUT_IDEAPAD_SLIDEBAR) += ideapad_slidebar.o
drivers/input/misc/ideapad_slidebar.c new file +378 -0
378 lines not on this page · raw message
Signature · 1 line
1.8.3.4
Dmitry Torokhov
maintainerHi Andrey,
drivers/input/misc/ideapad_slidebar.c line 138
Quoted 6 lines · Andrey Moiseev
drivers/input/misc/ideapad_slidebar.c new file +6
-0+/* Keyboard handler */ +static irq_handler_t kbd_irq_handler (int irq,void *dev_id, +struct pt_regs *regs) +{ +/* Scancodes: e03b on move, bb on release */ +int scancode =inb (0x60 );
No, you should not just read KBC data without regard to what other parts of kernel are doing (i8042 might be accessing it at the same time because AUX IRQ was raised).
This driver has to be implemented as i8042 filter.
Thanks.
Signature · 1 line
Dmitry