History log of /drivers/input/serio/i8042.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1729ad1f4f9e167ade84ca8b5269695c42351160 29-Oct-2011 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: i8042 - also perform controller reset when suspending

In addition to some laptops needing i8042 reset after resuming from S2R to
get their touchpads working there is another class of laptops - ones that
need i8042 reset before going to S2R, otherwise they will simply reboot
instead of resuming.

See https://bugzilla.kernel.org/show_bug.cgi?id=15612

This change forces reset of i8042 before doing S2R.

Reported-by: Stefan Koch <stefan_koch@gmx.net>
Tested-by: Alexander van Loon <a.vanloon@alexandervanloon.nl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
a2a94e7323dad972f23b9000cab150026c929b9f 31-Mar-2011 Paul Bolle <pebolle@tiscali.nl> Input: i8042 - downgrade selftest error message to dbg()

On a "really fragile" laptop I noticed a single
i8042.c: i8042 controller selftest failed. (0x1 != 0x55)

error in the log. But there's no reason to print this message at
KERN_ERR level each time that loop fails, especially since the message
telling about the overall selftest failure is printed at KERN_INFO level
(on X86).

Add an actual error message for non-X86 systems, where a selftest
failure is (apparently) more serious. Remove a space in an another error
message.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
f8313ef1f448006207f12c107123522c8bc00f15 08-Jan-2011 Jiri Kosina <jkosina@suse.cz> Input: i8042 - introduce 'notimeout' blacklist for Dell Vostro V13

i8042 controller present in Dell Vostro V13 errorneously signals spurious
timeouts.

Introduce i8042.notimeout parameter for ignoring i8042-signalled timeouts
and apply this quirk automatically for Dell Vostro V13, based on DMI match.

In addition to that, this machine also needs to be added to nomux blacklist.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
4eb3c30b2e034b673df3e8f21b497e39f3911a02 30-Nov-2010 Joe Perches <joe@perches.com> Input: i8042 - use pr_<level>, pr_fmt, fix dbg and __FILE__ use

Standardized message logging prefixes.
Removed \n from dbg macro, added \n to each dbg call site.
Removed direct use of __FILE__ from dbg, converted to pr_fmt(fmt)
Added non-debug printf argument verification of dbg calls
Removed "i8042.c" from printks, converted to pr_<level>

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
3136baf8d09458bb04332b81494fd13ad90fe94a 18-Oct-2010 Dmitry Torokhov <dmitry.torokhov@gmail.com> Merge branch 'for-linus' into next
594d63632024636a962be508dfe5ee6bfd309160 30-Sep-2010 Christoph Fritz <chf.fritz@googlemail.com> Input: i8042 - use unsigned char for 0x90

Keep the file consistent and make clear that we mean 144 instead of -112.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
af045b86662f17bf130239a65995c61a34f00a6b 01-Sep-2010 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: i8042 - fix device removal on unload

We need to call platform_device_unregister(i8042_platform_device)
before calling platform_driver_unregister() because i8042_remove()
resets i8042_platform_device to NULL. This leaves the platform device
instance behind and prevents driver reload.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=16613

Reported-by: Seryodkin Victor <vvscore@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
c7ff0d9c92435e836e13aaa8d0e56d4000424bcc 11-Aug-2010 TAMUKI Shoichi <tamuki@linet.gr.jp> panic: keep blinking in spite of long spin timer mode

To keep panic_timeout accuracy when running under a hypervisor, the
current implementation only spins on long time (1 second) calls to mdelay.
That brings a good effect, but the problem is the keyboard LEDs don't
blink at all on that situation.

This patch changes to call to panic_blink_enter() between every mdelay and
keeps blinking in spite of long spin timer mode.

The time to call to mdelay is now 100ms. Even this change will keep
panic_timeout accuracy enough when running under a hypervisor.

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/input/serio/i8042.c
1ca56e513a9fd356d5a9e0de45dbe0e189e00386 21-Jul-2010 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: i8042 - reset keyboard controller wehen resuming from S2R

Some laptops, such as Lenovo 3000 N100, require keyboard controller reset
in order to have touchpad operable after suspend to RAM. Even if box does
not need the reset it should be safe to do so, so instead of chasing
after misbehaving boxes and grow DMI tables, let's reset the controller
unconditionally.

Reported-and-tested-by: Jerome Lacoste <jerome.lacoste@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
00eef7bd01c7598d195699983c5290d901df19ad 15-Apr-2010 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: wacom - switch mode upon system resume
Revert "Input: wacom - merge out and in prox events"
Input: matrix_keypad - allow platform to disable key autorepeat
Input: ALPS - add signature for HP Pavilion dm3 laptops
Input: i8042 - spelling fix
Input: sparse-keymap - implement safer freeing of the keymap
Input: update the status of the Multitouch X driver project
Input: clarify the no-finger event in multitouch protocol
Input: bcm5974 - retract efi-broken suspend_resume
Input: sparse-keymap - free the right keymap on error
2c860a1101471a69f7a6778b7b1fb43344c38619 06-Apr-2010 Dominik Brodowski <linux@dominikbrodowski.net> Input: i8042 - spelling fix

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
/drivers/input/serio/i8042.c
a818d8e43147f40864363456b37a00b819439307 14-Mar-2010 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table
Input: ALPS - fix stuck buttons on some touchpads
Input: wm831x-on - convert to use genirq
Input: ads7846 - add wakeup support
Input: appletouch - fix integer overflow issue
Input: ad7877 - increase pen up imeout
Input: ads7846 - add support for AD7843 parts
Input: bf54x-keys - fix system hang when pressing a key
Input: alps - add support for the touchpad on Toshiba Tecra A11-11L
Input: remove BKL, fix input_open_file() locking
Input: serio_raw - remove BKL
Input: mousedev - remove BKL
Input: add driver for TWL4030 vibrator device
Input: enable remote wakeup for PNP i8042 keyboard ports
Input: scancode in get/set_keycodes should be unsigned
Input: i8042 - use platfrom_create_bundle() helper
Input: wacom - merge out and in prox events
Input: gamecon - fix off by one range check
Input: wacom - replace WACOM_PKGLEN_PENABLED
ec62e1c8dd2f9b2a833b48d4a2f58f0c5e07384c 09-Mar-2010 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: i8042 - use platfrom_create_bundle() helper

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
318ae2edc3b29216abd8a2510f3f80b764f06858 08-Mar-2010 Jiri Kosina <jkosina@suse.cz> Merge branch 'for-next' into for-linus

Conflicts:
Documentation/filesystems/proc.txt
arch/arm/mach-u300/include/mach/debug-macro.S
drivers/net/qlge/qlge_ethtool.c
drivers/net/qlge/qlge_main.c
drivers/net/typhoon.c
c2d1a2a11b9b29c3be1dd781dc88518ffab8d4be 17-Feb-2010 Alan Jenkins <alan-jenkins@tuffmail.co.uk> Input: i8042 - fix KBC jam during hibernate

633aae2 "Input: i8042 - switch to using dev_pm_ops" removed handling
for PMSG_THAW, since we do not need to do anything during freeze and
thus it was thougt that thaw is not needed as well. However, there is
a period when interrupts are kept off, and if key happens to be pressed
during that time KBC becomes jammed. To avoid the jam we simply need
to poll KBC once during thaw.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
0747e3bc54b43faaa88ab0b37eb5b6f50972965b 07-Jan-2010 Stefan Weil <weil@mail.berlios.de> Fix spelling of 'platform' in log messages

Replace platfrom -> platform.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
/drivers/input/serio/i8042.c
967c9ef9b8c3bdec1bd3a380edac19e0b9fbeadc 12-Dec-2009 Matthew Garrett <mjg@redhat.com> Input: i8042 - allow installing platform filters for incoming data

Some hardware (such as Dell laptops) signal a variety of events through
the i8042 controller, even if these don't map to keyboard events. Add
support for drivers to filter the i8042 event stream in order to respond
to these events and (if appropriate) block them from entering the input
stream.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
4e8d340daac46cec8a0f8b3b0f228274fac913ba 12-Dec-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: i8042 - fix locking in interrupt routine

We need to protect not only i8042 status and data register from concurrent
access from IRQ 1 and 12 but the rest of the shared state as well, so let's
move release of i8042_lock in i8042_interrupt() a little bit further down.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
ee1e82cee5e463a885d3c71acb2c769490e6927f 03-Nov-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: i8042 - try to get stable CTR value when initializing

If user presses keys while i8042 is being initialized there is a chance
that keyboard data will be mistaken for results of Read Control Register
command causing futher troubles. Work around this issue by reading CTR
several times and stop when we get matching results.

Reported-and-tested-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
d3d2dfe2d723051cac323017af5d0180ba8de4c1 09-Oct-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: i8042 - print debug data when testing AUX IRQ delivery

Sometimes it is not clear why IRQ delivery test failed so let's
add some debug printks so we know the exact reason.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
181d683d752c432635eda0f182ee71548c1f1820 16-Sep-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: libps2 - additional locking for i8042 ports

The serio ports on i8042 are not completely isolated; while we provide
enough locking to ensure proper serialization when accessing control
and data registers AUX and KBD ports can still have an effect on each
other on PS/2 protocol level. The most prominent effect is that
issuing a command for the device connected to one port may cause
abort of the command currently executing by the device connected to
another port.

Since i8042 nor serio subsystem are not aware of the details of the
PS/2 protocol (length of the commands and their replies and so on) the
locking should be done on libps2 level by adding special handling when
we see that we are dealing with serio port on i8042.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
f81134163fc785622f58af27363079ba1de7c7aa 10-Sep-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: i8042 - use platform_driver_probe

i8042 is not hot-pluggable and we create the device when we register
the driver, so let's save some memory by using platform_device_probe
and using __init instead of __devinit.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
386b384900a200d5fcabdd4a9c27eb21db606cd4 10-Sep-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: i8042 - use boolean type where it makes sense

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
5ddbc77c3eb54336fcd44b7b66b44784d65677e2 10-Sep-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: i8042 - try disabling and re-enabling AUX port at close

Ever since we switched from having a polling timer to registering IRQ
handlers for both keyboard and AUX ports at the driver registration
time, on certain boxes probing for a mouse results in keyboard
stopping working. The only real difference between old and new way is
that before we disabled ports after unsuccessful probe whereas now we
leave them as is. Try to emulate the old behavior by disabling and
immediately re-enabling AUX and KBD ports when corresponding serio
port is being closed.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
1c7827ae70e7c8456e08f7bb9ef2238d27814cbe 04-Sep-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: i8042 - bypass AUX IRQ delivery test on laptops

It seems that many laptops do not fully implement AUX LOOP command in
their keyboard controllers, causing issues with touchpad detection.
We know however that almost every laptop/portable uses a PS/2 pointing
device and, even if user disables it in favor of an external mouse,
the system will not use IRQ 12 for anything else. Therefore we may
bypass AUX IRQ delivery test when running on a laptop and assume that
it is routed properly.

Just to be safe we require the box to have good PNP data in order to
bypass the test.

[Jin Dongming <jin.dongming@np.css.fujitsu.com>: fix crash caused
by missing terminator in the DMI table]

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
ebd7768daeb39b0691e25175e25b980f13e913e2 23-Jul-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: i8042 - switch to using dev_pm_ops

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
ddaa43433dd77535e4e132787f199f58ce224f44 08-Jul-2009 Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Input: mark serio and i8042 as suspended when hibernating too

Serio ports are not being restarted any longer because resume operations
after hibernate do nothing, since the device has not been marked as
suspended. This happens because suspend is only considering the SUSPEND
event but not the FREEZE event.

Note that this driver has still to migrate to dev_pm_ops, but this fixes
this particular bug now.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
7e044e056a6aa0dc695db50461d7b326fde15e8b 10-May-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: serio - do not use deprecated dev.power.power_state

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
5ea2fc6491631d2c3f346dcb0d9d6edd44ccf4cd 09-Apr-2009 Arjan van de Ven <arjan@linux.intel.com> Input: i8042 - introduce a tougher reset

Some touchpads don't reset right the first time (MSI Wind U-100 for
example). This patch will retry the reset up to 5 times.

In addition, on x86, we don't fail entire i8042 initialization if
controller reset fails in hope that keyboard port will still be
functional and user will still get a working keyboard. This is
especially important on netbooks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
2f6a77d56523c14651236bc401a99b0e2aca2fdd 17-Jun-2008 Jiri Kosina <jkosina@suse.cz> Input: i8042 - retry failed CTR writes when resuming

There are systems that fail in i8042_resume() with

i8042: Can't write CTR to resume

as i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR) fails even though the
controller claimed itself to be ready before.

One retry after failing write fixes the problems on the failing systems.

Reported-by: Helmut Schaa <hschaa@novell.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
d35895db7aadc24086b6002101154eec478e9dd6 27-May-2008 Bruno Prémont <bonbons@linux-vserver.org> Input: i8042 - make sure Dritek quirk is invoked at resume

Also do not fail i8042 entire initialization if enabling dritek extension
fails.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
d38501a379b7827a9bf916ba79d53f66c4ca7caa 10-Mar-2008 Roland Dreier <rdreier@cisco.com> Input: i8042 - fix warning on non-x86 builds

Commit c18bab80 ("Input: i8042 - non-x86 build fix") introduced the
following warning on non-x86 builds:

drivers/input/serio/i8042.c: In function 'i8042_probe':
drivers/input/serio/i8042.c:1154: warning: unused variable 'param'

Fix this by moving the parameter variable declaration into the #ifdef too.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
c18bab80d16f04db3e263cc97522d21693cad2ce 06-Feb-2008 Andrew Morton <akpm@linux-foundation.org> Input: i8042 - non-x86 build fix

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
8987fec0de0a4b71dd345052ea4271eaf05f7956 21-Jan-2008 Carlos Corbacho <carlos@strangeworlds.co.uk> Input: i8042 - add Dritek keyboard extension quirk

Some Wistron based laptops need us to explicitly enable the 'Dritek
keyboard extension' to make their extra keys start generating scancodes.
Originally, this was just confined to older laptops, but a few Acer
laptops have turned up in 2007 that also need this again.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
3b04a61107dfe46dbfc1796298b59ca3c0a09cd9 27-Nov-2007 Julia Lawall <julia@diku.dk> Input: drop redundant includes of moduleparam.h

Drop #include <linux/moduleparam.h> in files that also include
linux/module.h, since module.h includes moduleparam.h already.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
a8399c512b5fa2cf80831f5b4cd3adffd299fbe3 04-Nov-2007 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: i8042 - use synchronize_irq() instead of synchronize_sched()

RT guys advised me that in their kernels synchronize_sched() will not
work to ensure that all IRQ handlers run to their completion and that
synchronize_irq() should be used instead.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
553a05b8821f5a6bc633e97187933e2157b2d291 22-Oct-2007 Márton Németh <nm127@freemail.hu> Input: i8042 - export i8042_command()

Export the i8042_command() function which manages the mutual
exclusion with the help of the i8042_lock spinlock. This allows
to access i8042 safely from other parts of the kernel.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
b981d8b3f5e008ff10d993be633ad00564fc22cd 13-Oct-2007 Dmitry Torokhov <dmitry.torokhov@gmail.com> Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6

Conflicts:

drivers/macintosh/adbhid.c
7a1904c32c5a18a1123fa0ea5040439337617877 05-Sep-2007 Ralf Baechle <ralf@linux-mips.org> Input: i8042 - fix modpost warning

i8042_unregister_ports's only caller i8042_remove is a __devexit function
so make it __devexit too.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
e3758b2ab61b3001b9db4582559bbaeba5e24a29 30-Aug-2007 Fernando Luis Vázquez Cao <fernando@oss.ntt.co.jp> Input: i8042 - fix retrun value of i8042_aux_test_irq

We should not return IRQ_HANDLED if we didn't handle the interrupt.

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
018db6bb0d726c3683a5e1eb4621e728965db94c 18-Jul-2007 Markus Armbruster <armbru@pond.sub.org> Input: i8042 - restore control register when enabling port fails

When enabling interrupts for a port fails, the interrupt enable and
port enable bits remain set in i8042_ctr. Later writes of i8042_ctr
to the hardware could accidentally retry enabling interrupts. Clear
the bits on failure.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
d2ada5597d33a9108acb2caf912f85cbc9caab1e 08-May-2007 Roland Scheidegger <sroland@tungstengraphics.com> Input: i8042 - fix AUX port detection with some chips

The i8042 driver fails detection of the AUX port with some chips,
because they apparently do not change the I8042_CTR_AUXDIS bit
immediately. This is known to affect at least HP500/HP510 notebooks,
consequently the built-in touchpad will not work. The patch will simply
reread the value until it gets the expected value or a retry limit is
hit, without touching other workaround code in the same area.

Signed-off-by: Roland Scheidegger <sroland@tungstengraphics.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
bc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775 01-May-2007 Dmitry Torokhov <dtor@insightbb.com> Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6

Conflicts:

drivers/usb/input/Makefile
drivers/usb/input/gtco.c
8d04ddb64c7bf62aec1102fddc5336a68bcaebe9 12-Apr-2007 Dmitry Torokhov <dtor@insightbb.com> Input: i8042 - disable interfaces when switching to legacy mode

Disable both keyboard and auxiliary interfaces before switching
to legacy mode to prevent atkbd from getting "empty" interrupts.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
3ca5de6dd4ec5a139b2b8f00dce3e4726ca91af1 08-Mar-2007 Dmitry Torokhov <dtor@insightbb.com> Input: i8042 - another attempt to fix AUX delivery checks

Do not assume that AUX_LOOP command is broken unless it
completes successfully but returns wrong (unexpected) data.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
62b529a7b9c11880a8820494a25db0e2ecdf3bed 18-Feb-2007 Dmitry Torokhov <dtor@insightbb.com> Input: remove obsolete setup parameters from input drivers

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>
/drivers/input/serio/i8042.c
82dd9eff4bf3b17f5f511ae931a1f350c36ca9eb 18-Feb-2007 Dmitry Torokhov <dtor@insightbb.com> Input: i8042 - let serio bus suspend ports

Let serio subsystem take care of suspending the ports; concentrate
on suspending/resuming the controller itself.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
1e4865f8d469b1795e77877410951e5b808a2c4e 10-Feb-2007 Dmitry Torokhov <dtor@insightbb.com> Input: i8042 - fix AUX IRQ delivery check

On boxes that do not implement AUX LOOP command we can not
verify AUX IRQ delivery and must assume that it is wired
properly.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
19f3c3e37314a234998fd75f5ea9388dfb6ab00a 18-Jan-2007 Dmitry Torokhov <dtor@insightbb.com> Input: i8042 - really suppress ACK/NAK during panic blink

On some boxes panic blink procedure manages to send both bytes
to keyboard contoller before getting first ACK so we need to
make i8042_suppress_kbd_ack a counter instead of boolean.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
a216a4b6e6f1fdfd3d1f20f03d9d45f05a63d643 17-Nov-2006 Dmitry Torokhov <dtor@insightbb.com> Input: i8042 - fix shutdown issue on some boxes with active MUXes

MUX error handling has a workaround for KBCs that get confused which
port data came from and signal MUXERR while data is actually good.
Unfortunately this workaround hurts with KBCs that signal timeouts
as 0xfc (spec says that only 0xfd, 0xfe and 0xff are alowed with
MUXERR) since it causes endless attempts to rescan i8042 serio
ports. The solution is to treat 0xfc as timeout (0xfe).

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
f4e3c711b31cea401b03ce39d4b5f1a30279094c 03-Nov-2006 Dmitry Torokhov <dtor@insightbb.com> Input: i8042 - remove unneeded call to i8042_interrupt()

Remove call to i8042_interrupt() from i8042_aux_write(). According
to Vojtech it may cause problems with older controllers if it is
called right after real interrupt. Also it is not needed anymore
since we register IRQs early and not waiting for serio ports to
be opened.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
817e6ba3623de9cdc66c6aba90eae30b5588ff11 11-Oct-2006 Dmitry Torokhov <dtor@insightbb.com> Input: i8042 - supress ACK/NAKs when blinking during panic

This allows using SysRq and not fill logs with complaints from atkbd.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
7d12e780e003f93433d49ce78cfedf4b4c52adc5 05-Oct-2006 David Howells <dhowells@redhat.com> IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

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)
/drivers/input/serio/i8042.c
de9ce703c6b807b1dfef5942df4f2fadd0fdb67a 11-Sep-2006 Dmitry Torokhov <dtor@insightbb.com> Input: i8042 - get rid of polling timer

Remove polling timer that was used to detect keybord/mice hotplug and
register both IRQs right away instead of waiting for a driver to
attach to a port.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
dace145374b8e39aeb920304c358ab5e220341ab 02-Jul-2006 Thomas Gleixner <tglx@linutronix.de> [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/input/serio/i8042.c
6ab3d5624e172c553004ecc862bfeac16d9d68b7 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de> Remove obsolete #include <linux/config.h>

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
/drivers/input/serio/i8042.c
87fd6318a6c381ba1e10a4f56907d11ae4a987b9 28-Dec-2005 Dmitry Torokhov <dtor_core@ameritech.net> Input: i8042 - convert to the new platform device interface

Do not use platform_device_register_simple() as it is going away,
implement ->probe() and ->remove() functions so manual binding and
unbinding will work with this driver.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 09-Nov-2005 Russell King <rmk@dyn-67.arm.linux.org.uk> [DRIVER MODEL] Convert platform drivers to use struct platform_driver

This allows us to eliminate the casts in the drivers, and eventually
remove the use of the device_driver function pointer methods for
platform device drivers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/input/serio/i8042.c
d052d1beff706920e82c5d55006b08e256b5df09 29-Oct-2005 Russell King <rmk@dyn-67.arm.linux.org.uk> Create platform_device.h to contain all the platform device details.
Convert everyone who uses platform_bus_type to include
linux/platform_device.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/input/serio/i8042.c
9480e307cd88ef09ec9294c7d97ebec18e6d2221 28-Oct-2005 Russell King <rmk@arm.linux.org.uk> [PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks

In PM v1, all devices were called at SUSPEND_DISABLE level. Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level. However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.

Since this is obsolete infrastructure which is no longer necessary,
we can remove it. Here's an (untested) patch to do exactly that.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/input/serio/i8042.c
d39969deee4b541be4ee5789a2e4c14511c886e2 10-Sep-2005 Dmitry Torokhov <dtor_core@ameritech.net> Input: i8042 - use kzalloc instead of kcalloc

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
945ef0d428bc33c639e49d27fb8cc765adec3fdf 04-Sep-2005 Dmitry Torokhov <dtor_core@ameritech.net> Input: i8042 - add i8042.nokbd module option to allow supressing
creation of keyboard port.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
8d5987a6e17fa36776a0c9964db0f24c3d070862 04-Sep-2005 Dmitry Torokhov <dtor_core@ameritech.net> Input: make i8042_platform_init return 'real' error code

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
0854e52d86080c1043bc8988daef2ebda4775f64 04-Sep-2005 Dmitry Torokhov <dtor_core@ameritech.net> Input: i8042 - clean up initialization code; abort if we
can't create all ports.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
463a4f76a79bce00ca8964e0b2ebf7f10f376965 15-Jul-2005 Dmitry Torokhov <dtor_core@ameritech.net> Input: i8042 - don't use negation to mark AUX data

Currently i8042_command() negates data coming from the AUX port
of keyboard controller; this is not a very reliable indicator.
Change i8042_command() to fail if response to I8042_CMD_AUX_LOOP
is not coming from AUX channel and get rid of negation.

Based on patch by Vojtech Pavlik.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
b2b18660066997420b716c1881a6be8b82700d97 25-Jun-2005 Paul E. McKenney <paulmck@us.ibm.com> [PATCH] RCU: clean up a few remaining synchronize_kernel() calls

2.6.12-rc6-mm1 has a few remaining synchronize_kernel()s, some (but not
all) in comments. This patch changes these synchronize_kernel() calls (and
comments) to synchronize_rcu() or synchronize_sched() as follows:

- arch/x86_64/kernel/mce.c mce_read(): change to synchronize_sched() to
handle races with machine-check exceptions (synchronize_rcu() would not cut
it given RCU implementations intended for hardcore realtime use.

- drivers/input/serio/i8042.c i8042_stop(): change to synchronize_sched() to
handle races with i8042_interrupt() interrupt handler. Again,
synchronize_rcu() would not cut it given RCU implementations intended for
hardcore realtime use.

- include/*/kdebug.h comments: change to synchronize_sched() to handle races
with NMIs. As before, synchronize_rcu() would not cut it...

- include/linux/list.h comment: change to synchronize_rcu(), since this
comment is for list_del_rcu().

- security/keys/key.c unregister_key_type(): change to synchronize_rcu(),
since this is interacting with RCU read side.

- security/keys/process_keys.c install_session_keyring(): change to
synchronize_rcu(), since this is interacting with RCU read side.

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>
/drivers/input/serio/i8042.c
2673c836ab9a44b02d45ae5c1c44c03df138dba4 28-May-2005 Vojtech Pavlik <vojtech@suse.cz> Input: Only write the CTR in i8042 resume function. Reading it is
wrong, since it may (will) contain nonsensical data.

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
be15692310ec0e93998d763931089cb21386a058 28-May-2005 Vojtech Pavlik <vojtech@suse.cz> Input: Remove (now) unused variable in i8042.c

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
/drivers/input/serio/i8042.c
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

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!
/drivers/input/serio/i8042.c