summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/psmouse.h
AgeCommit message (Collapse)Author
2011-10-10Input: psmouse - switch to using dev_*() for messagesDmitry Torokhov
This will ensure our reporting is consistent with the rest of the system and we do not refer to obsolete source file names. Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Reviewed-by: JJ Ding <dgdunix@gmail.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-04-19Input: psmouse - ignore parity error for basic protocolsDmitry Torokhov
Observing behavior of the other OS it appears that parity errors reported by the keyboard controller are being ignored and the data is processed as usual. Let's do the same for standard PS/2 protocols (bare, Intellimouse and Intellimouse Explorer) to provide better compatibility. Thsi should fix teh following bug: https://bugzilla.kernel.org/show_bug.cgi?id=6105 Thanks for Damjan Jovanovic for locating the source of issue and ideas for the patch. Tested-by: Damjan Jovanovic <damjan.jov@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-09-10Input: psmouse - use boolean typeDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-19Input: add new driver for Sentelic Finger Sensing PadTai-hwa Liang
This is the driver for Sentelic Finger Sensing Pad which can be found on MSI WIND Netbook. Signed-off-by: Tai-hwa Liang <avatar@sentelic.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-19Input: psmouse - allow defining read-only attributesDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-10-16Input: psmouse - add support for Elantech touchpadsArjan Opmeer
This is version 5 of the driver. Relative mode support has been dropped (users wishing to use touchpad in relative mode can use standard PS/2 protocol emulation done in hardware). The driver supports both original version of Elantech protocol and the newer one used by touchpads installed in EeePC. Signed-off-by: Arjan Opmeer <arjan@opmeer.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-09-21Input: psmouse - add OLPC touchpad driverAndres Salomon
This adds support for OLPC's touchpad. It has lots of neat features, none of which are enabled because the hardware is too buggy. Instead, we use it like a normal touchpad, but with a number of workarounds in place to deal with the frequent hardware spasms. Humidity changes, sweat, tinfoil underwear, plugging in AC, drinks, evil felines.. All tend to cause the touchpad to freak out. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-09-21Input: psmouse - tweak PSMOUSE_DEFINE_ATTR to support raw set callbacksAndres Salomon
We want to support attr->set callbacks that may need psmouse->state to not be updated, or may want to manually deal w/ enabling and disabling the device. To do that, we create __PSMOUSE_DEFINE_ATTR which enables us to set a 'protect' argument specifying whether or not the set callback should be protected with psmouse_disable and state setting. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-09-21Input: psmouse - add psmouse_queue_work() for ps/2 extension to make use ofAndres Salomon
psmouse_queue_work is passed a delayed_work struct, and queues up the work with kpsmouse_wq. Since we're dealing with delayed_work stuff, this also switches resync_work to a delayed_work struct as well, and makes use of psmouse_queue_work when doing a resync within psmouse-base. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-09-21Input: psmouse - export psmouse_set_state for ps/2 extensions to useAndres Salomon
Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-11sysfs: kill unnecessary attribute->ownerTejun Heo
sysfs is now completely out of driver/module lifetime game. After deletion, a sysfs node doesn't access anything outside sysfs proper, so there's no reason to hold onto the attribute owners. Note that often the wrong modules were accounted for as owners leading to accessing removed modules. This patch kills now unnecessary attribute->owner. Note that with this change, userland holding a sysfs node does not prevent the backing module from being unloaded. For more info regarding lifetime rule cleanup, please read the following message. http://article.gmane.org/gmane.linux.kernel/510293 (tweaked by Greg to not delete the field just yet, to make it easier to merge things properly.) Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-10Input: psmouse - add support for Cortron PS/2 TrackballsAristeu Rozanski
Cortron PS/2 Trackballs (700-0001A) report the 4th button using the 4th bit of the first packet (yes, it breaks the standard PS/2 protocol). This patch adds an extra protocol to generate BTN_SIDE based on the 4th bit. There's no way to detect those trackballs using any kind of special sequence, thus the protocol must be activated explicitely by writing into 'protocol' sysfs attribute: echo -n "cortps" > /sys/devices/platform/i8042/serio1/protocol Signed-off-by: Aristeu Rozanski <arozansk@redhat.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-02-18Input: psmouse - add support for eGalax PS/2 touchscreen controllerStefan Lucke
Based on the touchkit USB and lifebook PS/2 touchscreen driver. The egalax touchsreen controller (PS/2 or USB version) is used in this 7" device: http://www.cartft.com/catalog/il/449 Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-02-18Input: psmouse - properly reset mouse on shutdown/suspendDmitry Torokhov
Some people report that they need psmouse module unloaded for suspend to ram/disk to work properly. Let's make port cleanup behave the same way as driver unload. This fixes "bad state" roblem on various HP laptops, such as nx7400. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells
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)
2006-01-14Input: psmouse - attempt to re-synchronize mouse every 5 secondsDmitry Torokhov
This should help driver to deal vith KVMs that reset mice when switching between boxes. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-10-28[PATCH] drivers/input/mouse: convert to dynamic input_dev allocationDmitry Torokhov
Input: convert drivers/input/mouse 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>
2005-09-04Input: rework psmouse attributes to reduce module sizeDmitry Torokhov
Rearrange attribute code to use generic show and set handlers instead of replicating them for every attribute; switch to using attribute_group instead of creating all attributes manually. All this saves about 4K. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-08-08Input: psmouse - add support for IBM TrackPoint devices.Stephen Evanchik
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-06-27Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/dtor/input.git manuallyLinus Torvalds
Some manual fixups required due to clashes with the PF_FREEZE cleanups.
2005-06-20[PATCH] Driver Core: drivers/i2c/chips/w83781d.c - ↵Yani Ioannou
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>
2005-06-01Input: psmouse - export protocol as a sysfs per-device attributeDmitry Torokhov
to allow easy switching at run-time. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-05-29Input: Add Fujitsu Lifebook B-series touchscreen driver.Kenan Esau
From: Kenan Esau <kenan.esau@conan.de> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-05-29Input: whitespace fixes in drivers/input/mouseDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-02-13input: Store alps hardware version info in the input_dev structure, so thatPeter Osterlund
it shows up in /proc/bus/input/devices. Signed-off-by: Peter Osterlund <petero2@telia.com> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
2004-10-16input: Fix ssize_t prototype mismatch in psmouse and atkbd.Vojtech Pavlik
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
2004-09-29Input: psmouse - explicitely specify packet size instead of relyingDmitry Torokhov
on protocol numbering scheme. Make protocol detection routines return -1 on failure to keep them consistent with ther rest of the code. Set mouse parameters right in detection routines instead of doing it in psmouse_extensions. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2004-09-29Input: psmouse - drop PS2TPP protocol (it is handled exactly likeDmitry Torokhov
PS2PP) to free spot for THINKPS protocol and keep old protocol numbers for binary compatibility with Synaptics/ALPS touchpad driver for X. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2004-09-29Input: psmouse - export rate, resolution, resetafter and smartscrollDmitry Torokhov
(Logitech only) as individual mouse attributes (sysfs) and allow them to be set/changed independently for each mouse: echo -n "100" > /sys/bus/serio/devices/serio0/rate echo -n "200" > /sys/bus/serio/devices/serio0/resolution Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2004-09-29Input: psmouse - add set_rate and set_resolution handlers to makeDmitry Torokhov
adding new protocols easier and remove special knowledge from psmouse-base.c Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2004-09-21Input: pull common code from psmouse and atkbd into libps2 moduleDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2004-09-21input: Add ALPS touchpad driver, driver by Neil Brown, Peter OsterlundPeter Osterlund
and Dmitry Torokhov, some fixes by Vojtech Pavlik. Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Patch-by: Peter Osterlund <petero2@telia.com>
2004-09-21input: Add support for Kensington ThinkingMouse PS/2 protocol.Peter Maydell
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Patch-by: Peter Maydell <pmaydell@chiark.greenend.org.uk>
2004-07-27Input: switch psmouse driver from busy-polling for command completionDmitry Torokhov
to waiting for event Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2004-07-27Input: psmouse - harden command mode processing logicDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2004-07-19Input: rearrange activation/children probe sequence in psmouse soDmitry Torokhov
reconnect on children ports works even after parent port is fully activated: - when connecting/reconnecting a port always activate it - when connecting/reconnecting a pass-throgh port deactivate parent first and activate it after connect is done Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2004-07-19Input: do not call protocol handler in psmouse unless mouse isDmitry Torokhov
filly initialized - helps when USB Legacy emulation gets in our way and starts generating junk data stream while psmouse is detecting hardware Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2004-06-28Input: allow serio drivers to create children ports and register theseDmitry Torokhov
ports for them in serio core to avoid having recursion in connect methods. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2004-06-28Input: switch to dynamic (heap) serio port allocation in preparationDmitry Torokhov
to sysfs integration. By having all data structures dynamically allocated serio driver modules can be unloaded without waiting for the last reference to the port to be dropped. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2004-05-31input: Explicit variable access rules for psmouse.c, using bitops.Vojtech Pavlik
2004-04-22Input: add psmouse_sliced_command (passes extended commands encodedDmitry Torokhov
with 0xE8 to the mouse) and use it in Synaptics and Logitech drivers
2004-04-22Input: add protocol_handler to psmouse structure to ease addingDmitry Torokhov
new protocols to psmouse module
2004-04-22Input: move "reconnect after so many errors" handling from synaptics driverDmitry Torokhov
to psmouse so it can be used by other PS/2 protcol drivers (but so far only synaptics knows how to validate incoming data)
2004-03-10Input: do a full reset of Synaptics touchpad if extended protocolDmitry Torokhov
probes failed, otherwise trackpoint on the pass-through port may stop working (reset-disable isn't enough to revive it)
2004-03-10Input: when disconnecting PS/2 mouse give protocol's disconnect Dmitry Torokhov
handler chance to run before starting ignoring mouse data. Otherwise interrupt handler will discard all ACKs and the very first command in cleanup sequence will fail (Synaptics was failing to return to relative mode on module unload).
2004-01-21input: Allow Synaptics packet rate to be controlled by theDmitry Torokhov
psmouse_rate= option.
2003-12-18[PATCH] Synaptics: use serio_reconnectDmitry Torokhov
Input/Synaptics: 1. Support for pass-through port moved from Synaptics driver to psmouse itself, it is cleaner and should allow using it in other drivers if needed. 2. The driver makes use of new reconnect functionality in serio. It will try to keep the same input device after resume or when it resets itself. 3. If mouse is disconnected or other mouse plugged in while sleeping the driver should correctly recognize that and create a new serio/input device.
2003-09-18Input: Big Synaptics update:Peter Osterlund
Restore synaptics pad mode on module unload. Support Synaptics touchpads with multiple buttons. Make Synaptics touchpad support optional. Add passthrough support for Synaptics touchpads. [Dmitry] Add support for old Synaptics protocol. Set mode byte correctly for old Synaptics pads. Fix multibutton support of Synaptics pads.
2003-06-20input: Add Logitech MX PS2++ support, move Logitech PS2++ code to aVojtech Pavlik
separate source file, always enable Synaptics support. Some more fixes in Synaptics code and documentation.
2003-06-14input: Add Synaptics touchpad absolute mode support.Peter Osterlund