1
0
Fork 0
Commit Graph

52 Commits (faf80d62e44dc627efb741f48db50c1858d1667c)

Author SHA1 Message Date
Zephaniah E. Hull 535650fd70 Input: psmouse - ESD workaround fix for OLPC XO touchpad
It appears that when the XO touchpad unit resets from ESD, it sends AA
AA instead of AA 00, the psmouse-base code handles the case of AA 00 by
triggering a serio reconnect for the port, causing a full reprobe of
the device.

Testing with OFW shows that this is likely to solve the problem, so
the attached patch simply expands the existing test to also catch AA AA.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-05-15 19:24:18 -07:00
Arjan Opmeer 2a0bd75e5e Input: psmouse - add support for Elantech touchpads
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-10-16 22:54:35 -04:00
Andres Salomon df08ef27a7 Input: psmouse - add OLPC touchpad driver
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-21 18:28:58 -04:00
Andres Salomon 68d482214b Input: psmouse - tweak PSMOUSE_DEFINE_ATTR to support raw set callbacks
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-21 18:28:47 -04:00
Andres Salomon 8bf020ee96 Input: psmouse - add psmouse_queue_work() for ps/2 extension to make use of
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-21 18:28:36 -04:00
Andres Salomon a48cf5f3e5 Input: psmouse - export psmouse_set_state for ps/2 extensions to use
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-09-21 18:28:25 -04:00
Joe Rouvier 160f1fef7e Input: convert drivers to use strict_strtoul()
strict_strtoul() allows newline character at the end of the the input
string and therefore is more user-friendly.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2008-09-10 12:11:57 -04:00
Julia Lawall 3b04a61107 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>
2008-01-21 01:11:07 -05:00
Andres Salomon 746b31a9d4 Input: psmouse - fix potential memory leak in psmouse_connect()
If we successfully call input_register_device() in psmouse_connect()
but sysfs_create_group() fails, we'll enter the error path without
ever having called input_unregister_device() potentially leaking
memory.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-01-17 12:01:30 -05:00
Jean Delvare c03983ac9b Spelling fix: explicitly
From: Jean Delvare <khali@linux-fr.org>

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19 23:22:55 +02:00
Jiri Slaby 7b19ada2ed get rid of input BIT* duplicate defines
get rid of input BIT* duplicate defines

use newly global defined macros for input layer. Also remove includes of
input.h from non-input sources only for BIT macro definiton. Define the
macro temporarily in local manner, all those local definitons will be
removed further in this patchset (to not break bisecting).
BIT macro will be globally defined (1<<x)

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <dtor@mail.ru>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Cc: <lenb@kernel.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Cc: <perex@suse.cz>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: <vernux@us.ibm.com>
Cc: <malattia@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:42 -07:00
Alon Ziv 554fc19353 Input: psmouse - reset harder during probe
Some rodents appear to be extra-finicky, and require both PSMOUSE_RESET_DIS
and PSMOUSE_RESET_BAT before they are unconfused enough to be probed.

Signed-off-by: Alon Ziv <lkml@nolaviz.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-08-30 00:22:48 -04:00
Aristeu Rozanski aea6a46122 Input: psmouse - add support for Cortron PS/2 Trackballs
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-07-10 00:35:15 -04:00
Dmitry Torokhov 28aa7f1c81 Input: mice - switch to using input_dev->dev.parent
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>
2007-04-12 01:35:09 -04:00
Dmitry Torokhov 0ca1804f2e Input: drivers/input/mice - don't access dev->private directly
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-04-12 01:34:02 -04:00
Andres Salomon 55e3d9224b Input: psmouse - allow disabing certain protocol extensions
Allow ALPS, LOGIPS2PP, LIFEBOOK, TRACKPOINT and TOUCHKIT protocol
extensions of psmouse to be disabled during compilation. This will
allow users save some memory when they are sure that they will only
use a certain type of mice.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-03-10 01:39:54 -05:00
Dmitry Torokhov 243db53bbd Input: psmouse - do not force stream mode
Forcing stream mode after reset confuses some devices (reported
by Andrea Arcangeli) so let's take it out - spec says that after
reset mouse should already be in stream mode.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-03-07 01:44:59 -05:00
Stefan Lucke 24bf10ab2d Input: psmouse - add support for eGalax PS/2 touchscreen controller
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-18 01:49:10 -05:00
Dmitry Torokhov 62b529a7b9 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>
2007-02-18 01:44:58 -05:00
Dmitry Torokhov a1cec06177 Input: psmouse - properly reset mouse on shutdown/suspend
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>
2007-02-18 01:40:24 -05:00
Dmitry Torokhov bef986502f Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/usb/input/hid.h
2006-12-08 01:07:56 -05:00
Akinobu Mita 153a9df01c Input: handle serio_register_driver() errors
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-11-23 23:35:10 -05:00
David Howells c4028958b6 WorkStruct: make allyesconfig
Fix up for make allyesconfig.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:57:56 +00:00
Sergey Vlasov eb5d5829b3 Input: psmouse - fix attribute access on 64-bit systems
psmouse_show_int_attr() and psmouse_set_int_attr() were accessing
unsigned int fields as unsigned long, which gave garbage on x86_64.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-11-09 00:34:27 -05:00
Dmitry Torokhov 721556150e Input: mice - handle errors when registering input devices
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-11-05 22:40:19 -05:00
David Howells 7d12e780e0 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)
2006-10-05 15:10:12 +01:00
Dmitry Torokhov 0612ec4876 Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-09-19 01:56:44 -04:00
Helge Deller e38de678f6 Input: constify psmouse driver
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-09-10 21:54:39 -04:00
Pozsar Balazs 90414be952 Input: psmouse - fix Intellimouse 4.0 initialization
Revert the superfluous initilization causing some mice become jumpy.

Signed-off-by: Pozsar Balazs <pozsy@uhulinux.hu>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-08-23 00:48:03 -04:00
Pozsar Balazs b0c9ad8e0f Input: psmouse - add support for Intellimouse 4.0
Add support for the H-Wheel present on Microsoft Intellimouse 4.0
(AKA "tilt mouse")

Signed-off-by: Pozsar Balazs <pozsy@uhulinux.hu>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-06-26 01:56:08 -04:00
Dmitry Torokhov 08ffce4560 Input: fix potential overflows in driver/input/mouse
Change all sprintfs into snprintfs to make sure we won't stomp on
data adjacent to our buffers.

Noticed by Wouter Paesen <wouter@kangaroot.net>

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-06-26 01:45:10 -04:00
Dmitry Torokhov 89c9b4805a Input: psmouse - fix new device detection logic
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-04-29 01:12:44 -04:00
Dmitry Torokhov 58a343f22e Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-03-13 23:36:52 -05:00
Dmitry Torokhov 8bd0ee93fe [PATCH] Input: psmouse - disable autoresync
Automatic resynchronization in psmouse driver causes problems on some
hardware so disable it by default for now. People with KVM switches
that require resync can still enable it via module parameter or sysfs
attribute.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-10 22:09:33 -08:00
Ingo Molnar c14471dc2e Input: psmouse - semaphore to mutex conversion
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>
2006-02-19 00:22:11 -05:00
Dmitry Torokhov a3f3f31766 Input: psmouse - set name for Genius mice
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-01-29 21:50:46 -05:00
Dmitry Torokhov f0d5c6f419 Input: psmouse - attempt to re-synchronize mouse every 5 seconds
This should help driver to deal vith KVMs that reset mice when
switching between boxes.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-01-14 00:27:37 -05:00
Dmitry Torokhov ba44995a1e Input: psmouse - don't leave mouse asleep
It looks like quite a few mice out there treat PSMOUSE_RESET_DIS
as a powerdown request and turn off the light rendering the mouse
unusable.

Vojtech recommended to switch from PSMOUSE_RESET_DIS to full reset,
however we don't want to do that everywhere as full reset is pretty
slow. Instead we only use it before probing for "generic" protocols,
such as IntelliMouse and Explorer, to make sure that the mouse will
be woken up if it went to sleep as a result of PSMOUSE_RESET_DIS
issued earlier.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-12-21 00:51:31 -05:00
Dmitry Torokhov 2e5b636bb5 [PATCH] drivers/input/mouse: convert to dynamic input_dev allocation
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-10-28 09:52:52 -07:00
Dmitry Torokhov d344c5e085 Manual merge with Linus 2005-09-09 20:14:47 -05:00
Pekka Enberg a97e148a8b [PATCH] input: convert kcalloc to kzalloc
This patch converts kcalloc(1, ...) calls to use the new kzalloc() function.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:57:45 -07:00
Dmitry Torokhov cfe9e88866 Input: rework psmouse attributes to reduce module size
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-09-04 01:40:20 -05:00
Stephen Evanchik 541e316aed Input: psmouse - add support for IBM TrackPoint devices.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-08-08 01:26:18 -05:00
Vojtech Pavlik 7b4019d048 Input: psmouse - wheel mice (imps, exps) always have 3rd button
There are wheel mice that respond to Logitech probes and report
that they have only 2 buttons (such as e-Aser mouse) and this
stops the wheel from being used as a middle button. Change the
driver to always report BTN_MIDDLE capability if a wheel is
present.

Also, never reset BTN_RIGHT capability in logips2pp code - there
are no Logitech mice that have only one button and if some other
mice happen to respond to Logitech's query we could do the wrong
thing.

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-07-15 01:50:08 -05:00
Dmitry Torokhov dbf4ccd604 Input: psmouse - export protocol as a sysfs per-device attribute
to allow easy switching at run-time.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-06-01 02:40:01 -05:00
Dmitry Torokhov 04df1925fc Input: pmouse - introduce proper locking so state-changing
operations do not iterfere with each other.
       Also make sure that serio core takes serio->drv_sem
       not only for connect/disconnect but for reconnect
       too.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-06-01 02:39:44 -05:00
Dmitry Torokhov a15d60f867 Input: lifebook - adjust initialization routines to be in line with
the rest of protocols in preparation to dynamic protocol
       switching.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-05-29 02:30:32 -05:00
Dmitry Torokhov 14e9414396 Input: lifebook - various cleanups:
- do not try to set rate and resolution in init method, let
         psmouse core do it for us. This also removes special quirks
         from the core;
       - do not disable mouse before doing full reset - meaningless;
       - some formatting and whitespace cleanups.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-05-29 02:30:28 -05:00
Kenan Esau 02d7f58950 Input: Add Fujitsu Lifebook B-series touchscreen driver.
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-29 02:30:22 -05:00
Vojtech Pavlik 7741e93171 Input: Workaround for Sunrex K8561 IR Keyboard/Mouse. The mouse
sends an incorrect ID and wasn't recognized.

Reported-by: Stefan Seyfried <seife@suse.de>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-05-28 02:11:42 -05:00