The commit 83ba9ea8a0 ommitted the return
line for the old synaptics model accidentally. This resulted in a wrong
check, namely, the dimensions are checked for the old devices that don't
support the query properly.
This patch adds the return line back.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This reverts commit 685afae025.
After adding x86_platform's detection for i8042 controller, we
don't need the force dependency on !X86_MRST any more
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Feng Tang <feng.tang@intel.com>
LKML-Reference: <1278342202-10973-4-git-send-email-feng.tang@intel.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
The MT devices produce a lot of data. Tell the underlying input device
approximately how many events will be sent per synchronization, to allow
for better buffering. The number is a template based on continuously
reporting details for each finger on a single hand.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
If we fail to submit URBs we should take touchpad out of wellsping
mode.
Signed-off-by: Luo Jinghua <sunmoon1997@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
I2C drivers can use the clientdata-pointer to point to private data. As I2C
devices are not really unregistered, but merely detached from their driver, it
used to be the drivers obligation to clear this pointer during remove() or a
failed probe(). As a couple of drivers forgot to do this, it was agreed that it
was cleaner if the i2c-core does this clearance when appropriate, as there is
no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
This feature was added to the core with commit
e4a7b9b04d to fix the faulty drivers.
As there is no need anymore to clear the clientdata-pointer, remove all current
occurrences in the drivers to simplify the code and prevent confusion.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
For more clearance what the functions actually do,
usb_buffer_alloc() is renamed to usb_alloc_coherent()
usb_buffer_free() is renamed to usb_free_coherent()
They should only be used in code which really needs DMA coherency.
All call sites have been changed accordingly, except for staging
drivers.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Pedro Ribeiro <pedrib@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Apparently there are Elantech touchpads that report non-zero in the 2nd byte
of their signature. Adjust the detection routine so that if 2nd byte is
zero and 3rd byte contains value that is not a valid report rate, we still
assume that signature is valid.
Tested-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Moorestown does not have i8042 based keyboard controller, so give
an option to deselect i8042 for non-pc mid.
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: ad7877 - keep dma rx buffers in seperate cache lines
Input: psmouse - reset all types of mice before reconnecting
Input: elantech - use all 3 bytes when checking version
Input: iforce - fix Guillemot Jet Leader 3D entry
Input: iforce - add Guillemot Jet Leader Force Feedback
Synaptics hardware requires resetting device after suspend to ram
in order for the device to be operational. The reset lives in
synaptics-specific reconnect handler, but it is not being invoked
if synaptics support is disabled and the device is handled as a
standard PS/2 device (bare or IntelliMouse protocol).
Let's add reset into generic reconnect handler as well.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Apparently all 3 bytes returned by ETP_FW_VERSION_QUERY are significant
and should be taken into account when matching hardware version/features.
Tested-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: joydev - allow binding to button-only devices
Input: elantech - ignore high bits in the position coordinates
Input: elantech - allow forcing Elantech protocol
Input: elantech - fix firmware version check
Input: ati_remote - add some missing devices from lirc_atiusb
Input: eeti_ts - cancel pending work when going to suspend
Input: Add support of Synaptics Clickpad device
Revert "Input: ALPS - add signature for HP Pavilion dm3 laptops"
Input: psmouse - ignore parity error for basic protocols
In older versions of the elantech hardware/firmware those bits always
were unset, so it didn't actually matter, but newer versions seem to
use those high bits for something else, screwing up the coordinates
we report to the input layer for those devices.
Signed-off-by: Florian Ragwitz <rafl@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Apparently hardware vendors now ship elantech touchpads with different version
magic. This options allows for them to be tested easier with the current driver
in order to add their magic to the whitelist later.
Signed-off-by: Florian Ragwitz <rafl@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The check determining whether device should use 4- or 6-byte packets
was trying to compare firmware with 2.48, but was failing on majors
greater than 2. The new check ensures that versions like 4.1 are
checked properly.
Signed-off-by: Florian Ragwitz <rafl@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The new type of touchpads can be detected via a new query command
0x0c. The clickpad flags are in cap[0]:4 and cap[1]:0 bits.
When the device is detected, the driver now reports only the left
button as the supported buttons so that X11 driver can detect that
the device is Clickpad. A Clickpad device gives the button events
only as the middle button. The kernel driver morphs to the left
button. The real handling of Clickpad is done rather in X driver
side.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
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>
* '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
Tested by a user running Ubuntu 9.10 in the following bug report.
BugLink: http://bugs.launchpad.net/bugs/545307
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
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>
With the recent system-wide improvements on suspend/resume and EFI
booting the suspend_resume method of the bcm5974 has broken. When
waking up from the S3 state on the MacBookAir, the trackpad is found
in a yet unknown state, unable to switch to the proper multitouch
mode. The result is a frozen touchpad, and a flood of errors of the
kind
bcm5974: bad trackpad package, length: 8.
This patch retracts the reset_resume method altogether, falling back
on the generic unbind/rebind functionality of the usb layer until
further investigations can be made as how to reset the device when
booting from efi.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Enable button release event redirection to the device that got the
button press not only for touchpads with interleaved protocols, but
unconditionally for all Alps touchpads. This is required at least
for the touchpads in Dell Inspiron 8200 and Latitude d630.
Signed-off-by: Martin Buck <mb-tmp-yvahk-vachg@gromit.dyndns.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
When reading data from Geyser 2 touchpads used on post Oct 2005 Apple
PowerBooks the driver was casting X and Y coordinates values to
'signed char'. Testing on one of such PowerBooks I have noticed that
touchpad always generates positive values, but some of them are greater
that 127, and thus, when cast to 'signed char' being interpreted as
a negative.
Such bigger values have been observed infrequently, closer to the
edges of a touchpad, so the problem was not very visible.
Nevertheless, the patch would potentially improve touchpad
driver accuracy.
Signed-off-by: Vadim Zaliva <lord@crocodile.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Set state of the device as "initializing" during and after cleanup
to ensure that unsolicited data from the device is not passed on.
We especially want to avoid processing new device announcements
"0xaa 0x00" that can come up before we perform reconnect operation.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
There are many many ways one can capitalize "Lifebook B Series"...
Signed-off-by: Jon Dodgson <crayzeejon@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Sentelic probes confuse IBM trackpoints so they stop responding to
TP_READ_ID command. See:
http://bugzilla.kernel.org/show_bug.cgi?id=14970
Let's move FSP detection lower so it is probed after trackpoint and
others, just before we strat probing for Intellimouse Explorer.
Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
For configurations where Synaptics hardware is present but the Synaptics
extensions support is not compiled in, the mouse is reprobed and a new
device is allocated on every suspend/resume.
During probe, psmouse_switch_protocol() calls psmouse_extensions() with
set_properties=1. This calls the dummy synaptics_init() which returns an
error code, instructing us not to use the synaptics extensions.
During resume, psmouse_reconnect() calls psmouse_extensions() with
set_properties=0, in which case call to synaptics_init() is bypassed and
PSMOUSE_SYNAPTICS is returned. Since the result is different from previous
attempt psmouse_reconnect() fails and full re-probe happens.
Fix this by tweaking the set_properties=0 codepath in psmouse_extensions()
to be more careful about offering PSMOUSE_SYNAPTICS extensions.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Make bcm5974 report raw multi-touch (MT) data in the form of ABS_MT events.
[dtor@mail.ru: get rid of module option, always report all events]
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
sysfs_remove_group() waits for sysfs attributes to be removed, therefore
we do not need to worry about driver-specific attributes being accessed
after driver has been detached from the device. In fact, attempts to take
serio->drv_mutex in attribute methods may lead to the following deadlock:
sysfs_read_file()
fill_read_buffer()
sysfs_get_active_two()
psmouse_attr_show_helper()
serio_pin_driver()
serio_disconnect_driver()
mutex_lock(&serio->drv_mutex);
<--------> mutex_lock(&serio_drv_mutex);
psmouse_disconnect()
sysfs_remove_group(... psmouse_attr_group);
....
sysfs_deactivate();
wait_for_completion();
Fix this by removing calls to serio_[un]pin_driver() and functions themselves
and using driver-private mutexes to serialize access to attribute's set()
methods that may change device state.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Lifebook protocol can only be activated if we find known DMI signature.
It is useles without DMI.
Reported-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Instead of doing full-blown reset while suspending or shutting down
the box use lighter form of reset that should take less time.
Tested-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Properly handle version of the protocol where standard PS/2 packets
from trackpoint are stuffed into middle (byte 3-6) of the standard
ALPS packets when both the touchpad and trackpoint are used together.
The patch is based on work done by Matthew Chapman and additional
research done by David Kubicek and Erik Osterholm:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/296610
Many thanks to David Kubicek for his efforts in researching fine points
of this new version of the protocol, especially interaction between pad
and stick in these models.
Signed-off-by: Sebastian Kapfer <sebastian_kapfer@gmx.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Relative events are only reported via secondary device therefore device
associated with the touchpad should not advertise these capabilities.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The driver does not reference identification strings in DMI tables and
since these strings are no longer required by DMI core we can safely
remove them and save some memory.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
DMI tables use considerable amount of memory. Mark them as __initconst
so they will be discarded once module is loaded.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The touchpad on Acer Aspire 5720, 5520 and some other Aspire models
(signature 0x73, 0x02, 0x50) has a button that can be rocked in 4
different directions. Make the driver to generate BTN_0..BTN_3 events
in response. The Synaptics driver by default maps BTN_0 and BTN_1 to
up and down, so there should be no visible changes with the old setup
that generated BTN_FORWARD and BTN_BACK (also mapped to up and down).
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Do not start protocol detection assuming that middle mouse is present,
instead let individual protocols explicitly set this capability.
This fixes issue with Synaptics touchpads pretending that they have
middle button when hardware clearly reports otherwise.
Reported-and-tested-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The main input device of Lifebook touchscreens does not generate
left/right/middle button events and therefore should not be advertising
them in its capabilities.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Elantech touchpads work in absolute mode and do not generate relative
events so they should not be advertising them.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Touchkit PS/2 touchscreen does not have left/right/middle buttons and
should not be advertising as capable of generating these events.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Panasonic CF-72 uses 6-byte protocol and does not need to be tied
to a particular port.
Signed-off-by: Abner Holsinger <9zabner@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Commit b7802c5c1e ("Input: psmouse - use boolean type") caused the
synaptics_hardware variable to be completely useless, as it is
constantly set to 'true' throughout the whole psmouse_extensions().
This was caused by the following hunk in the commit in question
- int synaptics_hardware = 0;
+ bool synaptics_hardware = true;
which is wrong and causes driver to issue extra reset when falling
back to bare PS/2 protocol.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The get parameter function should return a string without a life-feed.
Otherwise you'll see additional empty line in sysfs parameters file.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
- no spaces between function name and opening parenthesis
- switch statements were indented too much
This makes checkpatch (and me) happy.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Apparently some of Toshiba Protege M300 identify themselves as
"Portable PC" in DMI so we need to add that to the DMI table as
well. We need DMI data so we can automatically lower Synaptics
reporting rate from 80 to 40 pps to avoid over-taxing their
keyboard controllers.
Tested-by: Rod Davison <roddavison@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
cancel_delayed_work() may spin and therefore should not be used in
interrupt contexts.
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
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>
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>
hil_kbd and hil_ptr look like twins so it makes sense to combine them
into a single driver.
[deller@gmx.de: add MODULE_ALIAS() entry for mouse]
Tested-by: Helge Deller <deller@gmx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The OLPC XO laptop incorporates a combination touchpad/tablet device
which unfortunately requires frequent recalibration. The driver will
force this automatically when various suspicious behaviors are
observed, and the user can recalibrate manually (with a special
keyboard sequence). There's currently no way, however, for an external
program to cause recalibration. We can not use the reconnect
capability which is already available in /sys because full reset of
the touchpad takes 1.1 - 1.2 secons which is too long.
This patch creates a new node in /sys which, when written with '1',
will force a touchpad recalibration; no other writes (or reads)
of this node are supported.
Signed-off-by: Paul Fox <pgf@laptop.org>
Acked-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch is needed when the gpio's became available only at late
stages, for example, when using i2c gpio expander.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This driver supports Synaptics I2C touchpad controller on eXeda
mobile device. Unfortunaltely it only works in relative mode and
thus is not comaptible with Xorg Synaptics driver.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Synaptics uses anisotropic coordinate system. On some wide touchpads
vertical resolution can be twice as high as horizontal which causes
unequal sensitivity on x/y directions. Add support for reading the
resolution with EVIOCGABS ioctl.
Signed-off-by: Tero Saarni <tero.saarni@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
When pressing any button belonging to the touchpoint, the generated
click events don't belong to the touchpoint but to the touchpad.
This patch fixes this behaviour, the events will be sent via the
correct device, so scrolling with touchpoint is possible.
Signed-off-by: Ulrich Dangel <uli@spamt.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The appletouch driver is prone to reporting multiple fingers when only
one is pressing. The appletouch driver queries an array of pressure
sensors and counts local maxima in pressure to determine the number of
fingers. It just does this on the raw values, so a data stream like:
0 100 250 300 299 300 250 100 0
actually registers as 2 fingers.
This patch updates the logic to ignore small dips in pressure that are
less than the threshold.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
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>
When we get a relative packet from trackpoint (when we deal with
touchscreen/trackpoint combo) we should not send events for the device
corresponding to touchscreen as it confuses evtouch driver (it looks
like it keeps previously reported absolute coordinates and the cursor
stays in the same place).
Reported-by: Marcin Drewka <laimoriel@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Dell Latitude D630/D800 have DualPoint (touchpad plus trackpoint)
instead of a simple touchpad and a pass-through port for external
PS/2 mouse.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: document the multi-touch (MT) protocol
Input: add detailed multi-touch finger data report protocol
Input: allow certain EV_ABS events to bypass all filtering
Input: bcm5974 - add documentation for the driver
Input: bcm5974 - augment debug information
Input: bcm5974 - Add support for the Macbook 5 (Unibody)
Input: bcm5974 - add quad-finger tapping
Input: bcm5974 - prepare for a new trackpad header type
Input: appletouch - fix DMA to/from stack buffer
Input: wacom - fix TabletPC touch bug
Input: lifebook - add DMI entry for Fujitsu B-2130
Input: ALPS - add signature for Toshiba Satellite Pro M10
Input: elantech - make sure touchpad is really in absolute mode
Input: elantech - provide a workaround for jumpy cursor on firmware 2.34
Input: ucb1400 - use disable_irq_nosync() in irq handler
Input: tsc2007 - use disable_irq_nosync() in irq handler
Input: sa1111ps2 - use disable_irq_nosync() in irq handlers
Input: omap-keypad - use disable_irq_nosync() in irq handler
This patch adds support for the new unibody Macbook, with physically
integrated button and trackpad. Since the integrated button changes
the logic for touch-and-click, a device capability bit mask is now
reported in input_id.version, which can be picked up by user space
via a EVIOCGID call.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Tested-by: David M. Lary <dmlary@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The integrated button on the new unibody Macbooks presents a need to
report explicit four-finger actions. Evidently, the finger pressing
the button is also touching the trackpad, so in order to fully support
three-finger actions, the driver must be able to report four-finger
actions. This patch adds a new button, BTN_TOOL_QUADTAP, which
achieves this.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The new unibody Macbooks are equipped with an integrated button and
trackpad. The package header of the trackpad interface has changed to
also contain information about the integrated button. This patch
performs the necessary preparations to allow for the new package
header.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
CONFIG_DMA_API_DEBUG spotted an instance of appletouch using
an array on the stack as a DMA buffer for certain hardware.
Change it to use a kmalloc()ed buffer instead.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Although we already have entry for ZEPHYR the match is done
on product name whereas B-2130 BIOS has it in board name.
Reported-by: Yuriy Zhuravlev <stalkerg@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This toshiba has a touchpad with trackpoint and 2 sets of left
and right buttons (above and below touchpad).
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
There exist laptops with Elantech touchpads where switching to absolute mode
does not happen, although writing the configuration register succeeds
without error. Reading back the register afterwards reveils that the
absolute mode bit is not set as if masked out by the touchpad firmware.
Always read back register 0x10, make sure that for hardware version 1 the
absolute mode bit is actually set and fail otherwise. This prevents the case
where the touchpad is claimed by the Elantech driver but is nonetheless not
working.
Signed-off-by: Arjan Opmeer <arjan@opmeer.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
It seems that Elantech touchpad firmware version 2.34 on the Hercules eCAFÉ
suffers from a problem where bogus coordinates get reported at the beginning
of a touch action. This causes the mouse cursor or the scrolled page to
jump.
Included patch provides a workaround that discards mouse packets that are
likely to contain bogus coordinates. The workaround is activated when we
detect touchpad with fimware version 2.34.
Signed-off-by: Arjan Opmeer <arjan@opmeer.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
dev is leftover from b0ee0d3eb3
(Input: pc110pad - use no_pci_devices()).
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits)
trivial: Update my email address
trivial: NULL noise: drivers/mtd/tests/mtd_*test.c
trivial: NULL noise: drivers/media/dvb/frontends/drx397xD_fw.h
trivial: Fix misspelling of "Celsius".
trivial: remove unused variable 'path' in alloc_file()
trivial: fix a pdlfush -> pdflush typo in comment
trivial: jbd header comment typo fix for JBD_PARANOID_IOFAIL
trivial: wusb: Storage class should be before const qualifier
trivial: drivers/char/bsr.c: Storage class should be before const qualifier
trivial: h8300: Storage class should be before const qualifier
trivial: fix where cgroup documentation is not correctly referred to
trivial: Give the right path in Documentation example
trivial: MTD: remove EOL from MODULE_DESCRIPTION
trivial: Fix typo in bio_split()'s documentation
trivial: PWM: fix of #endif comment
trivial: fix typos/grammar errors in Kconfig texts
trivial: Fix misspelling of firmware
trivial: cgroups: documentation typo and spelling corrections
trivial: Update contact info for Jochen Hein
trivial: fix typo "resgister" -> "register"
...
It is a fairly common operation to have a pointer to a work and to need a
pointer to the delayed work it is contained in. In particular, all
delayed works which want to rearm themselves will have to do that. So it
would seem fair to offer a helper function for this operation.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Greg KH <greg@kroah.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (422 commits)
[ARM] 5435/1: fix compile warning in sanity_check_meminfo()
[ARM] 5434/1: ARM: OMAP: Fix mailbox compile for 24xx
[ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0
[ARM] pxa: fix Colibri PXA300 and PXA320 LCD backlight pins
imxfb: Fix TFT mode
i.MX21/27: remove ifdef CONFIG_FB_IMX
imxfb: add clock support
mxc: add arch_reset() function
clkdev: add possibility to get a clock based on the device name
i.MX1: remove fb support from mach-imx
[ARM] pxa: build arch/arm/plat-pxa/mfp.c only when PXA3xx or ARCH_MMP defined
Gemini: Add support for Teltonika RUT100
Gemini: gpiolib based GPIO support v2
MAINTAINERS: add myself as Gemini architecture maintainer
ARM: Add Gemini architecture v3
[ARM] OMAP: Fix compile for omap2_init_common_hw()
MAINTAINERS: Add myself as Faraday ARM core variant maintainer
ARM: Add support for FA526 v2
[ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h
[ARM] collie: fix two minor formatting nits
...
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: elantech - touchpad driver miss-recognising logitech mice
Input: synaptics - ensure we reset the device on resume
Input: usbtouchscreen - fix eGalax HID ignoring
Input: ambakmi - fix timeout handling in amba_kmi_write()
Input: pxa930_trkball - fix write timeout handling
Input: struct device - replace bus_id with dev_name(), dev_set_name()
Input: bf54x-keys - fix debounce time validation
Input: spitzkbd - mark probe function as __devinit
Input: omap-keypad - mark probe function as __devinit
Input: corgi_ts - mark probe function as __devinit
Input: corgikbd - mark probe function as __devinit
Input: uvc - the button on the camera is KEY_CAMERA
Input: psmouse - make MOUSE_PS2_LIFEBOOK depend on X86
Input: atkbd - make forced_release_keys[] static
Input: usbtouchscreen - allow reporting calibrated data
When probing for the OLPC HGPK touchpad the ID of the probed touchpad is
emitted, but the debug is missing the terminating newline. This causes
later information to run into it, and for that to be categorised
incorrectly at KERN_DBG. Fix this up.
Reported-by: Matt Zimmerman <mdz@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Some Logitech mice react to the magic knock like Elantech touchpad would.
This leads to those mice being misdetected as Elantech touchpads. Add a
version query to elantech_detect() to distinguish the two.
[dtor@mail.ru:
- lower severity of some messages - when we are not sure yet if
device is Elantech or not not responding to knock is not an error.
]
Signed-off-by: Arjan Opmeer <arjan@opmeer.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
When resuming from suspend newer Synaptics touchpads do not recover
correctly. Analysis of the resume sequence as applied in Linux was
compared to that of other operating systems. This indicated that the
other OSs were resetting the mouse before attempting to detect it (for
all Synaptics touchpads, old and new). Applying this same modification
fixes these newer Synaptics touchpads and brings the driver into line
with common OS reset behaviour.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
With a postfix decrement i reaches -1 rather than 0,
but after the loop it is tested whether it has become 0.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
X86_PC is the only remaining 'sub' architecture, so we dont need
it anymore.
This also cleans up a few spurious references to X86_PC in the
driver space - those certainly should be X86.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
All Fujitsu-Siemens Lifebook systems are x86-based, so we might
as well make MOUSE_PS2_LIFEBOOK depend on X86. This will avoid
surprising things like:
arch/arm/configs/s3c2410_defconfig:CONFIG_MOUSE_PS2_LIFEBOOK=y
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/mouse/pxa930_trkball.c: In function `pxa930_trkball_probe':
drivers/input/mouse/pxa930_trkball.c:189: error: `ret' undeclared (first use in this function)
drivers/input/mouse/pxa930_trkball.c:230: error: `ret' undeclared (first use in this function)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add MODULE_ALIAS() to the HIL keyboard (hil_kbd.c) and HIL mouse
(hil_ptr.c) drivers to make kernel module autoloader functional.
Report HIL port number ID in serio id.id field.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The HPGK touchpad that is found on the XO driver has historically
exhibitted eratic behaviour in various environments (very dry,
very humid, etc) that can be worked around via some delays. This
patch turns those delays into module parameters to make testing
simpler.
Signed-off-by: Paul Fox <pgf@laptop.org>
Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
Acked-By: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
According to Section 2.4.4 of the Synaptics TouchPad Interfacing
Guide, bit 2 specifies if multi-finger detection is provided by
the touchpad. Thus, only set BTN_TOOL_DOUBLETAP and
BTN_TOOL_TRIPLETAP if the device actually supports it.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The validate_byte check logic was backwards; it should return true for
an *invalid* packet. Thanks to Jeremy Katz for spotting this one.
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The appletouch driver has grown up from supporting only a couple of
touchpads into supporting many touchpads, which can have different
number of sensors, different aspect ratios etc.
This patch cleans up the current driver code and makes it easy to
support the features of each different touchpad.
As a side effect, this patch also modifies the 'Y' multiplication factor
of the 'geyser3' and 'geyser4' touchpads (found on Core Duo and Core2
Duo MacBook and MacBook Pro laptops) in order to make the touchpad
output match the aspect ratio of the touchpad (Y factor changed from 43
to 64).
[dtor@mail.ru: make atp_info constant]
Signed-off-by: Stelian Pop <stelian@popies.net>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
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>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: jornada720_ts - fix build error ( LONG() usage )
Input: bcm5974 - switch back to normal mode when closing
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>
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>
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>
Staying in multi-touch mode after closing the device sometimes makes
the keyboard drop keys or repeat keys irratically. The conjecture is
that some internal buffer starts to overflow, resulting in undefined
behavior. Switching back to normal mode when closing the device makes
the problem go away.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
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>
The mousedev driver requires the use of BTN_TOUCH events to process
ABS_X and ABS_Y events properly, which is what is needed for the
bcm5974-based apple computers to have a functional pointer out-of-the-box.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The problem of finger tracking, i.e., when to switch focus from one
finger to another on the trackpad, has been improved by utilizing more
information from the bcm5974 chip output. This results in less pointer
hopping when many fingers are on the trackpad. In addition, a finger
counting method based on pressure information from all fingers is
introduced. Together with a pressure hysteresis window, this yields a
more stable counting of the number of fingers on the trackpad.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: evdev - fix printf() format for sizeof
Input: remove version.h from drivers that don't need it
Input: cobalt_btns - add missing MODULE_LICENSE
If a driver dies not use LINUX_VERSION_CODE nor KERNEL_VERSION
then it does not need to include version.h
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: xilinx_ps2 - fix warning
Input: bcm5974 - implement autosuspend support
Input: bcm5974 - add driver for Macbook Air and Pro Penryn touchpads
Input: paper over a bug in Synaptics X driver
Input: evdev - split EVIOCGBIT handlig into a separate function
Input: i8042 - Add Dritek quirk for Acer TravelMate 4280
Input: xpad - add Pelican Eclipse D-Pad to the list of devices
Input: gpio-keys - make gpio_keys_device_driver static
Input: gpio-keys - fix possible NULL pointer dereference
Input: wm97xx - enable sub-drivers by default
Implement support for status bits on Geyser 3/4.
Signed-off-by: Sven Anders <anders@anduras.de>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Split complete function into separate functions for GEYSER1/2 and GEYSER 3/4.
Signed-off-by: Sven Anders <anders@anduras.de>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This driver adds support for the multitouch trackpad on the new
Apple Macbook Air and Macbook Pro Penryn laptops. It replaces the
appletouch driver on those computers, and integrates well with the
synaptics driver of the Xorg system.
[dtor@mail.ru: various cleanups]
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Remove includes of asm/hardware.h in addition to asm/arch/hardware.h.
Then, since asm/hardware.h only exists to include asm/arch/hardware.h,
update everything to directly include asm/arch/hardware.h and remove
asm/hardware.h.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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>
This patch removes CVS keywords that weren't updated for a long time
from comments.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
[dtor@mail.ru: also signal correct return value to callers]
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch simplifies type detection and removes unnecessary code.
Signed-off-by: Sven Anders <anders@anduras.de>
[jberg: don't typedef, checkpatch clean, remove useless comments, ...]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch does some code cleanups in appletouch:
* useless comment removal
* make almost checkpatch clean
* make sparse clean
Signed-off-by: Sven Anders <anders@anduras.de>
[jberg: most of the changes including removing much of the original patch]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>