aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/atkbd.c
Commit message (Collapse)AuthorAgeFilesLines
* Input: atkbd - throttle LED switchingDmitry Torokhov2007-06-281-14/+26
| | | | | | | | | | | On some boxes keyboard controllers are too slow to withstand continuous flow of requests to turn keyboard LEDs on and off and start losing some keypresses or even all of them. Delay executing of LED switching request if we had another one within 50 ms thus easing load on the controller. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: keyboards - switch to using input_dev->dev.parentDmitry Torokhov2007-04-121-1/+1
| | | | | | | | In preparation for struct class_device -> struct device input core conversion, switch to using input_dev->dev.parent when specifying device position in sysfs tree. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: drivers/input/keyboard - don't access dev->private directlyDmitry Torokhov2007-04-121-2/+3
| | | | | | Use input_get_drvdata() and input_set_drvdata() instead. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: remove obsolete setup parameters from input driversDmitry Torokhov2007-02-181-4/+0
| | | | | | | They have been marked as __obsolete_setup() for several years, it is time for them to go. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6Dmitry Torokhov2006-12-081-3/+3
|\ | | | | | | | | | | Conflicts: drivers/usb/input/hid.h
| * WorkStruct: Pass the work_struct pointer instead of context dataDavid Howells2006-11-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the work_struct pointer to the work function rather than context data. The work function can use container_of() to work out the data. For the cases where the container of the work_struct may go away the moment the pending bit is cleared, it is made possible to defer the release of the structure by deferring the clearing of the pending bit. To make this work, an extra flag is introduced into the management side of the work_struct. This governs auto-release of the structure upon execution. Ordinarily, the work queue executor would release the work_struct for further scheduling or deallocation by clearing the pending bit prior to jumping to the work function. This means that, unless the driver makes some guarantee itself that the work_struct won't go away, the work function may not access anything else in the work_struct or its container lest they be deallocated.. This is a problem if the auxiliary data is taken away (as done by the last patch). However, if the pending bit is *not* cleared before jumping to the work function, then the work function *may* access the work_struct and its container with no problems. But then the work function must itself release the work_struct by calling work_release(). In most cases, automatic release is fine, so this is the default. Special initiators exist for the non-auto-release case (ending in _NAR). Signed-Off-By: David Howells <dhowells@redhat.com>
* | Input: handle serio_register_driver() errorsAkinobu Mita2006-11-231-2/+1
| | | | | | | | | | Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: keyboards - handle errors when registering input devicesDmitry Torokhov2006-11-051-30/+129
|/ | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: atkbd - supress "too many keys" error messageDmitry Torokhov2006-10-111-13/+41
| | | | | | | | | Many users seems to be annoyed by this warning so kill the message and implement a counter exported as a sysfs attribute so we still know what is going on. Make atkbd use attribute groups while we are at it. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
* Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6Dmitry Torokhov2006-09-191-43/+60
|\
| * Input: atkbd - fix overrun in atkbd_set_repeat_rate()Florin Malita2006-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | This was introduced in commit 3d0f0fa0cb554541e10cb8cb84104e4b10828468: bounds checking is performed against period[32] while indexing delay[4]. Spotted by Coverity, CID 1376. Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| * Input: atkbd - restore repeat rate when resumingDmitry Torokhov2006-08-041-43/+60
| | | | | | | | | | | | | | Make the AT keyboard driver restore previously set repeat rate when resuming. Noticed by Linus Torvalds. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: atkbd - support Microsoft Natural Elite Pro keyboardsDmitry Torokhov2006-09-141-3/+1
|/ | | | | | | | | Microsoft Natural Elite Pro keyboard produces unisual response to the GET ID command - single byte 0xaa (normally keyboards produce 2-byte response). Fail GET ID command so atkbd gets a change to do alternate probe. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: atkbd - fix hardware autorepeatDmitry Torokhov2006-06-271-1/+1
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: atkbd - fix HANGEUL/HANJA keysDmitry Torokhov2006-06-261-77/+131
| | | | | | | | Make atkbd report HANGEUL/HANJA keys by default and use correct scan codes for these keys (they were swapped). Also make sure their scancodes reported as EV_MSC/MSC_SCAN events. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: fix misspelling of Hangeul keyJerome Pinot2006-06-261-4/+4
| | | | | | | | | | Fix a mispelling of the korean alphabet name in the input subsystem. See http://en.wikipedia.org/wiki/Hangeul#Names for more details. KEY_HANGUEL left to not break people Signed-off-by: Jerome Pinot <ngc891@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: fix potential overflows in driver/input/keyboardDmitry Torokhov2006-06-261-4/+7
| | | | | | | Change all sprintfs into snprintfs to make sure we won't stomp on data adjacent to our buffers. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: atkbd - disable softrepeat for dumb keyboardsVojtech Pavlik2006-03-141-3/+0
| | | | | | | | Do not activate softrepeat by default on dumb keyboards as it clashes with their own hardware repeat (for example Dell DRAC3). Softrepeat can still be activated manually via module parameter or sysfs. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: atkbd - fix complaints about 'releasing unknown key 0x7f'Vojtech Pavlik2006-03-141-6/+6
| | | | | | | | Fix bat_xl and err_xl logic causing atkbd to complain about 'unknown key 0x7f'. Noted by Ben LaHaise. Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: atkbd - semaphore to mutex conversionIngo Molnar2006-02-191-4/+5
| | | | | | | | | The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: atkbd - don't lose keymap settings when reconnecting keyboardDmitry Torokhov2006-01-051-1/+1
| | | | | | | | Call serio_reconnect() instead of serio_rescan() when detecting that a new keyboard was plugged in. This should help KVM uses losing custom keymap settings when switching between boxes. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: atkbd - speed up setting leds/repeat stateDmitry Torokhov2005-11-201-31/+68
| | | | | | | | | Changing led state is pretty slow operation; when there are multiple requests coming at a high rate they may interfere with normal typing. Try optimize (skip) changing hardware state when multiple requests are coming back-to-back. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* [PATCH] drivers/input/keyboard: convert to dynamic input_dev allocationDmitry Torokhov2005-10-281-86/+102
| | | | | | | | | Input: convert drivers/input/keyboard to dynamic input_dev allocation This is required for input_dev sysfs integration Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Input: atkbd - handle keyboards generating scancode 0x7fVojtech Pavlik2005-09-051-3/+7
| | | | | | | | Extend bat_xl handling to do err_xl handling, so that keyboards using 0x7f scancode for regular keys can work. Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/dtor/input.git manuallyLinus Torvalds2005-06-271-3/+3
|\ | | | | | | Some manual fixups required due to clashes with the PF_FREEZE cleanups.
| * Input: whitespace fixes in drivers/input/keyboardDmitry Torokhov2005-05-291-3/+3
| | | | | | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| * Input: Fix fast scrolling scancodes in atkbd.cVojtech Pavlik2005-05-291-3/+3
| | | | | | | | | | Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | [PATCH] Driver Core: drivers/i2c/chips/w83781d.c - ↵Yani Ioannou2005-06-201-2/+2
| | | | | | | | | | | | | | drivers/s390/block/dcssblk.c: update device attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | [PATCH] input: disable scroll feature on AT keyboardsVojtech Pavlik2005-06-071-1/+1
| | | | | | | | | | | | | | | | | | This patch disables the scroll feature on AT keyboards by default, because it causes the numbers of mouse devices to shift, breaking user setups. Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] input: Fix fast scrolling scancodes in atkbd.cVojtech Pavlik2005-05-281-3/+3
|/ | | | | | Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] drivers/input/keyboard/atkbd.c: fix off by one errorsAdrian Bunk2005-05-171-2/+4
| | | | | | | | | | | | This patch fixes two possible off by one errors found by the Coverity checker (look at the period[i] and delay[j] in the two first unchanged lines). Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Vojtech Pavlik <vojtech@suse.cz> Cc: Dmitry Torokhov <dtor_core@ameritech.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Change synchronize_kernel to _rcu and _schedPaul E. McKenney2005-05-011-1/+1
| | | | | | | | | | This patch changes calls to synchronize_kernel(), deprecated in the earlier "Deprecate synchronize_kernel, GPL replacement" patch to instead call the new synchronize_rcu() and synchronize_sched() APIs. Signed-off-by: Paul E. McKenney <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Linux-2.6.12-rc2Linus Torvalds2005-04-161-0/+1148
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!