aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/atkbd.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-04-11Input: atkbd - document "no new force-release quirks" policyDmitry Torokhov1-0/+6
To save people some time let's document that we do not want new quirks for "force-release" keys in the kernel and that they should patch userspace (udev) instead. Suggested-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-02-13input: use %*pb[l] to print bitmaps including cpumasks and nodemasksTejun Heo1-2/+2
printk and friends can now format bitmaps using '%*pb[l]'. cpumask and nodemask also provide cpumask_pr_args() and nodemask_pr_args() respectively which can be used to generate the two printf arguments necessary to format the specified cpu/nodemask. * Line termination only requires one extra space at the end of the buffer. Use PAGE_SIZE - 1 instead of PAGE_SIZE - 2 when formatting. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-11-16Input: atkbd - correct MSC_SCAN events for force_release keysStefan Brüns1-2/+4
Without the change either no scancode would be reported on release of force_release keys, or - if the key is marked as force_release erroneously - the release event and the scancode would be reported in separate reports to the input layer. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-11Input: atkbd - do not try 'deactivate' keyboard on any LG laptopsDmitry Torokhov1-8/+0
We are getting more and more reports about LG laptops not having functioning keyboard if we try to deactivate keyboard during probe. Given that having keyboard deactivated is merely "nice to have" instead of a hard requirement for probing, let's disable it on all LG boxes instead of trying to hunt down particular models. This change is prompted by patches trying to add "LG Electronics"/"ROCKY" and "LG Electronics"/"LW60-F27B" to the DMI list. https://bugzilla.kernel.org/show_bug.cgi?id=77051 Cc: stable@vger.kernel.org Reported-by: Jaime Velasco Juan <jsagarribay@gmail.com> Reported-by: Georgios Tsalikis <georgios@tsalikis.net> Tested-by: Jaime Velasco Juan <jsagarribay@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-04-24Input: atkbd - fix keyboard not working on some LG laptopsSheng-Liang Song1-1/+28
After issuing ATKBD_CMD_RESET_DIS, keyboard on some LG laptops stops working. The workaround is to stop issuing ATKBD_CMD_RESET_DIS commands. In order to keep changes in atkbd driver to the minimum we check DMI signature and only skip ATKBD_CMD_RESET_DIS if we are running on LG LW25-B7HV or P1-J273B. Cc: stable@vger.kernel.org Signed-off-by: Sheng-Liang Song <ssl@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-21Input: atkbd - fix multi-byte scancode handling on reconnectShawn Nematbakhsh1-21/+51
On resume from suspend there is a possibility for multi-byte scancodes to be handled incorrectly. atkbd_reconnect disables the processing of scancodes in software by calling atkbd_disable, but the keyboard may still be active because no disconnect command was sent. Later, software handling is re-enabled. If a multi-byte scancode sent from the keyboard straddles the re-enable, only the latter byte(s) will be handled. In practice, this leads to cases where multi-byte break codes (ex. "e0 4d" - break code for right-arrow) are misread as make codes ("4d" - make code for numeric 6), leading to one or more unwanted, untyped characters being interpreted. The solution implemented here involves sending command f5 (reset disable) to the keyboard prior to disabling software handling of codes. Later, the command to re-enable the keyboard is sent only after we are prepared to handle scancodes. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-17Input: atkbd - fix a typo in a messageDmitry Torokhov1-1/+1
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-04-23Input: atkbd - fix language in a printed messageJesper Juhl1-1/+1
I believe that "trying to access hardware" is more correct English than "trying access hardware". Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-09Input: convert obsolete strict_strtox to kstrtoxJJ Ding1-10/+30
With commit 67d0a0754455f89ef3946946159d8ec9e45ce33a we mark strict_strtox as obsolete. Convert all remaining such uses in drivers/input/. Also change long to appropriate types, and return error conditions from kstrtox separately, as Dmitry sugguests. Signed-off-by: JJ Ding <dgdunix@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-13Input: atkbd - make dmi callback functions return 1Axel Lin1-2/+2
We only care about if there is a successful match from the table (or no match at all), so let's make dmi_check_system return immediately instead of iterating thorough the whole table. Make the dmi callback function return 1 then dmi_check_system will return immediately if we have a successful match. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-04Input: atkbd - add 'terminal' parameter for IBM Terminal keyboardsBenjamin LaHaise1-1/+11
Many of the IBM Terminal keyboards from the 1980s and early 1990s communicate using a protocol similar, but not identical to the AT keyboard protocol. (Models known to be like this include 6110344, 6110668, 1390876, 1386887, and possibly others.) When the connector is rewired or adapter to an AT-DIN or PS/2 connector, they can be connected to a standard PC, with three caveats: a) They can only use scancode set 3; requests to use anything else are quietly ignored. b) The AT Command to request Make, Break and Repeat codes is not properly interpreted. c) The top function keys on a 122 key keyboard, and the arrow/edit keys in the middle of the board send non-standard scancodes. C) is easily taken care of in userspace, by use of setkeycodes B) can be taken care of by a userspace hack (that makes the kernel complain in dmesg) A) is fixable in theory, but on the keyboard i tested on (6110668), it seems to be detected unoverridably as Set 2, causing userspace oddities that make it harder to fix C). Enclosed is a small patch to the kernel that fixes A) and B) in the kernel, making it much easier to fix C) in userspace. It adds a single kernel command line parameter that overrides the detection that sets these boards as set 2, and instead of sending the Make-break-repeat command to the keyboard, it sends the make-break command, which is properly recognized by these keyboards. Software level key repeating seems to make up for the lack of hardware repeat codes perfectly. Without manually setting the command line parameter (tentatively named atkbd.terminal), this code has no effect, and the driver works exactly as before. See also: http://www.seasip.info/VintagePC/ibm_1390876.html http://www.seasip.info/VintagePC/ibm_6110344.html http://geekhack.org/showwiki.php?title=Island:7306 Signed-off-by: Erika Quinn <erikas.aubade@gmail.com> Signed-off-by: Benjamin LaHaise <bcrl@kvack.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-26Input: atkbd - release previously reserved keycodes 248 - 254Dmitry Torokhov1-11/+15
Keycodes in 248 - 254 range were reserved for special needs (scrolling) of atkbd driver. Now that the driver has been switched to use unsigned short keycodes instead of unsigned char we can release this range back into pull. We keep code 255 (ATKBD_KEY_NULL) reserved since users may have been using it to silence keys they do not care about since atkbd silently drops scancodes mapped to this keycode. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-21Merge commit 'v2.6.33-rc5' into nextDmitry Torokhov1-38/+36
2010-01-06Input: atkbd - switch to dev_err() and friendsDmitry Torokhov1-137/+146
dev_err(), dev_warn() and dev_dbg() ensure consistency in driver messages. Also switch to using bool where appropriate and fix some formatting issues. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-06Input: atkbd - fix canceling event_work in disconnectDmitry Torokhov1-2/+8
We need to first unregister input device and only then cancel event work since events can arrive (and cause event work to get scheduled again) until input_unregister_device() returns. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-06Input: serio - fix potential deadlock when unbinding driversEric W. Biederman1-34/+25
sysfs_remove_group() waits for sysfs attributes to be removed, therefore we do not need to worry about driver-specific attributes being accessed after driver has been detached from the device. In fact, attempts to take serio->drv_mutex in attribute methods may lead to the following deadlock: sysfs_read_file() fill_read_buffer() sysfs_get_active_two() psmouse_attr_show_helper() serio_pin_driver() serio_disconnect_driver() mutex_lock(&serio->drv_mutex); <--------> mutex_lock(&serio_drv_mutex); psmouse_disconnect() sysfs_remove_group(... psmouse_attr_group); .... sysfs_deactivate(); wait_for_completion(); Fix this by removing calls to serio_[un]pin_driver() and functions themselves and using driver-private mutexes to serialize access to attribute's set() methods that may change device state. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-12-24Input: speed up suspend/shutdown for PS/2 mice and keyboardsDmitry Torokhov1-2/+3
Instead of doing full-blown reset while suspending or shutting down the box use lighter form of reset that should take less time. Tested-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-12-04Input: atkbd - remove identification strings from DMI tableDmitry Torokhov1-17/+9
The driver does not reference identification strings in DMI table and since these strings are no longer required by DMI core we can safely remove them and save some memory. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-11-12Input: atkbd - restore LED state at reconnectDmitry Torokhov1-0/+13
Even though input core tells us to restore LED state and repeat rate at resume keyboard may be reconnected either by request from userspace (via sysfs) or just by pulling it from the box and plugging it back in. In these cases we still need to restore state ourselves. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-11-02Merge commit 'v2.6.32-rc5' into for-linusDmitry Torokhov1-1/+1
2009-10-21Input: atkbd - add a quirk for OQO 01+ multimedia keysJamie Lentin1-0/+36
OQO 01+ multimedia keys produce 6x on press, e0 6x upon release. As a result, Linux thinks that another key has been pressed (or is repeating), when it is actually a release of the same key. Mangle the release scancode when running on OQO so that driver recognizes it as such. Since the device does not have external PS/2 ports mangling is safe since there is no chance that an external keyboard is connected. Signed-off-by: Jamie Lentin <jm@lentin.co.uk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-10-18Input: atkbd - consolidate force release quirks for volume keysHerton Ronaldo Krzesinski1-37/+14
Some machines share same key list for volume up/down release key quirks, use only one key list. Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-10-14Input: atkbd - postpone restoring LED/repeat rate at resumeDmitry Torokhov1-4/+15
We need to postpone restoring LED state and typematic settings until keyboard is finished reconnecting upon resume. Normally driver core and PM infrastructure takes care of proper ordering and dependencies, but or case actual reconnect is done asynchronously from kseriod. So while driver core thinks that keyboard was resumed and it is time to let input core run it's resume handlers in reality keyboard is not ready yet. The solution is to keep rescheduling work that adjusts LED and rate settings until keyboard is fully enabled. Reported-by: Carlos R. Mafra <crmafra2@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-10-13Input: atkbd - restore resetting LED state at startupDmitry Torokhov1-0/+26
Fix breakage caused by commit 9605fb48e1998935a5ee70c965f90ad1ac023add While the input core indeed takes care of restoring led state and typematic settings upon resume the driver still need to initialize them properly when registering a new device Reported-and-tested-by: Marin Mitov <mitov@issp.bas.bg> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-09-23Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-25/+0
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: add driver for Atmel AT42QT2160 Sensor Chip Input: max7359 - use threaded IRQs Input: add driver for Maxim MAX7359 key switch controller Input: add driver for ADP5588 QWERTY I2C Keypad Input: add touchscreen driver for MELFAS MCS-5000 controller Input: add driver for OpenCores Keyboard Controller Input: dm355evm_keys - remove dm355evm_keys_hardirq Input: synaptics_i2c - switch to using __cancel_delayed_work() Input: ad7879 - add support for AD7889 Input: atkbd - rely on input core to restore state on resume Input: add generic suspend and resume for input devices Input: libps2 - additional locking for i8042 ports
2009-09-21trivial: fix typo s/ketymap/keymap/ in commentThadeu Lima de Souza Cascardo1-1/+1
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-17Input: atkbd - rely on input core to restore state on resumeDmitry Torokhov1-25/+0
Now that input core takes care of restoring state of input devices upon resume we don't need to do anything special here. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-09-13Merge branch 'next' into for-linusDmitry Torokhov1-6/+37
2009-09-03Input: atkbd - add Compaq Presario R4000-series repeat quirkDave Andrews1-0/+35
Compaq Presario R4000-series laptops are not sending a "volume up button release" and "volume down button release" signal in the PS/2 protocol for atkbd. The URL below has some of confirmed reports: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/385477 Signed-off-by: Dave Andrews <jetdog330@hotmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-09-03Input: atkbd - allow setting force-release bitmap via sysfsDmitry Torokhov1-6/+37
There are more and more laptop requiring use of force_release quirk for their multimedia and other specialized keys. Adding their DMI data to the kernel is not sustainable; instead we will rely on help from userspace (HAL) to do that for us. This patch creates a new 'force_release' sysfs attribute (that belongs to serio device to which keyboard is attached) which can be used to set up force_release keymap. For example, Dell laptop owners might do: echo 133-139,143,147 > /sys/devices/platform/i8042/serio0/force_release Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-20Input: atkbd - add force relese key quirk for Soltech TA12Jerone Young1-0/+16
Netbooks based on the Soltech TA12 do not send a key release for volume keys causing Linux to think the key is constantly being pressed forever. Added quirk data for forced release keys. BugLink: https://bugs.launchpad.net//bugs/397499 Signed-off-by: Jerone Young <jerone.young@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-12Input: atkbd - add forced release keys quirk for FSC Amilo Pi 3525Simon Davie1-0/+16
This patch enables forced releasing of the Fn+Volume hotkeys on the Fujitsu Siemens Amilo Pi 3525 notebook. Signed-off-by: Simon Davie <nexx@nexxdesign.co.uk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-05-11Input: atkbd - add force release keys quirk for Amilo Xi 3650Adrian Batzill1-0/+16
Signed-off-by: Adrian Batzill <agib@gmx.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-15Input: atkbd - add forced release keys quirk for Samsung NC20Barry Carroll1-1/+10
Signed-off-by: Barry Carroll <baz8080@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-15Input: atkbd - add forced release keys quirk for Samsung Q45Dmitry Torokhov1-0/+9
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-03-08Input: atkbd - add quirk for Fujitsu Siemens Amilo PA 1510Daniel Mierswa1-0/+17
The volume up and down keys on the Fujitsu Siemens Amilo PA 1510 laptop won't generate release events, so we have to do that. Use the same way that is already used with other models. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-03-08Input: atkbd - consolidate force release quirk setupDaniel Mierswa1-74/+46
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-03-02Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-2/+2
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elantech - touchpad driver miss-recognising logitech mice Input: synaptics - ensure we reset the device on resume Input: usbtouchscreen - fix eGalax HID ignoring Input: ambakmi - fix timeout handling in amba_kmi_write() Input: pxa930_trkball - fix write timeout handling Input: struct device - replace bus_id with dev_name(), dev_set_name() Input: bf54x-keys - fix debounce time validation Input: spitzkbd - mark probe function as __devinit Input: omap-keypad - mark probe function as __devinit Input: corgi_ts - mark probe function as __devinit Input: corgikbd - mark probe function as __devinit Input: uvc - the button on the camera is KEY_CAMERA Input: psmouse - make MOUSE_PS2_LIFEBOOK depend on X86 Input: atkbd - make forced_release_keys[] static Input: usbtouchscreen - allow reporting calibrated data
2009-01-10Input: atkbd - make forced_release_keys[] staticDaniel Mierswa1-2/+2
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-01-07Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds1-1/+1
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (24 commits) trivial: chack -> check typo fix in main Makefile trivial: Add a space (and a comma) to a printk in 8250 driver trivial: Fix misspelling of "firmware" in docs for ncr53c8xx/sym53c8xx trivial: Fix misspelling of "firmware" in powerpc Makefile trivial: Fix misspelling of "firmware" in usb.c trivial: Fix misspelling of "firmware" in qla1280.c trivial: Fix misspelling of "firmware" in a100u2w.c trivial: Fix misspelling of "firmware" in megaraid.c trivial: Fix misspelling of "firmware" in ql4_mbx.c trivial: Fix misspelling of "firmware" in acpi_memhotplug.c trivial: Fix misspelling of "firmware" in ipw2100.c trivial: Fix misspelling of "firmware" in atmel.c trivial: Fix misspelled firmware in Kconfig trivial: fix an -> a typos in documentation and comments trivial: fix then -> than typos in comments and documentation trivial: update Jesper Juhl CREDITS entry with new email trivial: fix singal -> signal typo trivial: Fix incorrect use of "loose" in event.c trivial: printk: fix indentation of new_text_line declaration trivial: rtc-stk17ta8: fix sparse warning ...
2009-01-06trivial: fix an -> a typos in documentation and commentsFrederik Schwarzer1-1/+1
It is always "an" if there is a vowel _spoken_ (not written). So it is: "an hour" (spoken vowel) but "a uniform" (spoken 'j') Signed-off-by: Frederik Schwarzer <schwarzerf@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-12-30Input: atkbd - broaden the Dell DMI signaturesMatthew Garrett1-0/+9
Some Dells need the dell input quirk applied but have a different vendor string in their DMI tables. Add an extra entry to cover these machines as well. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-12-20Input: atkbd - Samsung NC10 key repeat fixStuart Hopkins1-0/+25
This patch fixes the key repeat issue with the Fn+F? keys on the new Samsung NC10 Netbook, so that the keys can be defined and used within ACPID correctly, otherwise the keys repeat indefinately. This solves part of http://bugzilla.kernel.org/show_bug.cgi?id=12021 Signed-off-by: Stuart Hopkins <stuart@dodgy-geeza.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-12-20Input: atkbd - add keyboard quirk for HP Pavilion ZV6100 laptopRikard Ljungstrand1-0/+26
Add quirk for misbehaving volume buttons on HP Pavilion ZV6100 laptop which are not sending keyrelease events, as reported by Aaron Pickett. Signed-off-by: Rikard Ljungstrand <lrikard@student.chalmers.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-11-11Input: atkbd - cancel delayed work before freeing its structureJiri Pirko1-1/+1
Pointed out by Oleg Nesterov. Since delayed work is used here, use of flush_scheduled_work() is not sufficient in atkbd_disconnect(). It does not wait for scheduled delayed work to finish. This patch prevents delayed work to be processed after freeing atkbd structure (used struct delayed_work is part of atkbd) by cancelling this delayed work. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-11-11Input: atkbd - add keymap quirk for Inventec Symphony systemsMatthew Garrett1-0/+25
The Zepto 6615WD laptop (rebranded Inventec Symphony system) needs a key release quirk for its volume keys to work. The attached patch adds the quirk to the atkbd driver. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=460237 Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-09-10Input: atkbd - expand Latitude's force release quirk to other DellsMatthew Garrett1-5/+5
Dell laptops fail to send key up events for several of their special keys. There's an existing quirk in the kernel to handle this, but it's limited to the Latitude range. This patch extends it to cover all portable Dells. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-09-10Input: convert drivers to use strict_strtoul()Joe Rouvier1-15/+5
strict_strtoul() allows newline character at the end of the the input string and therefore is more user-friendly. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2008-06-30Input: atkbd - fix HP 2133 not sending release event for video switchJiri Kosina1-0/+26
Video switch key on HP 2133 doesn't send release event, so we have to create workaround similar to what we do for Dell Latitude, i.e. perform DMI match for the system and generate 'false' release event ourselves, so that userspace doesn't think that the key is stuck forever. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-06-17Merge branch 'for-linus' into nextDmitry Torokhov1-0/+2
Conflicts: drivers/input/mouse/appletouch.c