This reverts commit 0db3bfc72a (""HID: multitouch: decide if hid-multitouch
needs to handle mt devices").
The generic detection of hid-mt devices has two major flaws, and was
merged prematurely. Firstly, the hid-multitouch gets loaded even when
the device is handled by a special device. Secondly, the patch only
partially duplicates the device whitelist already present in hid-core,
effectively rendering a number of devices non-functional.
Reported-by: Sean Young <[email protected]>
Tested-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
The recent capacitive DWAV firmwares do not use the CONTACTCOUNT
field, and the touch frame boundary can therefore not be determined.
This patch makes the driver report the touch frame at each completed
slot instead.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
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: [email protected]
Cc: Michael Poole <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Acked-by: Chase Douglas <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
When the multi input quirk is set, there is a new input device
created for every feature report. Since the idea is to present
features per hid device, not per input device, revert back to
the original report loop and change the feature_mapping() callback
to not take the input device as argument.
Signed-off-by: Henrik Rydberg <[email protected]>
Tested-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
With the current code, pressing the integrated button with an
isolating tool does not result in any button report. Fixed
with this this patch.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The switch to dynamically allocated sysfs attributes left the
internal lockdep members uninitialized, causing a formal bug.
This patch adds sysfs_attr_init() to the node creation function,
remedying the problem.
Reported-and-tested-by: Stefan Richter <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
With the preceding patches, git blame assigns about half of
the file to the present author. Add a line to the copyright
to reflect this.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Given the dynamic node construction method, the setup of the
accelerometer, light sensor and keyboard backlight sysfs nodes
can be simplified. This patch does not contain any logic changes.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
With the dynamic temperature group in place, the setup of fans
can be simplified. This patch sets up the fans dynamically, removing
a hundred lines of code.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
With temperature keys being determined automatically, the dmi match
data is only used to assign features that can easily be detected from
the smc. This patch removes the dmi match data altogether, and reduces
the match table to the main machine models.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
The recent Macbooks have temperature registers of a new type.
This patch adds the logic to handle them.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
The current driver creates temperature files based on a list
of temperature keys given per device. Apart from slow adaption
to new machine models, the number of sensors also depends on
the number of processors. This patch looks up the temperature
keys dynamically, thereby supporting all models.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
One main problem with the current driver is the inability to quickly
search for supported keys, resulting in detailed feature maps per
machine model which are cumbersome to maintain.
This patch adds a register lookup table, which enables binary search
for supported keys. The lookup also reduces the io frequency, so the
original mutex is replaced by locks around the actual io.
Signed-off-by: Henrik Rydberg <[email protected]>
[[email protected]: Added value range check to key_at_index_store()]
Signed-off-by: Guenter Roeck <[email protected]>
The device init is used to reset the accelerometer. Failure to reset
is not severe enough to stop loading the module or to resume from
hibernation. This patch relaxes failure to a warning and drops
output in case of success.
Cc: [email protected]
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
In multitouch mode, at least one device (fw: 7.4 id: 0x1c0b1) sometimes
sends a final main packet with x == 1. Since the normal values are above
1472, this is clearly bogus. At the same time, a two-finger touch is
signaled, even though only one finger was on the pad to begin with. This
patch ignores the packet altogether, removing the problem.
Acked-by: Chris Bagwell <[email protected]>
Acked-by: Chase Douglas <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
The Synaptics 2.7 series of touchpads support a mode for reporting two
sets of X/Y/Pressure data (advanced gesture mode). By default, these
devices report only single finger data, depriving userspace of the
nowadays ubiquitous two-finger scroll gesture.
Enabling advanced gesture mode also enables the multi-finger report,
although the device does not claim that capability. Up to three
fingers can be reported this way.
While two or three fingers are touching, the normal packet is
prepended by a reduced finger packet of lower resolution. From the two
packets (which do not represent the actual fingers), the bounding
rectangle of the individual contacts can be extracted. This
information is sufficient to perform scaling gestures and a limited
form of rotation gesture. The behavior has been coined semi-mt
capability, and is signaled to userspace via the INPUT_PROP_SEMI_MT
device property.
Work to decode the advanced gesture packet: Takashi Iwai.
Cleanup and testing of the original patch: Chase Douglas.
Minor cleanup and testing: Chris Bagwell.
Finalization and semi-mt support: Henrik Rydberg.
Reported-by: Tobyn Bertram
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Chase Douglas <[email protected]>
Signed-off-by: Chris Bagwell <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
With the new input property interface, it is possible to report the
special quirks of a device using ioctl/sysfs. This patch sets up the
device as a pointer, and reports the clickpad functionality via the
INPUT_PROP_BUTTONPAD property.
Acked-by: Chase Douglas <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Looking at the uevent stream for input devices, all properties are on
the form "A=B" except the bitmap values, which are on the form
"A==B". This bug has been around at least since 2007, and the input
uevent code has been untouched since. The recent addition of device
properties suggests this is a good time for a remedy.
Acked-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Today, userspace sets up an input device based on the data it emits.
This is not always enough; a tablet and a touchscreen may emit exactly
the same data, for instance, but the former should be set up with a
pointer whereas the latter does not need to. Recently, a new type of
touchpad has emerged where the buttons are under the pad, which
changes logic without changing the emitted data. This patch introduces
a new ioctl, EVIOCGPROP, which enables user access to a set of device
properties useful during setup. The properties are given as a bitmap
in the same fashion as the event types, and are also made available
via sysfs, uevent and /proc/bus/input/devices.
Acked-by: Ping Cheng <[email protected]>
Acked-by: Chase Douglas <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
The input multitouch core is now located in its own file,
and maintained via a git tree. Update the maintainers entry
accordingly.
Signed-off-by: Henrik Rydberg <[email protected]>
The Wetab tablet dual-touch controller works the same way as the one
in the Joojoo tablet. This patch adds the Wetab to the list of
supported devices, and grabs it accordingly in hid-core.
Signed-off-by: Jiri Kosina <[email protected]>
Cc: Stephane Chatty <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
The firmware in the joojoo reports touches sequentially, one per
report, which confuses the current driver. A further complication is
the absense of any indication of a touch frame. This patch converts
the driver to the MT slots protocol, and outputs one full touch frame
per report. This way, proper handling for both firmwares is ensured.
Tested-by: Philipp Merkel <[email protected]>
Cc: Stephane Chatty <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Use estimated signal-to-noise ratios to reduce noise and limit the
amount of events emitted.
Signed-off-by: Jiri Kosina <[email protected]>
Cc: Stephane Chatty <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
The firmware reports a logical minimum of one, but in order for
userspace applications to correctly map all reported values to
non-zero pressure, the driver needs to report a logical minimum of
zero. Fixed with this patch.
Tested-by: Philipp Merkel <[email protected]>
Cc: Stephane Chatty <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
The firmware of both supported devices report a X/Y maximum of 4095,
whereas in reality, it is eight times larger. Fixed with this patch.
Signed-off-by: Jiri Kosina <[email protected]>
Cc: Stephane Chatty <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
The hid core does not yet handle input filtering. Take over the setup
of the input device, so that proper signal-to-noise ratios can be
used.
Signed-off-by: Jiri Kosina <[email protected]>
Cc: Stephane Chatty <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Touch devices capable of hovering, i.e., fingers detected a
distance from the surface, are not supported by the current
input MT protocol. This patch adds ABS_MT_DISTANCE, which may
be used to indicate the distance between the contact and the
surface.
Signed-off-by: Henrik Rydberg <[email protected]>
The drivers using the type B protocol all report tracking information
the same way. The contact id is semantically equivalent to
ABS_MT_SLOT, and the handling of ABS_MT_TRACKING_ID only complicates
the driver. The situation can be improved upon by providing a common
pointer emulation code, thereby removing the need for the tracking id
in the driver. This patch moves all tracking event handling over to
the input core, simplifying both the existing drivers and the ones
currently in preparation.
Acked-by: Ping Cheng <[email protected]>
Acked-by: Jiri Kosina <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
The MT slots devices all follow the same initialization pattern
of creating slots and hinting about buffer size. Let drivers call
an initialization function instead, and make sure it can be called
repeatedly without side effects.
Signed-off-by: Henrik Rydberg <[email protected]>
In preparation for common code to handle a larger set of MT slots
devices, move the slots handling over to a separate file.
Signed-off-by: Henrik Rydberg <[email protected]>
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 <[email protected]>
Signed-off-by: Chase Douglas <[email protected]>
Acked-by: Michael Poole <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
By visual inspection, the reported touch_major and touch_minor axes
are a factor of two too large. Presumably the device actually reports
the width_major and width_minor, which are generally about a factor of
two larger than the touches themselves.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
The current code sometimes misses to report the last BTN_TOUCH event
when multiple fingers are lifted simultaneously. With the
introduction of MT slots, the tracking id is available to determine
the oldest active contact. Use this information to simplify and
correct the touchscreen emulation logic.
Signed-off-by: Henrik Rydberg <[email protected]>
Acked-by: Stéphane Chatty <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
The Microtouch controller is capable of doing finger tracking on
up to 60 fingers. To reduce bandwidth and cpu usage, convert the
driver to use the MT slots protocol. On Stephane's suggestion, also
insert the additional copyright lines.
Signed-off-by: Henrik Rydberg <[email protected]>
Acked-by: Stephane Chatty <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
The range of orientation values for height/width devices should
be [0, 1], but is currently set to [1, 1]. Having min == max also
breaks uinput device setup. Fixed with this patch.
Signed-off-by: Henrik Rydberg <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
The multitouch extensions to the HID protocol allows for contact
data to be sent over several reports, which is also the case for
the 3M M2256PW touchscreen. This patch modifies the logic to only
synchronize the input layer when all contacts have been received.
Consequentially, the full 60-finger capacity of the device is enabled.
Signed-off-by: Henrik Rydberg <[email protected]>
Acked-by: Stephane Chatty <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
The input devices created by uinput do not currently handle multitouch
properly. All events will appear as if they came from slot zero, and
the input event buffers are not adjusted. This patch creates the MT
slots during setup, and sets the number of events per packet based
on the MT usage.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The Bamboo Touch reports a sub-screen resolution of 480x320. The
signal-to-noise ratio is only about 100, so filtering is needed in
order to reduce the jitter to a usable level. However, the low
resolution leads to round-off errors in the EWMA filter, resulting in
extremely jerky pointer motion. This patch explicitly sets a higher
resolution for those devices, and tells this to the completion handler
via a low-resolution quirk.
Signed-off-by: Henrik Rydberg <[email protected]>
Acked-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Add support for the Bamboo Touch trackpad, and make it work with
both the Synaptics X Driver and the Multitouch X Driver. The device
uses MT slots internally, so the choice of protocol is a given.
Signed-off-by: Henrik Rydberg <[email protected]>
Acked-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Collect device-specific code into a single function, and use quirks to
flag specific behavior instead.
Signed-off-by: Henrik Rydberg <[email protected]>
Acked-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The signal-to-noise ratio varies between devices, but currently all
devices are treated the same way. Add fuzz parameters to the feature
struct, allowing for tailored treatment of devices.
Signed-off-by: Henrik Rydberg <[email protected]>
Acked-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
By visual inspection, the reported touch_major and touch_minor axes
are a factor of two too small. Presumably the device actually reports
the semi-major and semi-minor axes. Corrected with this patch.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
For MT slots, the ABS_MT_TRACKING_ID determines whether a slot is in use,
but currently leaves initialization up to the drivers. This patch sets the
slot state to unused upon creation.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This patch adds documentation for the ABS_MT_SLOT event and gives
examples of how to use the event slot protocol.
Reviewed-by: Ping Cheng <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
With the rapidly increasing number of intelligent multi-contact and
multi-user devices, the need to send digested, filtered information
from a set of different sources within the same device is imminent.
This patch adds the concept of slots to the MT protocol. The slots
enumerate a set of identified sources, such that all MT events
can be passed independently and selectively per identified source.
The protocol works like this: Instead of sending a SYN_MT_REPORT
event immediately after the contact data, one sends an ABS_MT_SLOT
event immediately before the contact data. The input core will only
emit events for slots with modified MT events. It is assumed that
the same slot is used for the duration of an initiated contact.
Acked-by: Ping Cheng <[email protected]>
Acked-by: Chase Douglas <[email protected]>
Acked-by: Rafi Rubin <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This patch adds a maintainer for the input multitouch (MT) protocol,
such that get_maintainer.pl selects it whenever an MT event is present
in the patch.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
When the client buffer is very small and wraps around a lot, it may
well be that a write increases the head such that head == tail. If
this happens between the point where a poll is triggered and the
actual data is being read, there will be no data to read. This is
confusing to applications, which might end up closing the file.
This patch solves the problem by making sure the client buffer is
never empty after writing to it.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Acked-by: Jiri Kosina <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Some devices, in particular MT devices, produce a lot of data. This
may lead to overflowing of the event queues in evdev driver, which
by default are fairly small. Let the drivers hint the average number
of events per packet generated by the device, and use that information
when computing the buffer size evdev should use for the device.
Signed-off-by: Henrik Rydberg <[email protected]>
Acked-by: Chase Douglas <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Allocate the event buffer dynamically, and prepare to compute the
buffer size in a separate function. This patch defines the size
computation to be identical to the current code, and does not contain
any logical changes.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This patch adds generic support for the MacBook Pro 7 family
based on the 7,1 model.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
The MacBookPro 5,3 model has two fans, whereas the 5,4 model has
only one. This patch adds explicit support for the 5,3 and 5,4 models.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
The current code will not remove the sysfs files for fan numbers three
and up. Also, upon exit, fans one and two are removed regardless of
their existence. This patch cleans up the sysfs error handling for
the fans.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Nicolas has expressed a wish to be relieved from the maintenance
of applesmc, so we simply switch maintainer with this patch.
Signed-off-by: Henrik Rydberg <[email protected]>
Acked-by: Nicolas Boichat <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
The Multitouch X driver project has moved to alpha status.
This patch updates the documentation accordingly.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The current documentation does not explicitly specify how to report
zero fingers, leaving a potential problem in the driver implementations
and giving no parsing directive to userland. This patch defines two
equally valid ways.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This patch documents a new ABS_MT parameter and adds further text to
clarify some points around the MT protocol.
Requested-by: Yoonyoung Shim <[email protected]>
Requested-by: Mika Kuoppala <[email protected]>
Requested-by: Peter Hutterer <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
For pressure-based multi-touch devices, a direct way to send sensor
intensity data per finger is needed. This patch adds the ABS_MT_PRESSURE
event to the MT protocol.
Requested-by: Yoonyoung Shim <[email protected]>
Requested-by: Mika Kuoppala <[email protected]>
Requested-by: Peter Hutterer <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Make bcm5974 report raw multi-touch (MT) data in the form of ABS_MT events.
[[email protected]: get rid of module option, always report all events]
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
On resume from suspend, the driver currently resets the logical state as
if it was brought up from halt. This patch uses the
dev_pm_ops.resume/restore methods to synchronize the hardware with the
memorized logical state, in effect bringing back the accelerometer and
backlight to the state prior to suspend. Works for both suspend to ram
and hibernation. The patch has zero effect on the running state.
Signed-off-by: Henrik Rydberg <[email protected]>
Cc: Nicolas Boichat <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Through the collaboration to adapt the N-trig and Stantum HID
drivers to the MT protocol, some semantic clarifications to the
protocol have been made. This patch adds them to the MT documentation.
Signed-off-by: Henrik Rydberg <[email protected]>
Tested-by: Stéphane Chatty <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
There are a few multi-touch devices that support finger tracking
well in hardware, Stantum being the prime example. By exposing the
tracking ID in the MT protocol, evdev bandwidth and cpu usage in
user space can be reduced.
This patch adds the ABS_MT_TRACKING_ID to the MT protocol.
Signed-off-by: Henrik Rydberg <[email protected]>
Tested-by: Stéphane Chatty <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This patchs adds documentation for the multi-touch protocol to
Documentation/input/.
[[email protected]: grammar fixes]
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
In order to utilize the full power of the new multi-touch devices, a
way to report detailed finger data to user space is needed. This patch
adds a multi-touch (MT) protocol which allows drivers to report details
for an arbitrary number of fingers.
The driver sends a SYN_MT_REPORT event via the input_mt_sync() function
when a complete finger has been reported.
In order to stay compatible with existing applications, the data
reported in a finger packet must not be recognized as single-touch
events. In addition, all finger data must bypass input filtering,
since subsequent events of the same type refer to different fingers.
A set of ABS_MT events with the desired properties are defined. The
events are divided into categories, to allow for partial implementation.
The minimum set consists of ABS_MT_TOUCH_MAJOR, ABS_MT_POSITION_X and
ABS_MT_POSITION_Y, which allows for multiple fingers to be tracked.
If the device supports it, the ABS_MT_WIDTH_MAJOR may be used to provide
the size of the approaching finger. Anisotropy and direction may be
specified with ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MINOR and
ABS_MT_ORIENTATION. Devices with more granular information may specify
general shapes as blobs, i.e., as a sequence of rectangular shapes
grouped together by a ABS_MT_BLOB_ID. Finally, the ABS_MT_TOOL_TYPE
may be used to specify whether the touching tool is a finger or a pen.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
With the upcoming multi-touch interface as an example, there is
a need to make certain that all reported events actually get passed
to the event handler. This patch equips the input core with the
ability to bypass all filtering for certain EV_ABS events.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This patch adds documentation for the bcm5974 to Documentation/input/.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Add more button and finger data to the debug output.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Tested-by: David M. Lary <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
In order to analyze the SMC of the newer MacPros, applesmc needs to
recognize the machine. This patch adds the missing generic dmi_match
entry for MacPro models.
Signed-off-by: Henrik Rydberg <[email protected]>
Cc: Nicolas Boichat <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
On macbooks there are specific keys for the user-space functions Expose
and Dashboard, which currently has no counterpart in input.h. This patch
adds KEY_SCALE and KEY_DASHBOARD, and maps the keyboard accordingly.
Acked-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
The unibody MacBook 5 and MacBook Pro 5 come with a new version of
the bcm5974 trackpad. This patch adds the USB device ids and all
the appropriate quirks, including hid_blacklist.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Add accelerometer, backlight and temperature sensor support for the new
unibody Macbook Pro 5.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Add accelerometer, backlight and temperature sensor support for the new
unibody Macbook 5.
Signed-off-by: Henrik Rydberg <[email protected]>
Tested-by: David M. Lary <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
The read fail ratio is sensitive to the delay between the first byte
written and the first byte read; apparently the sensors cannot be rushed.
Increasing the minimum wait time, without changing the total wait time,
improves the fail ratio from a 8% chance that any of the sensors fails in
one read, down to 0.4%, on a Macbook Air. On a Macbook Pro 3,1, the
effect is even more apparent. By reducing the number of status polls, the
ratio is further improved to below 0.1%. Finally, increasing the total
wait time brings the fail ratio down to virtually zero.
Signed-off-by: Henrik Rydberg <[email protected]>
Tested-by: Bob McElrath <[email protected]>
Cc: Nicolas Boichat <[email protected]>
Cc: "Mark M. Hoffman" <[email protected]>
Cc: Jean Delvare <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
On some recent Macbooks, the package length for the light sensors ALV0 and
ALV1 has changed from 6 to 10. This patch allows for a variable package
length encompassing both variants.
Signed-off-by: Henrik Rydberg <[email protected]>
Cc: Nicolas Boichat <[email protected]>
Cc: Riki Oktarianto <[email protected]>
Cc: Mark M. Hoffman <[email protected]>
Cc: Jean Delvare <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
The time to wait for a status change while reading or writing to the SMC
ports is a balance between read reliability and system performance. The
current setting yields rougly three errors in a thousand when
simultaneously reading three different temperature values on a Macbook
Air. This patch increases the setting to a value yielding roughly one
error in ten thousand, with no noticable system performance degradation.
Signed-off-by: Henrik Rydberg <[email protected]>
Cc: Nicolas Boichat <[email protected]>
Cc: Riki Oktarianto <[email protected]>
Cc: Mark M. Hoffman <[email protected]>
Cc: Jean Delvare <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
On many Macbooks since mid 2007, the Pro, C2D and Air models, applesmc
fails to read some or all SMC ports. This problem has various effects,
such as flooded logfiles, malfunctioning temperature sensors,
accelerometers failing to initialize, and difficulties getting backlight
functionality to work properly.
The root of the problem seems to be the command protocol. The current
code sends out a command byte, then repeatedly polls for an ack before
continuing to send or recieve data. From experiments leading to this
patch, it seems the command protocol never quite worked or changed so that
one now sends a command byte, waits a little bit, polls for an ack, and if
it fails, repeats the whole thing by sending the command byte again.
This patch implements a send_command function according to the new
interpretation of the protocol, and should work also for earlier models.
Signed-off-by: Henrik Rydberg <[email protected]>
Cc: Nicolas Boichat <[email protected]>
Cc: Riki Oktarianto <[email protected]>
Cc: Mark M. Hoffman <[email protected]>
Cc: Jean Delvare <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>