summaryrefslogtreecommitdiff
path: root/drivers/input/serio/i8042.c
AgeCommit message (Collapse)Author
2016-08-31Input: i8042 - set up shared ps2_cmd_mutex for AUX portsDmitry Torokhov
[ Upstream commit 47af45d684b5f3ae000ad448db02ce4f13f73273 ] The commit 4097461897df ("Input: i8042 - break load dependency ...") correctly set up ps2_cmd_mutex pointer for the KBD port but forgot to do the same for AUX port(s), which results in communication on KBD and AUX ports to clash with each other. Fixes: 4097461897df ("Input: i8042 - break load dependency ...") Reported-by: Bruno Wolff III <bruno@wolff.to> Tested-by: Bruno Wolff III <bruno@wolff.to> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
2016-08-19Input: i8042 - break load dependency between atkbd/psmouse and i8042Dmitry Torokhov
[ Upstream commit 4097461897df91041382ff6fcd2bfa7ee6b2448c ] As explained in 1407814240-4275-1-git-send-email-decui@microsoft.com we have a hard load dependency between i8042 and atkbd which prevents keyboard from working on Gen2 Hyper-V VMs. > hyperv_keyboard invokes serio_interrupt(), which needs a valid serio > driver like atkbd.c. atkbd.c depends on libps2.c because it invokes > ps2_command(). libps2.c depends on i8042.c because it invokes > i8042_check_port_owner(). As a result, hyperv_keyboard actually > depends on i8042.c. > > For a Generation 2 Hyper-V VM (meaning no i8042 device emulated), if a > Linux VM (like Arch Linux) happens to configure CONFIG_SERIO_I8042=m > rather than =y, atkbd.ko can't load because i8042.ko can't load(due to > no i8042 device emulated) and finally hyperv_keyboard can't work and > the user can't input: https://bugs.archlinux.org/task/39820 > (Ubuntu/RHEL/SUSE aren't affected since they use CONFIG_SERIO_I8042=y) To break the dependency we move away from using i8042_check_port_owner() and instead allow serio port owner specify a mutex that clients should use to serialize PS/2 command stream. Reported-by: Mark Laws <mdl@60hz.org> Tested-by: Mark Laws <mdl@60hz.org> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
2015-03-09Input: i8042 - allow KBD and AUX ports to wake up from suspend-to-idleRafael J. Wysocki
While registering serio device for i8042, mark them as wakeup-capable and check their user space wakeup settings in i8042_pm_suspend() and i8042_pm_resume() to enable or disable, respectively, their interrupts to wake up the system. This makes it possible to use the PC keyboard to wake up the system from suspend-to-idle, among other things, after writing "enabled" to the keyboard serio device's power/wakeup sysfs attribute. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-19Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input subsystem fixes from Dmitry Torokhov. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: uinput - fix ioctl nr overflow for UI_GET_SYSNAME/VERSION Input: I8042 - add Acer Aspire 7738 to the nomux list Input: elantech - support new ICs types for version 4 Input: i8042 - reset keyboard to fix Elantech touchpad detection MAINTAINERS: remove Dmitry Torokhov's alternate address
2015-01-07Input: i8042 - reset keyboard to fix Elantech touchpad detectionSrihari Vijayaraghavan
On some laptops, keyboard needs to be reset in order to successfully detect touchpad (e.g., some Gigabyte laptop models with Elantech touchpads). Without resettin keyboard touchpad pretends to be completely dead. Based on the original patch by Mateusz Jończyk this version has been expanded to include DMI based detection & application of the fix automatically on the affected models of laptops. This has been confirmed to fix problem by three users already on three different models of laptops. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81331 Cc: stable@vger.kernel.org Signed-off-by: Srihari Vijayaraghavan <linux.bug.reporting@gmail.com> Acked-by: Mateusz Jończyk <mat.jonczyk@o2.pl> Tested-by: Srihari Vijayaraghavan <linux.bug.reporting@gmail.com> Tested by: Zakariya Dehlawi <zdehlawi@gmail.com> Tested-by: Guillaum Bouchard <guillaum.bouchard@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-03Merge branch 'platform/remove_owner' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next Remove all .owner fields from platform drivers
2014-10-31Revert "Input: i8042 - disable active multiplexing by default"Dmitry Torokhov
This reverts commit 68da166491655bc54051bf04c78ce648e2e33508. It turns out that the assertion about scope of regressions due to always keeping keyboard controller in legacy mode was proven wrong. There are laptops, such as Clevo W650SH, that only have internal touchpad (no external PS/2 ports), that require active multiplexing mode to switch the touchpad (Elantech) into native mode instead of basic PS/2 emulation. Reported-by: Roel Aaij <roel.aaij@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-20input: serio: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-11Input: i8042 - disable active multiplexing by defaultDmitry Torokhov
Active multiplexing is a nice feature as it allows several pointing devices (such as touchpad and external mouse) use their native protocols at the same time. Unfortunately many manufacturers do not implement the feature properly even though they advertise it. The problematic implementations are never fixed, since Windows by default does not use this mode, and move from one BIOS/model of laptop to another. When active multiplexing is broken turning it on usually results in touchpad, keyboard, or both unresponsive. With PS/2 usage on decline (most of PS/2 devices in use nowadays are internal laptop touchpads), I expect number of users who have laptops with working MUX implementation, docking stations with external PS/2 ports, and who are still using external PS/2 mice, to be rather small. Let's flip the default to be OFF and allow activating it through i8042.nomux=0 kernel option. We'll also keep DMI table where we can record known good models. Acked-by: Jiri Kosina <jkosina@suse.cz> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-09-11Input: i8042 - also set the firmware id for MUXed portsHans de Goede
So that firmware-id matching can be used with multiplexed aux ports too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-04-19Input: i8042 - add firmware_id supportHans de Goede
Fill in the new serio firmware_id sysfs attribute for pnp instantiated 8042 serio ports. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-11-15Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "Usual earth-shaking, news-breaking, rocket science pile from trivial.git" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits) doc: usb: Fix typo in Documentation/usb/gadget_configs.txt doc: add missing files to timers/00-INDEX timekeeping: Fix some trivial typos in comments mm: Fix some trivial typos in comments irq: Fix some trivial typos in comments NUMA: fix typos in Kconfig help text mm: update 00-INDEX doc: Documentation/DMA-attributes.txt fix typo DRM: comment: `halve' -> `half' Docs: Kconfig: `devlopers' -> `developers' doc: typo on word accounting in kprobes.c in mutliple architectures treewide: fix "usefull" typo treewide: fix "distingush" typo mm/Kconfig: Grammar s/an/a/ kexec: Typo s/the/then/ Documentation/kvm: Update cpuid documentation for steal time and pv eoi treewide: Fix common typo in "identify" __page_to_pfn: Fix typo in comment Correct some typos for word frequency clk: fixed-factor: Fix a trivial typo ...
2013-10-14treewide: fix "distingush" typoMichael Opdenacker
Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-09-18Input: i8042 - i8042_flush fix for a full 8042 bufferAndrey Moiseev
When 8042 internal data buffer is full, the driver erroneously decides that the controller is not present. i8042_flush returns the number of flushed bytes, which is in 0 - I8042_BUFFER_SIZE range inclusive. Therefore, i8042_flush has no way to indicate an error. Moreover i8042_controller_check takes initially full buffer (i8042_flush returned I8042_BUFFER_SIZE) as a sign of absence of the controller. Let's change i8042 to return success/error instead and make sure we do not return error prematurely. Signed-off-by: Andrey Moiseev <o2g.org.ru@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24Input: remove use of __devexitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24Input: remove use of __devexit_pBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2011-11-05Input: i8042 - also perform controller reset when suspendingDmitry Torokhov
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>
2011-03-31Input: i8042 - downgrade selftest error message to dbg()Paul Bolle
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>
2011-01-08Input: i8042 - introduce 'notimeout' blacklist for Dell Vostro V13Jiri Kosina
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>
2010-11-30Input: i8042 - use pr_<level>, pr_fmt, fix dbg and __FILE__ useJoe Perches
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>
2010-10-17Merge branch 'for-linus' into nextDmitry Torokhov
2010-09-29Input: i8042 - use unsigned char for 0x90Christoph Fritz
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>
2010-08-31Input: i8042 - fix device removal on unloadDmitry Torokhov
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>
2010-08-11panic: keep blinking in spite of long spin timer modeTAMUKI Shoichi
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>
2010-07-20Input: i8042 - reset keyboard controller wehen resuming from S2RDmitry Torokhov
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>
2010-04-15Merge branch 'for-linus' of ↵Linus Torvalds
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
2010-04-05Input: i8042 - spelling fixDominik Brodowski
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo
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>
2010-03-14Merge branch 'for-linus' of ↵Linus Torvalds
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
2010-03-08Input: i8042 - use platfrom_create_bundle() helperDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-03-08Merge branch 'for-next' into for-linusJiri Kosina
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
2010-02-18Input: i8042 - fix KBC jam during hibernateAlan Jenkins
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>
2010-02-05Fix spelling of 'platform' in log messagesStefan Weil
Replace platfrom -> platform. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-11Input: i8042 - allow installing platform filters for incoming dataMatthew Garrett
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>
2009-12-11Input: i8042 - fix locking in interrupt routineDmitry Torokhov
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>
2009-11-02Input: i8042 - try to get stable CTR value when initializingDmitry Torokhov
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>
2009-10-08Input: i8042 - print debug data when testing AUX IRQ deliveryDmitry Torokhov
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>
2009-09-17Input: libps2 - additional locking for i8042 portsDmitry Torokhov
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>
2009-09-10Input: i8042 - use platform_driver_probeDmitry Torokhov
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>
2009-09-10Input: i8042 - use boolean type where it makes senseDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-09-10Input: i8042 - try disabling and re-enabling AUX port at closeDmitry Torokhov
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>
2009-09-10Input: i8042 - bypass AUX IRQ delivery test on laptopsDmitry Torokhov
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>
2009-07-26Input: i8042 - switch to using dev_pm_opsDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-07Input: mark serio and i8042 as suspended when hibernating tooThadeu Lima de Souza Cascardo
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>
2009-05-09Input: serio - do not use deprecated dev.power.power_stateDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-11Input: i8042 - introduce a tougher resetArjan van de Ven
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>
2008-06-17Input: i8042 - retry failed CTR writes when resumingJiri Kosina
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>
2008-05-27Input: i8042 - make sure Dritek quirk is invoked at resumeBruno Prémont
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>
2008-03-14Input: i8042 - fix warning on non-x86 buildsRoland Dreier
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>
2008-02-06Input: i8042 - non-x86 build fixAndrew Morton
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>