Commit 9ee3e06610 ("HID: i2c-hid: override HID descriptors for certain
devices") added a new dmi_system_id quirk table to override certain HID
report descriptors for some systems that lack them.
But the table wasn't properly terminated, causing the dmi matching to
walk off into la-la-land, and starting to treat random data as dmi
descriptor pointers, causing boot-time oopses if you were at all
unlucky.
Terminate the array.
We really should have some way to just statically check that arrays that
should be terminated by an empty entry actually are so. But the HID
people really should have caught this themselves, rather than have me
deal with an oops during the merge window. Tssk, tssk.
Cc: Julian Sax <[email protected]>
Cc: Benjamin Tissoires <[email protected]>
Cc: Jiri Kosina <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Fixes and new features for driver core. Highlights:
- maximum global item tag report size gets increased to 256
- improved INPUT_PROP reporting for Digitizer devices
The DTK-2451 and DTH-2452 have a buggy HID descriptor which incorrectly
contains a Cintiq-like report, complete with pen tilt, rotation, twist, serial
number, etc. The hardware doesn't actually support this data but our driver
duitifully sets up the device as though it does. To ensure userspace has a
correct view of devices without updated firmware, we clean up this incorrect
data in wacom_setup_device_quirks.
We're also careful to clear the WACOM_QUIRK_TOOLSERIAL flag since its presence
causes the driver to wait for serial number information (via
wacom_wac_pen_serial_enforce) that never comes, resulting in
the pen being non-responsive.
Signed-off-by: Jason Gerecke <[email protected]>
Fixes: 8341720642 ("HID: wacom: Queue events with missing type/serial data for later processing")
Cc: [email protected] # v4.16+
Signed-off-by: Jiri Kosina <[email protected]>
Whiskers tablet mode support needs access to Chrome Embedded Controller,
so we need to add dependency on MFD_CROS_EC.
Reported-by: kbuild test robot <[email protected]>
Fixes: eb1aac4c87 ("HID: google: add support tablet mode switch for Whiskers")
Signed-off-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Trivial fix to spelling mistake in hid_err error message
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
SIMPLE_DEV_PM_OPS() already implies const for the type; drop the
extra modifier.
Fixes: eb1aac4c87 ("HID: google: add support tablet mode switch for Whiskers")
Signed-off-by: Jiri Kosina <[email protected]>
Whiskers is a foldable base, and thus requires combining "base presence"
signal coming from EC with base state signal (folded/unfolded) coming
from USB/HID interface to produce proper SW_TABLET_MODE event.
Signed-off-by: Nicolas Boichat <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
USB device
Vendor 05ac (Apple)
Device 0265 (Magic Trackpad 2)
Bluetooth device
Vendor 004c (Apple)
Device 0265 (Magic Trackpad 2)
Add support for Apple Magic Trackpad 2 over USB and bluetooth, putting
the device in multi-touch mode.
Signed-off-by: Claudio Mettler <[email protected]>
Signed-off-by: Marek Wyborski <[email protected]>
Signed-off-by: Sean O'Brien <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
A particular touchpad (SIPODEV SP1064) refuses to supply the HID
descriptors. This patch provides the framework for overriding these
descriptors based on DMI data. It also includes the descriptors for
said touchpad, which were extracted by listening to the traffic of the
windows filter driver, as well as the DMI data for the laptops known
to use this device.
Relevant Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1526312
Cc: Hans de Goede <[email protected]>
Reported-and-tested-by: [email protected]
Reported-and-tested-by: Bruno Jesus <[email protected]>
Reported-and-tested-by: Dietrich <[email protected]>
Reported-and-tested-by: [email protected]
Signed-off-by: Julian Sax <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
This is a driver to fix input mapping and add LED & force feedback
support for the "BigBen Interactive Kid-friendly Wired Controller
PS3OFMINIPAD SONY" gamepad with USB id 146b:0902. It was originally
sold as a PS3 accessory and makes a very nice gamepad for Retropie.
Signed-off-by: Hanno Zulla <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Fix the following compile warning:
drivers/hid/hid-logitech-hidpp.c: In function 'hi_res_scroll_enable':
drivers/hid/hid-logitech-hidpp.c:2714:54: warning: 'multiplier' may be used uninitialized in this function [-Wmaybe-uninitialized]
hidpp->vertical_wheel_counter.resolution_multiplier = multiplier;
Signed-off-by: zhong jiang <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Currently wr_msg_ctl_info is used in ishtp_device just for list head
purpose, using list_head directly can save ~150 bytes size for
each replacement.
Also this patch can save ~170 bytes of code size in intel-ish-ipc.ko.
Signed-off-by: Hong Liu <[email protected]>
Acked-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Use resource-managed api to simplify error handling in probe and
driver remove logic.
With this patch, we can save ~170 bytes code size in intel-ish-ipc.ko.
before:
text data bss dec hex filename
11495 1568 72 13135 334f intel-ish-ipc.ko
after:
text data bss dec hex filename
11327 1568 72 12967 32a7 intel-ish-ipc.ko
Signed-off-by: Hong Liu <[email protected]>
Acked-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Added two APIs:
- ishtp_cl_get_tx_free_buffer_size:
This returns total size available for a client to queue TX data.
- ishtp_cl_get_tx_free_rings:
This returns total number of TX rings available for a client.
Signed-off-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
ishtp exposed helper ishtp_fw_cl_get_client() function for client
information searching, so switch to use it.
Signed-off-by: Even Xu <[email protected]>
Reviewed-by: Andriy Shevchenko <[email protected]>
Acked-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
ishtp bus driver exposed helper functions for client buffer accessing,
so change to use these functions in ishtp-hid-client driver to avoid
access client buffer directly.
Signed-off-by: Even Xu <[email protected]>
Reviewed-by: Andriy Shevchenko <[email protected]>
Acked-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Commit 52cf93e63e ("HID: i2c-hid: Don't reset device upon system resume")
removes the need for the RESEND_REPORT_DESCR quirk for Raydium devices, but
kept it for the SIS device id 10FB touchscreens, as the author of that
commit could not determine if the quirk is still necessary there.
I've tested suspend/resume on a Toshiba Click Mini L9W-B which is the
device for which this quirk was added in the first place and with the
"Don't reset device upon system resume" fix the quirk is no longer
necessary, so this commit removes it.
Note even better I also had some other devices with SIS touchscreens which
suspend/resume issues, where the RESEND_REPORT_DESCR quirk did not help.
I've also tested these devices with the "Don't reset device upon system
resume" fix and I'm happy to report that that fix also fixes touchscreen
resume on the following devices:
Asus T100HA
Asus T200TA
Peaq C1010
Cc: Kai-Heng Feng <[email protected]>
Acked-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
This hantick HTIX5288 touchpad can quickly fall in a wrong state if
there are too many open/close operations. This will either make it stop
reporting any input, or will shift all the input reads by a few bytes,
making it impossible to decode.
Here, we never release the probed touchpad runtime pm while the driver
is loaded, which should disable all runtime pm suspend/resumes.
This fast repetition of sleep/wakeup is also more likely to happen when
using runtime PM, which is why the quirk is done there, and not for all
power downs, which would include suspend or module removal.
Signed-off-by: Anisse Astier <[email protected]>
Cc: [email protected]
Acked-by: Benjamin Tissoires <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Tested-by: Philip Müller <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Raydium touchscreen triggers interrupt storm after system-wide suspend:
[ 179.085033] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/65535)
According to Raydium, Windows driver does not reset the device after system
resume.
The HID over I2C spec does specify a reset should be used at intialization, but
it doesn't specify if reset is required for system suspend.
Tested this patch on other i2c-hid touchpanels I have and those touchpanels do
work after S3 without doing reset. If any regression happens to other
touchpanel vendors, we can use quirk for Raydium devices.
There's still one device uses I2C_HID_QUIRK_RESEND_REPORT_DESCR so keep it
there.
Cc: Aaron Ma <[email protected]>
Cc: AceLan Kao <[email protected]>
Signed-off-by: Kai-Heng Feng <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Some system may want to know if a detected digitizer device is either an
integrated or an external device. In order to distinguish such condition,
setting either INPUT_PROP_DIRECT or INPUT_PROP_POINTER is required,
checking the member, "application", in "hid_field" structure.
Signed-off-by: Tatsunosuke Tobita <[email protected]>
Reviewed-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Reflect that fact in Kconfig, the same we do for other such drivers.
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Special key events received by the custom vendor's hdev are
translated to key events on the kbd iface's input device, so
their processing must not continue. Return -EPERM from
raw_event handler to effectively stop source events from
being processed in hid-core.
Signed-off-by: Daniel M. Lambea <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Parameter g6_is_space instructs the driver to map G6 keypresses
to KEY_SPACE (true) or to KEY_F18 (false). Make the parameter
configurable via module_param_cb to allow users to change its
value without reloading the module.
Signed-off-by: Daniel M. Lambea <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Commit b0f847e16c ("HID: hid-sensor-hub: Force logical minimum to 1 for
power and report state") not only replaced the descriptor fixup done for
devices with the HID_SENSOR_HUB_ENUM_QUIRK with a generic fix, but also
accidentally removed the unrelated descriptor fixup for the Lenovo ThinkPad
Helix 2 sensor hub. This commit restores this fixup.
Restoring this fixup not only fixes the Lenovo ThinkPad Helix 2's sensors,
but also the Lenovo ThinkPad 8's sensors.
Fixes: b0f847e16c ("HID: hid-sensor-hub: Force logical minimum ...")
Cc: Srinivas Pandruvada <[email protected]>
Cc: Fernando D S Lima <[email protected]>
Acked-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
There are three features used by various Logitech mice for
high-resolution scrolling: the scrolling acceleration bit in HID++ 1.0,
and the x2120 and x2121 features in HID++ 2.0 and above. This patch
supports all three, and uses the multiplier reported by the mouse for
the HID++ 2.0+ features.
The full list of product IDs of mice which support high-resolution
scrolling was provided by Logitech, but the patch was tested using the
following mice (using the Unifying receiver):
* HID++ 1.0: Anywhere MX, Performance MX
* x2120: M560
* x2121: MX Anywhere 2, MX Master 2S
Signed-off-by: Harry Cutts <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
"Scrolling acceleration" is a bit of a misnomer: it doesn't deal with
acceleration at all. However, that's the name used in Logitech's spec,
so I used it here.
Signed-off-by: Harry Cutts <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
To avoid code duplication, this class counts high-resolution scroll
movements and emits the legacy low-resolution events when appropriate.
Drivers should be able to create one instance for each scroll wheel that
they need to handle.
Signed-off-by: Harry Cutts <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
There is a NULL pointer dereference in case memory resources
for *parse* are not successfully allocated.
Fix this by adding a new goto label and make the execution
path jump to it in case vzalloc() fails.
Addresses-Coverity-ID: 1473081 ("Dereference after null check")
Fixes: b2dd9f2e5a ("HID: core: fix memory leak on probe")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Reviewed-by: Stefan Agner <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Now that the application is simply stored in struct hid_input, we can
overwrite it in mt_input_mapping() for the faulty egalax and have a
simpler suffix processing in mt_input_configured()
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Or it creates some weird input names like:
"MI Dongle MI Wireless Mouse Mouse"
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
When implementing commit 7f81c8db54 ("HID: multitouch: simplify
the settings of the various features"), I wrongly removed a test
that made sure we never try to set the second InputMode feature
to something else than 0.
This broke badly some recent Elan panels that now forget to send the
click button in some area of the touchpad.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=200899
Fixes: 7f81c8db54 ("HID: multitouch: simplify the settings of the various features")
Cc: [email protected] # v4.18+
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>