Re: 3.5.1 hid_generic causes mouse locking until a button is clicked

2012-08-12 Thread Bruno Prémont
Hi, On Sat, 11 August 2012 Dâniel Fraga wrote: > I upgraded from 3.4.4 to 3.5.1 kernel and now I see the new > hid_generic module is causing problem with my mouse (a regular Logitech > USB optical mouse). > > The problem is: after 2 seconds without moving the mouse, the > pointer wil

Re: [PATCH 04/11] MFD: twl4030-audio: Add DT support

2012-08-12 Thread Mark Brown
On Thu, Aug 09, 2012 at 04:53:26PM +0300, Peter Ujfalusi wrote: > On 08/09/2012 01:36 PM, Mark Brown wrote: > > Is there any actual case where an external mute is supplied via a > > mechanism other than a GPIO, and if there is would it not either need > > its own DT property or already need to int

Re: 3.5.1 hid_generic causes mouse locking until a button is clicked

2012-08-12 Thread Dâniel Fraga
On Sun, 12 Aug 2012 19:53:29 +0200 Bruno Prémont wrote: > This might be USB-autosuspend. 2 seconds seems to match the default > delay for autosuspending USB devices. Hi Bruno. That's it! I raised the autosuspend value and I'm using it as a workaround... but the default values a

[PATCH 00/19] Input and HID updates for 3.7

2012-08-12 Thread Henrik Rydberg
Dmitry, Jiri, Here is the tentative patchset planned for 3.7. It touches both the Input and HID subsystems, so I decided to send it to both of you at once. How to distribute the patches can be decided later. The gist of the set is in-kernel tracking and latency. As I started measuring irqsoff tim

[PATCH 01/19] Input: Break out MT data

2012-08-12 Thread Henrik Rydberg
Move all MT-related things to a separate place. This saves some bytes for non-mt input devices, and prepares for new MT features. Signed-off-by: Henrik Rydberg --- drivers/input/evdev.c| 10 ++ drivers/input/input-mt.c | 47 +++ drivers/inp

[PATCH 02/19] Input: Improve the events-per-packet estimate

2012-08-12 Thread Henrik Rydberg
Many MT devices send a number of keys along with the mt information. This patch makes sure that there is room for them in the packet buffer. Signed-off-by: Henrik Rydberg --- drivers/input/input.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/input/input.

[PATCH 15/19] Input: bcm5974 - Convert to MT-B

2012-08-12 Thread Henrik Rydberg
Use of the in-kernel tracking code to convert the driver to MT-B. With ten fingers on the pad, the in-kernel tracking adds approximately 25 us to the maximum irqsoff latency. Under normal workloads, however, the tracking has no measurable effect. Signed-off-by: Henrik Rydberg --- drivers/input/

[PATCH 08/19] Input: MT - Add flags to input_mt_init_slots()

2012-08-12 Thread Henrik Rydberg
Preparing to move more repeated code into the mt core, and a flags argument to the input_mt_slots_init() function. Signed-off-by: Henrik Rydberg --- drivers/hid/hid-magicmouse.c | 2 +- drivers/hid/hid-multitouch.c | 2 +- drivers/input/input-mt.c | 4 +++-

[PATCH 12/19] Input: bcm5974 - Preparatory renames

2012-08-12 Thread Henrik Rydberg
Rename touch properties to match established nomenclature, and define the maximum number of fingers. Signed-off-by: Henrik Rydberg --- drivers/input/mouse/bcm5974.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/input/mouse/bcm5974.c b/dri

[PATCH 13/19] Input: bcm5974 - Drop pressure and width emulation

2012-08-12 Thread Henrik Rydberg
The ABS_PRESSURE and ABS_WIDTH have special scales, and were initially added solely for thumb and palm recognition in the synaptics driver. This never really get used, however, and userspace quickly moved to MT solutions instead. This patch drops the unused events. Signed-off-by: Henrik Rydberg -

[PATCH 14/19] Input: bcm5974 - Drop the logical dimensions

2012-08-12 Thread Henrik Rydberg
The logical scale was previously used to produce special width values to userspace, and its only present use is to put "pressure" hysteresis on a common scale. However, bcm5974 trackpads are very accurate and work well without hysteresis. This patch simplifies the driver and device data by removin

[PATCH 17/19] HID: Only dump input if someone is listening

2012-08-12 Thread Henrik Rydberg
Going through the motions of printing the debug message information takes a long time; using the keyboard can lead to a 160 us irqsoff latency. This patch skips hid_dump_input() when there are no open handles, which brings latency down to 100 us. Signed-off-by: Henrik Rydberg --- drivers/hid/hid

[PATCH 16/19] HID: hid-multitouch: Remove misleading null test

2012-08-12 Thread Henrik Rydberg
A null test was left behind during the autoloading work; the test was introduced by 8d179a9e, but was never completely reverted. Reported-by: Dan Carpenter Signed-off-by: Henrik Rydberg --- drivers/hid/hid-multitouch.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git

[PATCH 18/19] HID: Add an input configured notification callback

2012-08-12 Thread Henrik Rydberg
A hid device may create several input devices, and a driver may need to prepare or finalize the configuration per input device. Currently, there is no sane way for a driver to know when a device has been configured. This patch adds a callback providing that information. Signed-off-by: Henrik Rydbe

[PATCH 11/19] Input: MT - Add slot assignment by id

2012-08-12 Thread Henrik Rydberg
Some drivers produce their own tracking ids, which needs to be mapped to slots. This patch provides that function. Signed-off-by: Henrik Rydberg --- drivers/input/input-mt.c | 30 ++ include/linux/input/mt.h | 2 ++ 2 files changed, 32 insertions(+) diff --git a/dri

[PATCH 09/19] Input: MT - Handle frame synchronization in core

2012-08-12 Thread Henrik Rydberg
Collect common frame synchronization tasks in a new function, input_mt_sync_frame(). Depending on the flags set, it drops unseen contacts and performs pointer emulation. Signed-off-by: Henrik Rydberg --- drivers/input/input-mt.c | 74 ++-- include/linu

[PATCH 10/19] Input: MT - Add in-kernel tracking

2012-08-12 Thread Henrik Rydberg
With the INPUT_MT_TRACK flag set, the function input_mt_assign_slots() can be used to match a new set of contacts against the currently used slots. The algorithm used is based on Lagrange relaxation, and performs very well in practice; slower than mtdev for a few corner cases, but faster in most co

[PATCH 07/19] Input: evdev - Add the events() callback

2012-08-12 Thread Henrik Rydberg
By sending a full frame of events at the same time, the irqsoff latency at heavy load is brought down from 200 us to 100 us. Signed-off-by: Henrik Rydberg --- drivers/input/evdev.c | 68 +++ 1 file changed, 47 insertions(+), 21 deletions(-) diff -

[PATCH 03/19] Input: Remove redundant packet estimates

2012-08-12 Thread Henrik Rydberg
Packet estimates are now better handled in the input core. Remove the redundant estimates from those drivers. Signed-off-by: Henrik Rydberg --- drivers/hid/hid-input.c | 4 drivers/hid/hid-magicmouse.c | 2 -- drivers/input/input-mt.c | 1 - drivers/input/mouse/bcm5974.c | 2 --

[PATCH 04/19] Input: Make sure we follow all EV_KEY events

2012-08-12 Thread Henrik Rydberg
For some EV_KEY types, sending a larger-than-one value causes the input state to oscillate. This patch makes sure this cannot happen, clearing up the autorepeat bypass logic in the process. Signed-off-by: Henrik Rydberg --- drivers/input/input.c | 20 +--- 1 file changed, 13 inse

[PATCH 05/19] Input: Move autorepeat to the event-passing phase

2012-08-12 Thread Henrik Rydberg
Preparing to split event filtering and event passing, move the autorepeat function to the point where the event is actually passed. Signed-off-by: Henrik Rydberg --- drivers/input/input.c | 46 +- 1 file changed, 25 insertions(+), 21 deletions(-) diff

[PATCH 06/19] Input: Send events one packet at a time

2012-08-12 Thread Henrik Rydberg
On heavy event loads, such as a multitouch driver, the irqsoff latency can be as high as 250 us. By accumulating a frame worth of data before passing it on, the latency can be dramatically reduced. As a side effect, the special EV_SYN handling can be removed, since the frame is now atomic. This

[PATCH 19/19] HID: multitouch: Remove the redundant touch state

2012-08-12 Thread Henrik Rydberg
With the input_mt_sync_frame() function in place, there is no longer any need to keep the full touch state in the driver. This patch removes the slot state and replaces the lookup code with the input-mt equivalent. The initialization code is moved to mt_input_configured(), to make sure the full HID