summaryrefslogtreecommitdiff
path: root/drivers/input/mouse
AgeCommit message (Collapse)Author
2008-08-13OLPC: psmouse: don't race with irq/resync handlers when recalibratingAndres Salomon
I was seeing a race with irq and resync handlers that sometimes caused commands to fail. In particularly bad cases, it would cause the keyboard to stop working. Hopefully this fixes it. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-08-10Merge commit 'v2.6.25.15' into olpc-testingDeepak Saxena
2008-08-06Input: appletouch - implement reset-resume logicOliver Neukum
commit 90d95ef617a535a8832bdcb8dee07bf591e5dd82 upstream On some boxes the touchpad needs to be reinitialized after resume to make it function again. This fixes bugzilla #10825. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-06psmouse: olpc: update comments throughout driverAndres Salomon
Some of those comments described Advanced Mode.. update 'em. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-07-06psmouse: olpc: clean up checkpatch.pl warnings/errorsAndres Salomon
Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-07-06psmouse: olpc: drop advanced/stream mode stuff, use mouse mode insteadAndres Salomon
This drops lots of complexity, and works around a great deal of hardware bugginess. With mouse mode, we have 3 byte packets, get them at a rate of 12mS, and they're sent only when there's activity on the touchpad. This makes deltas between packets _much_ smaller, making it much easier to detect hardware miscalibration (100px deltas are a sign of miscalibration; previously, due to the 24mS+ time between packets, we couldn't guarantee that the delta wasn't intentional). We also drop the PT/GS switching stuff; sorry, but PT mode is no longer supported. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-07-06Revert "input: have olpc's psmouse driver default to 3 byte mousemode"Andres Salomon
This reverts commit 2da8af6492c54eced6768336ddfa4ca87787f1ca.
2008-07-03input: have olpc's psmouse driver default to 3 byte mousemodeAndres Salomon
Stream mode is too buggy, this seems to work better. I've tested this with the xorg mouse_drv.so; i have no idea how it behaves w/ evdev. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-06-05ARGHAndres Salomon
Signed-off-by: Andres Salomon <dilinger@dev.queued.net>
2008-06-05OLPC: psmouse: fix build error w/ previous commit.Andres Salomon
Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-05-20OLPC: psmouse: always recalibrate after an axis errorAndres Salomon
Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-05-20OLPC: psmouse: help along debugging a bitAndres Salomon
Make the packet validation error msg a bit more sensical, and have recalibration messages not depend upon tpdebug.. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-05-01psmouse: the double-click bugfix never got committedAndres Salomon
Now that I can actually _test_ it, this seems like as good a time as any.. :) Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-04-24Merge tag 'v2.6.25'Andres Salomon
they'll never take me alive! Conflicts: drivers/net/wireless/libertas/main.c drivers/usb/host/ehci-hcd.c drivers/usb/host/ehci-hub.c Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-04-02Input: appletouch - add product IDs for the 4th generation MacBooksTobias Mueller
Signed-off-by: Tobias Mueller <Tobias_Mueller@twam.info> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-03-18Input: ALPS - fix forward/back buttons reversed on Acer 5520-5290Laszlo Kajan
ALPS_FW_BK_1 protocol flavor seems to have forward and backward keys reversed. Signed-off-by: Laszlo Kajan <kajla@bioinfo.pl> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-03-18Input: ALPS - put secondary device in proper place in sysfsDmitry Torokhov
Secondary input device did not have parent set up causing it to appear in the root of sysfs device hierarchy. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-02-11psmouse: convert BIT() macro calls to BIT_MASKAndres Salomon
Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-02-10Merge branch 'linux-2.6'Andres Salomon
Sloppiest merge ever. LXFB still needs to be updated, it will not build. Conflicts: Documentation/kernel-parameters.txt Documentation/power/basic-pm-debugging.txt Documentation/power/swsusp.txt Documentation/power_supply_class.txt Documentation/usb/persist.txt arch/i386/Kconfig arch/i386/kernel/Makefile arch/i386/kernel/head.S arch/i386/kernel/setup.c arch/i386/pci/Makefile arch/i386/pci/init.c arch/i386/pci/pci.h arch/powerpc/configs/pmac32_defconfig block/ll_rw_blk.c drivers/Kconfig drivers/base/dd.c drivers/hid/usbhid/hid-core.c drivers/input/keyboard/atkbd.c drivers/input/mouse/psmouse.h drivers/media/video/cafe_ccic.c drivers/misc/Kconfig drivers/misc/Makefile drivers/misc/eeprom_93cx6.c drivers/mmc/card/block.c drivers/net/wireless/Kconfig drivers/net/wireless/Makefile drivers/net/wireless/hostap/hostap_ap.c drivers/net/wireless/hostap/hostap_pci.c drivers/net/wireless/hostap/hostap_plx.c drivers/net/wireless/libertas/11d.c drivers/net/wireless/libertas/11d.h drivers/net/wireless/libertas/Makefile drivers/net/wireless/libertas/assoc.c drivers/net/wireless/libertas/assoc.h drivers/net/wireless/libertas/cmd.c drivers/net/wireless/libertas/cmdresp.c drivers/net/wireless/libertas/debugfs.c drivers/net/wireless/libertas/decl.h drivers/net/wireless/libertas/defs.h drivers/net/wireless/libertas/dev.h drivers/net/wireless/libertas/ethtool.c drivers/net/wireless/libertas/host.h drivers/net/wireless/libertas/hostcmd.h drivers/net/wireless/libertas/if_cs.c drivers/net/wireless/libertas/if_usb.c drivers/net/wireless/libertas/if_usb.h drivers/net/wireless/libertas/join.c drivers/net/wireless/libertas/join.h drivers/net/wireless/libertas/main.c drivers/net/wireless/libertas/rx.c drivers/net/wireless/libertas/scan.c drivers/net/wireless/libertas/scan.h drivers/net/wireless/libertas/tx.c drivers/net/wireless/libertas/types.h drivers/net/wireless/libertas/wext.c drivers/net/wireless/libertas/wext.h drivers/net/wireless/rtl8187.h drivers/net/wireless/rtl8187_dev.c drivers/net/wireless/rtl8187_rtl8225.c drivers/net/wireless/rtl8187_rtl8225.h drivers/net/wireless/rtl818x.h drivers/net/wireless/zd1211rw/Makefile drivers/net/wireless/zd1211rw/zd_rf_uw2453.c drivers/net/wireless/zd1211rw/zd_usb.c drivers/power/Kconfig drivers/power/Makefile drivers/power/apm_power.c drivers/power/ds2760_battery.c drivers/power/olpc_battery.c drivers/power/pda_power.c drivers/power/pmu_battery.c drivers/power/power_supply.h drivers/power/power_supply_core.c drivers/power/power_supply_leds.c drivers/power/power_supply_sysfs.c drivers/serial/serial_core.c drivers/usb/core/Kconfig drivers/usb/core/driver.c drivers/usb/core/generic.c drivers/usb/core/hcd.c drivers/usb/core/hcd.h drivers/usb/core/hub.c drivers/usb/host/ehci-hcd.c drivers/usb/host/ehci-q.c drivers/usb/host/ohci-pci.c drivers/usb/storage/usb.c drivers/video/geode/Kconfig drivers/video/geode/Makefile drivers/video/geode/lxfb.h drivers/video/geode/lxfb_core.c drivers/video/geode/lxfb_ops.c drivers/w1/slaves/w1_ds2760.c drivers/w1/slaves/w1_ds2760.h fs/Kconfig include/asm-i386/setup.h include/linux/console.h include/linux/eeprom_93cx6.h include/linux/i2c-id.h include/linux/pda_power.h include/linux/power_supply.h include/linux/suspend.h include/linux/usb.h include/linux/usb/quirks.h kernel/power/Kconfig kernel/printk.c kernel/time/timekeeping.c net/mac80211/ieee80211_ioctl.c scripts/kconfig/qconf.cc sound/pci/ac97/ac97_codec.c Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-02-07Merge 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: (34 commits) Input: i8042 - non-x86 build fix Input: pxa27x_keypad - also enable on PXA3xx Input: pxa27x_keypad - add debounce_interval to the keypad platform data Input: pxa27x_keypad - use device resources for I/O memory mapping and IRQ Input: pxa27x_keypad - enable rotary encoders and direct keys Input: pxa27x_keypad - introduce pxa27x_keypad_config() Input: pxa27x_keypad - introduce driver structure and use KEY() to define matrix keys Input: pxa27x_keypad - remove pin configuration from the driver Input: pxa27x_keypad - rename the driver (was pxa27x_keyboard) Input: constify function pointer tables (seq_operations) Input: i8042 - add Fujitsu-Siemens Amilo Pro 2010 to nomux list Input: i8042 - enable DMI quirks on x86-64 Input: i8042 - add Dritek quirk for Acer Aspire 9110 Input: add input event to APM event bridge Input: mousedev - use BIT_MASK instead of BIT Input: remove duplicate includes Input: remove cdev from input_dev structure Input: remove duplicated headers in drivers/char/keyboard.c Input: i8042 - add Dritek keyboard extension quirk Input: add Tosa keyboard driver ...
2008-01-30x86: replace outb_p() with udelay(2) in drivers/input/mouse/pc110pad.cIngo Molnar
replace outb_p() with udelay(2). This is a real ISA device so it likely needs this particular delay. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-21Input: drop redundant includes of moduleparam.hJulia Lawall
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-17Input: ALPS - fix sync loss on Acer Aspire 5720ZGDmitry Torokhov
The recently added support for Dell Volstro 1400 was causing protocol synchronization errors on Acer Aspire 5720ZG, fix it. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-01-17Input: psmouse - fix input_dev leak in lifebook driverAndres Salomon
The lifebook driver may register a second input device, but it never unregisters it. This fixes that. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-01-17Input: psmouse - fix potential memory leak in psmouse_connect()Andres Salomon
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-15OLPC: psmouse: ignore PT packets in the spewing hack codeAndres Salomon
We don't want PT packets to trigger a recalibrate; the PT never gets stuck. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-15OLPC: psmouse: keep recalibrating until we're reasonably sure we've got it rightAndres Salomon
After recalibrating, if we get any packets for 2 seconds, that means someone's finger is on the touchpad. If that happens, queue up another recalibration. It's not foolproof, but it appears to do a reasonable job of figuring out when the recalibration has failed due to miscalibration. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-15OLPC: psmouse: add another spew detection hack...Andres Salomon
Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-15OLPC: psmouse: further hgpk_spewing_hack tweakAndres Salomon
Ok, wait only 2s, allow 1px changes in 2 of the 3 axes, and ignore packets where z=15. This catches certain types of miscalibrations pretty well, while ignoring fingers. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-15OLPC: psmouse: send a finger-up packet while recalibratingAndres Salomon
Otherwise, the cursor jumps around or we get huge deltas. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-15OLPC: psmouse: update hgpk_spewing_hack to look for _almost_ repeated packetsAndres Salomon
Spread out over 5s, a continuous stream of packets that are 1px away from each other. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-15OPLC: psmouse: be more aggressive w/ axis delta error recalibrationsAndres Salomon
Miscalibrations look like this: Jan 16 08:55:53 localhost kernel: [ 591.272839] psmouse serio1: l=0 r=0 p=0 g=1 x=189 y=31 z=15 m=0 Jan 16 08:55:53 localhost kernel: [ 591.297467] psmouse serio1: l=0 r=0 p=0 g=1 x=94 y=181 z=15 m=0 Jan 16 08:55:53 localhost kernel: [ 591.297499] psmouse serio1: axis change (189,31) => (94,181) is over deld Jan 16 08:55:53 localhost kernel: [ 591.319921] psmouse serio1: l=0 r=0 p=0 g=1 x=46 y=255 z=12 m=0 Jan 16 08:55:53 localhost kernel: [ 591.319952] psmouse serio1: axis change (94,181) => (46,255) is over deld Jan 16 08:55:53 localhost kernel: [ 591.346869] psmouse serio1: l=0 r=0 p=0 g=1 x=16 y=287 z=13 m=0 Two packets in a row with huge delta changes. If we get that, attempt to recalibrate the pad after 2 second. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-15OLPC: psmouse: add support for powering down touchpadAndres Salomon
Done via a sysfs toggle. Userspace ftw! Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: add hgpk_spewing_hack to work around touchpad spewing bugAndres Salomon
Recalibrate if we see 120mS+ of repeated packets.. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: force a recalibration if we get too many axis delta errorsAndres Salomon
My choice of error threshold is completely arbitrary. If we get 6 delta axis errors in a row, we will force the touchpad to recalibrate. Will it work? Who knows! Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: add recalibration support and a work queue to handle recalib..Andres Salomon
Recalibration needs to be triggered from the irq handler and will take at least 150mS to run; thus, use a work queue for it. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: rename 'mode_switch' to 'switch_wq'Andres Salomon
I realized that we have two variables called 'mode_switch' (one's a bit in hgpk_packet, the other's the work thread). Rename the work thread to perhaps be a bit clearer. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: fix race in hgpk_disconnect with worker threadAndres Salomon
Be sure to run flush_scheduled_work() to ensure that kpsmouse_wq isn't about to be called while we're in the middle of disconnecting the driver; otherwise, we could race and oops. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: disable hgpk_fingerup_hack on C touchpads and laterAndres Salomon
I think we're safe to assume this doesn't happen on MP machines.. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: drop packet dump from decode_packet()Andres Salomon
If we want to see the individual bytes we're getting, use the i8042's debugging. Otherwise, this crap just clutters up our logs. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: big_delta_hack should ignore finger-up packets as well...Andres Salomon
Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: update copyright infoAndres Salomon
Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: clean up input bitsAndres Salomon
Once again, drop the non-existent middle button crap, drop the REL axis stuff, drop BTN_TOOL_{FINGER,PEN}, and use set_bit. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: unset input bits in the same way that psmouse-base.c sets themAndres Salomon
Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: return early from hgpk_big_delta_hack if finger-down packetAndres Salomon
Ok, no real changes here, just return early rather than having everything nested in a big if statement. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: disable p->pt_down while receiving GS packetsAndres Salomon
When we get GS packets, if we see a pt_down we schedule a mode switch. However, we've also been leaving pt_down set; that gets passed to the input device. Later on, when we get our first PT packet, the spurious finger-down check fails to work because pt_down was previously set; so it doesn't know that this is the first packet. Instead, we unset pt_down any time we get a GS packet. This ensures that we spot those spurious PT finger-down packets. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: reactivate mouse immediately after CMD_ENABLEAndres Salomon
The debug statement in there was taking long enough that we'd actually miss a byte from the touchpad (causing sync errors). Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-14OLPC: psmouse: uh, making hgpk_new_mode even less verboseAndres Salomon
we don't need to be told that we're starting a mode switch *twice* Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-13OLPC: psmouse: clean up hgpk_mode_switchAndres Salomon
Use psmouse_set_state rather than directly setting psmouse->state, be a little less verbose, etc. Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-01-13OLPC: psmouse: clean up hgpk_new_modeAndres Salomon
Update names, call psmouse_set_state() to tell psmouse-base when to start and stop ignoring packets, don't recv a parameter back from 0xF2, etc. Signed-off-by: Andres Salomon <dilinger@debian.org>