aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid
AgeCommit message (Collapse)Author
2010-07-13HID: magicmouse: report last touch upChase Douglas
The evdev multitouch protocol requires that a last MT sync event must be sent after all touches are up. This change adds the last MT sync event to the hid-magicmouse driver. Also, don't send events when a touch leaves. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Michael Poole <mdpoole@troilus.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz> (cherry picked from commit e3612e8669b8c15278058f8dd52e3dc6e7d26710 from git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git) Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
2010-07-13UBUNTU: [Upstream] HID: magicmouse: enable horizontal scrollingChase Douglas
Mimicks OS X behavior. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> (cherry picked from commit c04266889b591165bdea396b20313bebb83c0fd6 from git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git) Acked-by: Steve Conklin <steve.conklin@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
2010-07-13UBUNTU: [Upstream] HID: magicmouse: add param for scroll speedChase Douglas
The new scroll_speed param takes an integer value from 0 to 63, where 0 is slowest and 63 is fastest. The default of 32 remains the same. This parameter also affects scroll acceleration linearly. A second part of this change is a tightly coupled modification to the scroll acceleration. Previously, scroll acceleration could be reset without lifting the scroll finger. This is rather unintuitive and hard to control in the case where a user wants faster scrolling, but wants to hold the scroll touch for longer than a moment. Note that scroll acceleration levels are now 1-7, where 7 is slowest. In the previous implementation, there were 8 levels defined, but it was impossible to start at the slowest level. In order to keep the default scroll speed unchanged, only 7 levels are used now. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Michael Poole <mdpoole@troilus.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz> (cherry picked from commit 0b778e76c1e7ccf49f8980b594e72f984095fd26 from git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git) Acked-by: Steve Conklin <steve.conklin@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
2010-07-13UBUNTU: [Upstream] HID: magicmouse: properly account for scroll movement in ↵Chase Douglas
state Before this change, sequential scroll events would take a variable amount of movement due to incorrect accounting. This change ensures all scroll movements require a deterministic touch movement for an action to occur. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Michael Poole <mdpoole@troilus.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz> (cherry picked from commit 8d93efb27ab8927ffc7a357f1b2d10039de50ed4 from git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git) Acked-by: Steve Conklin <steve.conklin@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
2010-07-13UBUNTU: [Upstream] HID: magicmouse: disable and add module param for scroll ↵Chase Douglas
acceleration Scroll acceleration is unique to the magicmouse driver, and is unintuitive to a user who is unaware of the functionality. Thus, disable it by default, but add a module parameter to enable it for power users who want it. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Michael Poole <mdpoole@troilus.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz> (cherry picked from commit 9846f350ef4d4108c1154acfc125fe8d8630ef84 from git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git) Acked-by: Steve Conklin <steve.conklin@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
2010-07-13UBUNTU: [Upstream] HID: magicmouse: scroll on entire surface, not just ↵Chase Douglas
middle of mouse Previously, scroll events only occurred when the user moved a touch along the middle of the touch surface. This is unintuitive for a normal user who is not aware of this. The device has a uniform surface, so the distinction is artificial. This change removes the touch area check for a scroll event, which replicates the OS X behavior. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Michael Poole <mdpoole@troilus.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz> (cherry picked from commit ef566d30a702cc9b49d24edc4ad45c62208a4f5d from git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git) Acked-by: Steve Conklin <steve.conklin@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
2010-07-13UBUNTU: [Upstream] Input: hid-input - use a larger event buffer for MT devicesHenrik Rydberg
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. Currently in upstream maintainer's input tree and queued for v2.6.36: git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next commit 6967b4d9de4a7cf3b00cd9a93981d3206d75a1d8 Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
2010-07-13UBUNTU: SAUCE: HID: add support for Ortek WKB-2000Johnathon Harris
BugLink: http://bugs.launchpad.net/bugs/405390 commit cd9ec30da58bcd8ab154eba9eb54d16c67e7ef3b upsteam (linux-next) This patch adds a new USB HID driver for the Ortek WKB-2000, working around an incorrect LogicalMaximum value in the USB resource descriptor. Tracked by http://bugzilla.kernel.org/show_bug.cgi?id=14787 Bug originally reported by Ubuntu users: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/405390 Signed-off-by: Johnathon Harris <jmharris@gmail.com> Tested-by: Daniel J Blueman <daniel.blueman@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Surbhi Palande <surbhi.palande@canonical.com> Signed-off-by: Andy Whitcroft <apw@canonical.com>
2010-07-11HID: Send Report ID when numbered reports are sent over the control endpoint.Alan Ott
The Report ID wasn't sent as part of the payload for reports which were sent over the control endpoint. This is required by section 8.1 of the HID spec. Signed-off-by: Alan Ott <alan@signal11.us> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-07-11HID: Enable HID_QUIRK_MULTI_INPUT for Retro AdaptorPeter Edwards
Patch for linux-2.6.35-rc4 mainline kernel to enable Paul Qureshi's Retro Adapter [http://keio.dk/retroadapter.html], an open source USB device which allows controllers and joysticks from classic computers and consoles to work on modern PCs, to appear as two separate devices under Linux. Signed-off-by: Peter Edwards <samwise@bagshot-row.org> Acked-by: Paul Qureshi <retro@world3.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-07-11HID: add support for CH Eclipse yokeJonathan Rockway
This USB flight yoke needs the NOGET quirk, like most of CH's other products. This patch adds that. Signed-off-by: Jonathan Rockway <jon@jrock.us> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-06-21HID: eliminate a double lock in debug codeJulia Lawall
The path around the loop ends with the lock held, so the call to mutex_lock is moved before the beginning of the loop. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @locked@ expression E1; position p; @@ read_lock(E1@p,...); @r exists@ expression x <= locked.E1; expression locked.E1; expression E2; identifier lock; position locked.p,p1,p2; @@ *lock@p1 (E1@p,...); ... when != E1 when != \(x = E2\|&x\) *lock@p2 (E1,...); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-06-21HID: ntrig: add support for new firwmare versionsmicki
Signed-off-by: Micki Balanga <micki@n-trig.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-06-04HID: check for HID_QUIRK_IGNORE during probingJindrich Makovicka
While the hardcoded ignore list is checked in hid_add_device(), the user supplied ignore flags are not. Thus, the IGNORE quirk (0x0004) cannot be used to stop usbhid from binding devices like iBuddy, which has been recently removed from the ignore list due to product ID conflict. This patch adds the user quirk check to hid_add_device(), and makes hid_add_device() return -ENODEV when HID_QUIRK_IGNORE bit is set. HID_QUIRK_NO_IGNORE still takes precedence over HID_QUIRK_IGNORE. With the patch, iBuddy works properly using libusb when the following option is added to modprobe.d: options usbhid quirks=0x1130:0x0002:0x0004 Signed-off-by: Jindrich Makovicka <makovick@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-31HID: roccat: fix modules interdependenciesRandy Dunlap
hid-roccat-kone calls the hid-roccat module interfaces, so the former should depend on or select the latter to prevent build errors, like: hid-roccat-kone.c:(.text+0x133ed2): undefined reference to `roccat_report_event' hid-roccat-kone.c:(.text+0x133fa8): undefined reference to `roccat_disconnect' hid-roccat-kone.c:(.text+0x1353be): undefined reference to `roccat_connect' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-27Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: usbtouchscreen - support bigger iNexio touchscreens Input: ads7846 - return error on regulator_get() failure Input: twl4030-vibra - correct the power down sequence Input: enable onkey driver of max8925 Input: use ABS_CNT rather than (ABS_MAX + 1)
2010-05-25HID: roccat: fix build failure if built as moduleJiri Kosina
Fix build failure when roccat and roccat-kone are built as modules. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-25HID: roccat: propagate special events of roccat hardware to userspaceStefan Achatz
Module roccat is a char device used to report special events of roccat hardware to userland. These events include requests for on-screen-display of profile or dpi settings or requests for execution of macro sequences that are not stored in device. The information in these events depends on hid device implementation and contains data that is not available in a single hid event or else hidraw could have been used. It is inspired by hidraw, but uses only one circular buffer for all readers. The device is as generic as possible so that the functionality is usable by all (kone and upcomming) roccat device drivers. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-24HID: Add the GYR4101US USB ID to hid-gyrationCory Maccarrone
This change adds in the USB product ID for the Gyration GYR4101US USB media center remote control. This remote is similar enough to the other two devices that this driver can be used without any other changes to get full support for the remote. Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-24HID: fix hid-roccat-kone for bin_attr API changeStephen Rothwell
After merging the driver-core tree, today's linux-next build (x86_64 allmodconfig) produced these warnings: drivers/hid/hid-roccat-kone.c:694: warning: initialization from incompatible pointer type drivers/hid/hid-roccat-kone.c:696: warning: initialization from incompatible pointer type drivers/hid/hid-roccat-kone.c:701: warning: initialization from incompatible pointer type drivers/hid/hid-roccat-kone.c:703: warning: initialization from incompatible pointer type drivers/hid/hid-roccat-kone.c:708: warning: initialization from incompatible pointer type drivers/hid/hid-roccat-kone.c:710: warning: initialization from incompatible pointer type drivers/hid/hid-roccat-kone.c:715: warning: initialization from incompatible pointer type drivers/hid/hid-roccat-kone.c:717: warning: initialization from incompatible pointer type drivers/hid/hid-roccat-kone.c:722: warning: initialization from incompatible pointer type drivers/hid/hid-roccat-kone.c:724: warning: initialization from incompatible pointer type drivers/hid/hid-roccat-kone.c:729: warning: initialization from incompatible pointer type drivers/hid/hid-roccat-kone.c:731: warning: initialization from incompatible pointer type Introduced by commit 867040163f10f2b52b45bc573f330d6eb28f5914 ("sysfs: add struct file* to bin_attr callbacks") from the driver-core tree interacting with commit 14bf62cde79423a02a590e02664ed29a36facec1 ("HID: add driver for Roccat Kone gaming mouse") from the hid tree. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-21Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (59 commits) HID: fix up 'EMBEDDED' mess in Kconfig HID: roccat: cleanup preprocessor macros HID: roccat: refactor special event handling HID: roccat: fix special button support HID: roccat: Correctly mark init and exit functions HID: hidraw: Use Interrupt Endpoint for OUT Transfers if Available HID: hid-samsung: remove redundant key mappings HID: add omitted hid-zydacron.c file HID: hid-samsung: add support for Creative Desktop Wireless 6000 HID: picolcd: Eliminate use after free HID: Zydacron Remote Control driver HID: Use kmemdup HID: magicmouse: fix input registration HID: make Prodikeys driver standalone config option HID: Prodikeys PC-MIDI HID Driver HID: hidraw: fix indentation HID: ntrig: add filtering module parameters HID: ntrig: add sysfs access to filter parameters HID: ntrig: add sensitivity and responsiveness support HID: add multi-input quirk for eGalax Touchcontroller ...
2010-05-21HID: fix up 'EMBEDDED' mess in KconfigJiri Kosina
The whole point of making some of the drivers automatically selected unless 'EMBEDDED' was to handle quirks transparently after their separation from the generic core. Over time, some of the later-added quirks grew into more standalone drivers, implementing non-trivial features a being larger than a few bytes of code. In addition to that, some of the standalone drivers don't make sense for 99.9% of the users, as they are very specific to rare devices. Therefore build by default in only those drivers which - we historically used to support even before quirk separation from the core code - are isolated enough and likely to hit quite large portion of the users anyway (Microsoft, Logitech) Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-20Input: use ABS_CNT rather than (ABS_MAX + 1)Daniel Mack
Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-20USB: rename usb_buffer_alloc() and usb_buffer_free() usersDaniel Mack
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>
2010-05-20USB: remove uses of URB_NO_SETUP_DMA_MAPAlan Stern
This patch (as1350) removes all usages of coherent buffers for USB control-request setup-packet buffers. There's no good reason to reserve coherent memory for these things; control requests are hardly ever used in large quantity (the major exception is firmware transfers, and they aren't time-critical). Furthermore, only seven drivers used it. We might as well always use streaming DMA mappings for setup-packet buffers, and remove some extra complexity from usbcore. The DMA-mapping portion of hcd.c is currently in flux. A separate patch will be submitted to remove support for URB_NO_SETUP_DMA_MAP after everything else settles down. The removal should go smoothly, as by then nobody will be using it. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-19Merge branches 'ntrig', 'picolcd', 'prodikeys' and 'roccat-kone' into for-linusJiri Kosina
Conflicts: drivers/hid/Makefile
2010-05-19Merge branch 'egalax' into for-linusJiri Kosina
Conflicts: drivers/hid/hid-ids.h
2010-05-19Merge branch 'cando' into for-linusJiri Kosina
Conflicts: drivers/hid/hid-core.c drivers/hid/hid-ids.h
2010-05-19Merge branches 'upstream-fixes', 'bkl-removal', 'debugfs-fixes' and ↵Jiri Kosina
'hid-suspend' into for-linus
2010-05-19Merge branch 'upstream' into for-linusJiri Kosina
Conflicts: drivers/hid/hid-wacom.c
2010-05-19HID: roccat: cleanup preprocessor macrosStefan Achatz
Removed useless preprocessor macros and renamed remaining one to be more qualified. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-19HID: roccat: refactor special event handlingStefan Achatz
As special events are reported along with hid event information all events are now processed further by standard handler. Also cleaned up this code. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-19HID: roccat: fix special button supportStefan Achatz
Added new data and changed workaround for abnormal button behaviour according to new gained knowledge about Roccat Kone device. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-18HID: roccat: Correctly mark init and exit functionsStefan Achatz
Added the __init and __exit hints for module functions. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-18HID: hidraw: Use Interrupt Endpoint for OUT Transfers if AvailableAlan Ott
This patch makes the hidraw driver use the first Interrupt OUT endpoint for HID transfers to the device if such an endpoint exists. This is consistent with the behavior of the hiddev driver, and the logic is similar. From the USB HID specification: The Interrupt Out pipe is optional. If a device declares an Interrupt Out endpoint then Output reports are transmitted by the host to the device through the Interrupt Out endpoint. If no Interrupt Out endpoint is declared then Output reports are transmitted to a device through the Control endpoint, using Set_Report(Output) requests. Signed-off-by: Alan Ott <alan@signal11.us> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-18HID: hid-samsung: remove redundant key mappingsDon Prince
Remove 7 redundant key mappings from Desktop Wireless 6000 that are already handled by the default hid code. Reported-by: Robert Schedel <r.schedel@yahoo.de> Signed-off-by: Don Prince <dhprince-devel@yahoo.co.uk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-17HID: add omitted hid-zydacron.c fileJiri Kosina
Commit a9885c8f7bf62e251fc178 ("HID: Zydacron Remote Control driver") added hid-zydracon driver by Don Prince, but mistakenly omitted hid-zydracon.c file itself. Properly add the file. Reported-by: Don Prince <dhprince.devel@yahoo.co.uk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-17HID: hid-samsung: add support for Creative Desktop Wireless 6000Don Prince
Add support for the multimedia buttons of the Creative Desktop Wireless 6000 keyboard/mouse combo which are not currently handled by the default/samsung HID driver. Signed-off-by: Don Prince <dhprince-devel@yahoo.co.uk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-17HID: picolcd: Eliminate use after freeJulia Lawall
The skip label frees resp, which has not been allocated at the point of this goto and then does a break, based on the fact that err is non-zero. This is replaced by a break directly. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @free@ expression E; position p; @@ kfree@p(E) @@ expression free.E, subE<=free.E, E1; position free.p; @@ kfree@p(E) ... ( subE = E1 | * E ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-17HID: Zydacron Remote Control driverDon Prince
A specialised HID driver for the Zydacron Remote Control (usb id: 13ec:0006). The specialised HID driver adds support for the buttons which are not currently handled by the default HID driver. Signed-off-by: Don Prince <dhprince-devel@yahoo.co.uk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-17HID: Use kmemdupJulia Lawall
Use kmemdup when some other buffer is immediately copied into the allocated region. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression from,to,size,flag; statement S; @@ - to = \(kmalloc\|kzalloc\)(size,flag); + to = kmemdup(from,size,flag); if (to==NULL || ...) S - memcpy(to, from, size); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-12HID: magicmouse: fix input registrationJiri Kosina
When HIDRAW is not set, hid_hw_start() returns ENODEV as no subsystem has claimed the magicmouse device, and probe routine bails out. Which is not what we want. This happens because magicmouse driver is instantiating the connection to Input subsystem itself, and since commit 28918c211d86b ("HID: magicmouse: fix oops after device removal") the HID core is not registering input device itself. Fix this by letting HID core register the input device (so that hid_hw_start() succeeds, as the device is claimed by at least one subsystem) and de-register it again later before proceeding with proper input setup. Reported-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-12HID: make Prodikeys driver standalone config optionJiri Kosina
Analogically for other full-fledged HID drivers, make the Prodikeys driver independent on EMBEDDED. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-12HID: Prodikeys PC-MIDI HID DriverDon Prince
A specialised HID driver for the Creative Prodikeys PC-MIDI USB Keyboard. The Prodikeys PC-MIDI is a multifunction keyboard comprising a qwerty keyboard, multimedia keys and a touch sensitive musical keyboard. The specialised HID driver adds full support for the musical keyboard and extra multimedia keys which are not currently handled by the default HID driver. The specialised HID driver interfaces with ALSA, and presents the midi keyboard as a rawmidi device. Sustain duration, octave shifting and the midi output channel can be read/written form userspace via sysfs. Signed-off-by: Don Prince <dhprince-devel@yahoo.co.uk> ALSA parts: Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-11HID: hidraw: fix indentationAntonio Ospite
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-11HID: ntrig: add filtering module parametersRafi Rubin
Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-11HID: ntrig: add sysfs access to filter parametersRafi Rubin
This should make it a little more convenient to tweak the filtering parameters on the fly. Also unlike load-time parameters, this provides independent tuning for each device conntected. Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-11HID: ntrig: add sensitivity and responsiveness supportRafi Rubin
The old rejection size thresholds were too high for the 12" devices. Larger surfaces like the Dell Studio17 exacerbated the problem since contact size is reported on the same logical scale, making a contact look smaller to the larger screen. Since we have observed erroneous ghost events from these devices we still need to filter the incoming stream. The prior size threshold filter is still in place, though with defaults set to leave it off. This patch adds the two new classes of filters, those that reject live frames before activation, and those that reject empty frames until deactivation. These filters are expressed in terms of a simple state machine for clarity (I hope). The activation filter has two components, slack and size, events are discarded until either is satisfied. Slack is defined as the number of seemingly good contacts to read before accepting the stream as valid (if the threshold is reached in the middle of a frame the remainder of that frame is still discarded). The deactivation filter discards empty frames until hitting a deactivate slack. This time measured in frames. N-Trig devices emit 5-8 (observed so far) empty frames at the end of multitouch activity. Ignoring the first few enables us to safely and gracefully handle erroneous empty frames, thus preventing a change in the tool state which would otherwise result in things like broken lines or dragged objects being dropped in bad places. Also, now that devices with different logical densities have been observed, the aforementioned sizes are scaled from physical to logical scales once those scales are identified. Hopefully this should mean that a given threshold value means the same thing across differing devices. Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-10HID: add multi-input quirk for eGalax TouchcontrollerPeter Hutterer
I've got one of these devices on my desk and it seems that it suffers from the ABS_Z/ABS_RX issue that we've seen in other devices before. This patch uses the same reasoning as 9db630b48 ("HID: add multi-input quirk for NextWindow Touchscreen"). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-07HID: fix suspend crash by moving initializations earlierAlan Stern
Although the usbhid driver allocates its usbhid structure in the probe routine, several critical fields in that structure don't get initialized until usbhid_start(). However if report descriptor parsing fails then usbhid_start() is never called. This leads to problems during system suspend -- the system will freeze. This patch (as1378) fixes the bug by moving the initialization statements up into usbhid_probe(). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Bruno Prémont <bonbons@linux-vserver.org> Tested-By: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>