20 Jun, 2017
1 commit
-
Setting these bits causes libinput to fail to initialize the device;
setting BTN_TOUCH and BTN_TOOL_FINGER causes it to treat the mouse as a
touchpad, and it then refuses to continue when it discovers ABS_X is not
set.This breaks all known Wayland compositors, as well as Xorg when the
libinput driver is being used.This reverts commit f4b65b9563216b3e01a5cc844c3ba68901d9b195.
Signed-off-by: Daniel Stone
Cc: Che-Liang Chiou
Cc: Thierry Escande
Cc: Jiri Kosina
Cc: Benjamin Tissoires
Acked-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina
05 May, 2017
1 commit
-
The driver emits multi-touch events for Magic Trackpad as well as Magic
Mouse, but it does not set keybits that are related to multi-touch event
for Magic Mouse; so set these keybits.The keybits that are not set cause trouble because user programs often
probe these keybits for self-configuration and thus they cannot operate
properly if the keybits are not set.One of such troubles is that libevdev will not be able to emit correct
touch count, causing gestures library failed to do fling stop.Signed-off-by: Che-Liang Chiou
Signed-off-by: Thierry Escande
Signed-off-by: Jiri Kosina
24 Nov, 2016
1 commit
-
Kernel v4.9 strictly enforces DMA capable buffers, so we need to remove
buffers allocated on the stack.Signed-off-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina
06 Nov, 2015
1 commit
-
When configuring input device via input_configured callback we may
encounter errors (for example input_mt_init_slots() may fail). Instead
of continuing with half-initialized input device let's allow driver
indicate failures.Signed-off-by: Jaikumar Ganesh
Signed-off-by: Arve Hjønnevåg
Reviewed-by: Benjamin Tissoires
Reviewed-by: David Herrmann
Acked-by: Nikolai Kondrashov
Acked-by: Andrew Duggan
Signed-off-by: Dmitry Torokhov
Signed-off-by: Jiri Kosina
27 Aug, 2014
1 commit
-
The report passed to us from transport driver could potentially be
arbitrarily large, therefore we better sanity-check it so that
magicmouse_emit_touch() gets only valid values of raw_id.Cc: stable@vger.kernel.org
Reported-by: Steven Vittitoe
Signed-off-by: Jiri Kosina
17 Feb, 2014
2 commits
-
ret = hid_output_raw_report(A, B, C, HID_FEATURE_REPORT);
is equivalent to
ret = hid_hw_raw_request(A, B[0], B, C, HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
whatever the transport layer is.So use the new API where available
Signed-off-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina -
Add a helper to access hdev->hid_output_raw_report().
To convert the drivers, use the following snippets:
for i in drivers/hid/*.c
do
sed -i.bak "s/[^ \t]*->hid_output_raw_report(/hid_output_raw_report(/g" $i
doneThen manually fix for checkpatch.pl
Reviewed-by: David Herrmann
Signed-off-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina
06 Sep, 2013
1 commit
-
…3.12/logitech', 'for-3.12/multitouch-win8', 'for-3.12/trasnport-driver-cleanup', 'for-3.12/uhid', 'for-3.12/upstream' and 'for-3.12/wiimote' into for-linus
31 Jul, 2013
1 commit
-
It is safe to use devres allocation within the hid subsystem:
- the devres release is called _after_ the call to .remove(), meaning
that no freed pointers will exists while removing the device
- if a .probe() fails, devres releases all the allocated ressources
before going to the next driver: there will not be ghost ressources
attached to a hid device if several drivers are probed.Given that, we can clean up a little some of the HID drivers. These ones
are trivial:
- there is only one kzalloc in the driver
- the .remove() callback contains only one kfree on top of hid_hw_stop()
- the error path in the probe is easy enough to be manually checkedSigned-off-by: Benjamin Tissoires
Reviewed-by: Andy Shevchenko
Signed-off-by: Jiri Kosina
23 Jul, 2013
1 commit
-
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.Signed-off-by: Jingoo Han
Signed-off-by: Jiri Kosina
30 Apr, 2013
1 commit
-
…ansport-cleanups', 'for-3.10/i2c-hid' and 'for-3.10/logitech' into for-linus
04 Apr, 2013
1 commit
-
Since kernel 3.7, it appears that the input registration occured before
the end of magicmouse_setup_input(). This is shown by receiving a lot of
"EV_SYN SYN_REPORT 1" instead of normal "EV_SYN SYN_REPORT 0".
This value means that the output buffer is full, and the user space
is loosing events.Using .input_configured guarantees that the race is not occuring, and that
the call of "input_set_events_per_packet(input, 60)" is taken into account
by input_register().Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=908604Cc: stable@vger.kernel.org
Reported-and-Tested-By: Clarke Wixon
Signed-off-by: Benjamin Tissoires
Signed-off-by: Jiri Kosina
25 Feb, 2013
1 commit
-
Most HID drivers (rightfully) only depend on the HID bus, not the
specific transport layer. Remove such dependencies where applicable.Signed-off-by: Benjamin Tissoires
Acked-by: Henrik Rydberg
Reviewed-by: Mika Westerberg
Signed-off-by: Jiri Kosina
03 Jan, 2013
1 commit
-
Use the new module_hid_driver macro in all HID drivers that have
a simple register/unregister init/exit.This also converts the hid drivers that test for a failure of
hid_register_driver() and report the failure. Using module_hid_driver
in those drivers removes the failure message.Signed-off-by: H Hartley Sweeten
Signed-off-by: Jiri Kosina
20 Sep, 2012
1 commit
-
Preparing to move more repeated code into the mt core, add a flags
argument to the input_mt_slots_init() function.Reviewed-and-tested-by: Benjamin Tissoires
Tested-by: Ping Cheng
Acked-by: Dmitry Torokhov
Signed-off-by: Henrik Rydberg
05 Jul, 2012
2 commits
-
The driver for Apple Magic Trackpad/Mouse currently uses
Multi-touch Protocol A (MT-A) to report touch events and uses
ABS_MT_TRACKING_ID to do finger tracking. The fact of the device
being able to track individual finger makes it possible to
report touch events using MT-B. This patch converts the driver
to use MT-B as it is preferred to MT-A.V4: Removed BTN_TOUCH evnet.
V3: Removed the single touch related logic.
V2: Converting entirely to MT-B as Henrik Rydberg suggested.Signed-off-by: Yufeng Shen
Reviewed-and-tested-by: Henrik Rydberg
Signed-off-by: Jiri Kosina -
Remove the report_touches switch as it is not so useful to turn
off reporting touch events for a touch device. Let the userspace
to do the filtering if the turning off is needed.V2: Remove report_touches as suggeted by Chase Douglas
Signed-off-by: Yufeng Shen
Reviewed-and-tested-by: Henrik Rydberg
Signed-off-by: Jiri Kosina
25 Jun, 2012
1 commit
-
In patch "HID: magicmouse: Adjust major / minor axes to scale",
touch_major and touch_minor axes are scaled by a factor of
four when reported but the max touch_major/minor is not scaled
accordingly. This patch scales the max touch_major/minor to
be consistent with the reported value.Signed-off-by: Yufeng Shen
Acked-by: Henrik Rydberg
Signed-off-by: Jiri Kosina
21 Feb, 2012
1 commit
-
Signed-off-by: Chase Douglas
Signed-off-by: Jiri Kosina
21 Oct, 2011
1 commit
-
hid-magicmouse was advertising the Apple Magic Trackpad as having 2
buttons (left and right) when it actually only has 1 button.Advertising multiple buttons makes Xorg disable all button 2 and 3
emulation (using multi-finger clicks). So Xorg users don't get working
right/middle-click emulation out of the box.This patch makes hid-magicmouse correctly only report one real button
for Magic Trackpad, which in turn makes Xorg enable multi-finger click
support to emulate right/middle buttons.[http://launchpad.net/bugs/862094]
Signed-off-by: Daniel van Vugt
Reviewed-by: Chase Douglas
Signed-off-by: Jiri Kosina
25 Aug, 2011
1 commit
-
This is basically a more generic respin of 23746a6 ("HID: magicmouse: ignore
'ivalid report id' while switching modes") which got reverted later by
c3a492.It turns out that on some configurations, this is actually still the case
and we are not able to detect in runtime.The device reponds with 'invalid report id' when feature report switching it
into multitouch mode is sent to it.This has been silently ignored before 0825411ade ("HID: bt: Wait for ACK
on Sent Reports"), but since this commit, it propagates -EIO from the _raw
callback .So let the driver ignore -EIO as response to 0xd7,0x01 report, as that's
how the device reacts in normal mode.Sad, but following reality.
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=35022
Reported-by: Chase Douglas
Reported-by: Jaikumar Ganesh
Tested-by: Chase Douglas
Tested-by: Jaikumar Ganesh
Signed-off-by: Jiri Kosina
10 Aug, 2011
1 commit
-
Add touch surface resolution information. The size of the touch surfaces
has been determined to the hundredth of a mm.Cc: Jiri Kosina
Cc: Michael Poole
Cc: linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Chase Douglas
[jkosina@suse.cz: update comments and commit message]
Signed-off-by: Jiri Kosina
16 Jun, 2011
1 commit
-
This reverts commit 23746a66d7d9e73402c68ef00d708796b97ebd72.
It turned out that the actual reason for failure is not the device
firmware, but bug in Bluetooth stack, which will be fixed by
patch by Ville Tervo which corrects the mask handling for CSR 1.1
Dongles.Reported-and-tested-by: Ed Tomlinson
Reported-and-tested-by: Chase Douglas
Signed-off-by: Jiri Kosina
23 May, 2011
1 commit
20 May, 2011
1 commit
-
The device reponds with 'invalid report id' when feature report switching it
into multitouch mode is sent to it.This has been silently ignored before 0825411ade ("HID: bt: Wait for ACK
on Sent Reports"), but since this commit, it propagates -EIO from the _raw
callback .So let the driver ignore -EIO as response to 0xd7,0x01 report, as that's
how the device reacts in normal mode.Sad, but following reality.
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=35022
Tested-by: Chase Douglas
Signed-off-by: Jiri Kosina
08 Apr, 2011
1 commit
-
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
Fix common misspellings
06 Apr, 2011
1 commit
-
The evdev buffer isn't big enough when you get many fingers on the
device. Bump up the buffer to a reasonable size, matching what other
multitouch devices use. Without this change, events may be discarded in
the evdev buffer before they are read.Reported-by: Simon Budig
Cc: Henrik Rydberg
Cc: Jiri Kosina
Cc: stable@kernel.org
Signed-off-by: Chase Douglas
Acked-by: Henrik Rydberg
Signed-off-by: Jiri Kosina
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
10 Mar, 2011
1 commit
-
The magic trackpad and mouse both report touch orientation in opposite
direction to the bcm5974 driver and what is written in
Documents/input/multi-touch-protocol.txt. This patch reverts the
direction, so that all in-kernel devices with this feature behave the
same way.Since no known application has been utilizing this information yet, it
seems appropriate also for stable.Cc: stable@kernel.org
Cc: Michael Poole
Signed-off-by: Henrik Rydberg
Acked-by: Chase Douglas
Signed-off-by: Jiri Kosina
08 Jan, 2011
1 commit
10 Dec, 2010
1 commit
-
Neaten current uses of dev_ by adding and using
hid specific hid_ macros.Convert existing uses of dev_ uses to hid_.
Convert hid-pidff printk uses to hid_.Remove err_hid and use hid_err instead.
Add missing newlines to logging messages where necessary.
Coalesce format strings.Add and use pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Other miscellaneous changes:
Add const struct hid_device * argument to hid-core functions
extract() and implement() so hid_ can be used by them.
Fix bad indentation in hid-core hid_input_field function
that calls extract() function above.Signed-off-by: Joe Perches
Signed-off-by: Jiri Kosina
09 Dec, 2010
1 commit
-
With the recent switch to having the hid layer handle standard axis
initialization, the Magic Trackpad now reports relative axes. This would
be fine in the normal mode, but the driver puts the device in multitouch
mode where no relative events are generated. Also, userspace software
depends on accurate axis information for device type detection. Thus,
ignoring the relative axes from the Magic Trackpad is best.Signed-off-by: Chase Douglas
Signed-off-by: Jiri Kosina
01 Oct, 2010
1 commit
-
By visual inspection, the reported touch_major and touch_minor axes
are roughly a factor of four too small. The factor is approximate,
since the protocol is not known and the HID report encodes touch size
with fewer bits than positions. This patch scales the reported values
by a factor of four.Signed-off-by: Henrik Rydberg
Signed-off-by: Chase Douglas
Acked-by: Michael Poole
Signed-off-by: Jiri Kosina
24 Sep, 2010
1 commit
-
Let the HID core handle input device setup and HID-compliant reports.
This driver then only has to worry about the non-standard reports.Signed-off-by: Michael Poole
Acked-by: Chase Douglas
Signed-off-by: Jiri Kosina
04 Sep, 2010
2 commits
-
The trackpad speaks a similar, but different, protocol from the magic
mouse. However, only small code tweaks here and there are needed to make
basic multitouch work.Extra logic is required for single-touch emulation of the touchpad. The
changes made here take the approach that only one finger may emulate the
single pointer when multiple fingers have touched the screen. Once that
finger is raised, all touches must be raised before any further single
touch events can be sent.Sometimes the magic trackpad sends two distinct touch reports as one big
report. Simply splitting the packet in two and resending them through
magicmouse_raw_event ensures they are handled properly.I also added myself to the copyright statement.
Signed-off-by: Chase Douglas
Acked-by: Michael Poole
Signed-off-by: Jiri Kosina -
The new format should be easier to read to determine which bits
correspond to which data. It also brings all the manipulation logic to
the top of the function. This makes size and orientation reading more
clear.Note that the impetus for this change is the forthcoming support for the
Magic Trackpad, which has a different touch data protocol.Signed-off-by: Chase Douglas
Acked-by: Michael Poole
Signed-off-by: Jiri Kosina
03 Sep, 2010
1 commit
-
Only the first feature request is required to put the Magic Mouse into
multitouch mode. This is also the case for the Magic Trackpad, for which
support will be added in a later commit.Signed-off-by: Chase Douglas
Acked-by: Michael Poole
Signed-off-by: Jiri Kosina
02 Sep, 2010
2 commits
-
The timestamps from the device are currently stored in the private data
structure. These aren't used, so remove them. I've left a comment
detailing the protocol for future reference.Signed-off-by: Chase Douglas
Acked-by: Michael Poole
Signed-off-by: Jiri Kosina -
For the MT protocol, we need to properly keep track of each down touch.
This change simplifies the logic, and should make things easier when
support for the Magic Trackpad is added.Signed-off-by: Chase Douglas
Acked-by: Michael Poole
Signed-off-by: Jiri Kosina
12 Jul, 2010
1 commit
-
The X and Y values have two more significant bits in the same byte
that contains click status. Include these in the reported value.
Thanks to Iain Hibbert of NetBSD for pointing this out.Signed-off-by: Michael Poole
Acked-by: Chase Douglas
Signed-off-by: Jiri Kosina