- 23 Mar, 2022 8 commits
-
-
Jiri Kosina authored
- integration of first part of DIGImend [1] patches in order to vastly improve Linux support of tablets (Nikolai Kondrashov, José Expósito) [1] https://github.com/DIGImend/digimend-kernel-drivers
-
Jiri Kosina authored
- driver for SiGma Micro keyboards (Desmond Lim)
-
Jiri Kosina authored
- driver for Razer Blackwidow keyboards (Jelle van der Waa)
-
Jiri Kosina authored
- fixes for handling unnumbered reports fully correctly (Angela Czubak Dmitry Torokhov) - untangling of intermingled code for sending and handling output reports in __i2c_hid_command() (Dmitry Torokhov)
-
Jiri Kosina authored
-
Jiri Kosina authored
- rework of generic input handling which ultimately makes the processing of tablet events more generic and reliable (Benjamin Tissoires)
-
Jiri Kosina authored
- Apple magic keyboard support improvements for newer models (José Expósito) - Apple T2 Macs support improvements (Aun-Ali Zaidi, Paul Pawlowski)
-
Jiri Kosina authored
- dead code elimination (Christophe JAILLET)
-
- 14 Mar, 2022 1 commit
-
-
Gwendal Grignou authored
Allocating memory with kmalloc and GPF_DMA32 is not allowed, the allocator will ignore the attribute. Instead, use dma_alloc_coherent() API as we allocate a small amount of memory to transfer firmware fragment to the ISH. On Arcada chromebook, after the patch the warning: "Unexpected gfp: 0x4 (GFP_DMA32). Fixing up to gfp: 0xcc0 (GFP_KERNEL). Fix your code!" is gone. The ISH firmware is loaded properly and we can interact with the ISH: > ectool --name cros_ish version ... Build info: arcada_ish_v2.0.3661+3c1a1c1ae0 2022-02-08 05:37:47 @localhost Tool version: v2.0.12300-900b03ec7f 2022-02-08 10:01:48 @localhost Fixes: commit 91b22810 ("HID: intel-ish-hid: ISH firmware loader client driver") Signed-off-by:
Gwendal Grignou <gwendal@chromium.org> Acked-by:
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: stable@vger.kernel.org Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- 01 Mar, 2022 23 commits
-
-
Jia-Ju Bai authored
The function alloc_workqueue() in nintendo_hid_probe() can fail, but there is no check of its return value. To fix this bug, its return value should be checked with new error handling code. Fixes: c4eae84f ("HID: nintendo: add rumble support") Reported-by:
TOTE Robot <oslab@tsinghua.edu.cn> Signed-off-by:
Jia-Ju Bai <baijiaju1990@gmail.com> Reviewed-by:
Silvan Jegen <s.jegen@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Benjamin Tissoires authored
The HID core stack used to be very relaxed considering the BTN_TOOL_* usage. With the recent commits, we should now enforce to have only one tool at a time, meaning that we can now express that requirement in the docs. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by:
Ping Cheng <ping.cheng@wacom.com> Acked-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Benjamin Tissoires authored
Multitouch devices in hybrid mode are reporting multiple times the same collection. We should accommodate for this in our handling of priorities by defining the slots they belong to. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by:
Ping Cheng <ping.cheng@wacom.com> Acked-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Benjamin Tissoires authored
HID_QUIRK_INVERT is kind of complex to deal with and was bogus. Furthermore, it didn't make sense to use a global per struct hid_device quirk for something dynamic as the current state. Store the current tool information in the report itself, and re-order the processing of the fields to enforce having all the tablet "state" fields before getting to In Range and other input fields. This way, we now have all the information whether a tool is present or not while processing In Range. This new behavior enforces that only one tool gets forwarded to userspace at the same time, and that if either eraser or invert is set, we enforce BTN_TOOL_RUBBER. Note that the release of the previous tool now happens in its own EV_SYN report so userspace doesn't get confused by having 2 tools. These changes are tested in the following hid-tools regression tests: https://gitlab.freedesktop.org/libevdev/hid-tools/-/merge_requests/127Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by:
Ping Cheng <ping.cheng@wacom.com> Acked-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Benjamin Tissoires authored
When a device exposes both Invert and InRange, Invert must be processed before InRange. If we keep the order of the device and we process them out of order, InRange will first set BTN_TOOL_PEN, and then Invert will set BTN_TOOL_RUBBER. Userspace knows how to deal with that situation, but fixing it in the kernel is now easier. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by:
Ping Cheng <ping.cheng@wacom.com> Acked-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Benjamin Tissoires authored
Now that we have a list of fields/usages by priority order, walk through that list to process the inputs instead of using the order provided by the manufacturer. Note that this changes the way we update the values in the struct hid_field: Previously, once a field was processed, we updated the new values. Now we need to wait for the entire report to be processed to update the values. I don't think it will be an issue: because we were relying on the device ordering, there were no guarantees to have a field stored before an other. Which is why we introduced .report() in drivers to have those values updated. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by:
Ping Cheng <ping.cheng@wacom.com> Acked-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Benjamin Tissoires authored
This will be used in a later commit: we build a list of input fields (and usage_index) that is ordered based on a usage priority. Changing the usage priority allows to re-order the processed list, meaning that we can enforce some usages to be process before others. For instance, before processing InRange in the HID tablets, we need to know if we are using the eraser (side or button). Enforcing a higher (lower number) priority for Invert allows to force the input stack to process that field before. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by:
Ping Cheng <ping.cheng@wacom.com> Acked-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Benjamin Tissoires authored
It actually makes sense to clamp the value to its boundaries before doing further processing. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by:
Ping Cheng <ping.cheng@wacom.com> Acked-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Benjamin Tissoires authored
Instead of using multiple `if (a == b)`, use the switch statement which has been done exactly for that. There should be no functional change (I don't expect moving down HID_QUIRK_{X|Y}_INVERT having any impact. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by:
Ping Cheng <ping.cheng@wacom.com> Acked-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Benjamin Tissoires authored
Some devices (Elan, Synaptics...) are sometimes not setting a physical in their finger collections. hid-input will consider them to be pen devices, leading to some wrong behavior in user space. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by:
Ping Cheng <ping.cheng@wacom.com> Acked-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Benjamin Tissoires authored
This is a preparatory patch for being able to process the usages out of order. We split the retrieval of the data in a separate function and also split out the processing of the usages depending if the field is an array or a variable. No functional changes from this patch. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by:
Ping Cheng <ping.cheng@wacom.com> Acked-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Benjamin Tissoires authored
I had to go twice through the history to get a grasp at this code. De-duplicate the various tests in one common helper to make it more explicit. Note that the `HID_UP_KEYBOARD + 1` condition is tested through https://gitlab.freedesktop.org/libevdev/hid-tools/-/merge_requests/121Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by:
Ping Cheng <ping.cheng@wacom.com> Acked-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Benjamin Tissoires authored
This is a preparation patch for rethinking the generic processing of HID reports. We can actually pre-allocate all of our memory instead of dynamically allocating/freeing it whenever we parse a report. Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by:
Ping Cheng <ping.cheng@wacom.com> Acked-by:
Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Dmitry Torokhov authored
The driver creates the top row map sysfs attribute in input_configured() method; unfortunately we do not have a callback that is executed when HID interface is unbound, thus we are leaking these sysfs attributes, for example when device is disconnected. To fix it let's switch to managed version of adding sysfs attributes which will ensure that they are destroyed when the driver is unbound. Fixes: 14c9c014 ("HID: add vivaldi HID driver") Signed-off-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com> Tested-by:
Stephen Boyd <swboyd@chromium.org> Reviewed-by:
Stephen Boyd <swboyd@chromium.org> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Nikolai Kondrashov authored
Add support for multiple frame input devices and their parameters to the UC-Logic driver. This prepares for creating a separate input device for Huion HS610 virtual touch ring reports. Signed-off-by:
Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by:
José Expósito <jose.exposito89@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Nikolai Kondrashov authored
Signed-off-by:
Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by:
José Expósito <jose.exposito89@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Nikolai Kondrashov authored
Put general hardware version before everything else in uclogic_rdesc_ namespace. Signed-off-by:
Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by:
José Expósito <jose.exposito89@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Nikolai Kondrashov authored
Use the term "frame" instead of "buttonpad" for consistency, in UC-Logic driver. Signed-off-by:
Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by:
José Expósito <jose.exposito89@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Nikolai Kondrashov authored
Allow to set the report ID in UCLOGIC_RDESC_FRAME_BYTES instead of using a hardcoded value. Signed-off-by:
Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by:
José Expósito <jose.exposito89@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Nikolai Kondrashov authored
Simplify the UCLOGIC_RDESC_BUTTONPAD_BYTES macro by passing as param the size of the report to pad to in bytes. Signed-off-by:
Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by:
José Expósito <jose.exposito89@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Nikolai Kondrashov authored
Switch from matching UC-Logic subreport with a mask to a full value to support detecting Huion HS610 touch dial reports. Those would match the button mask otherwise. Signed-off-by:
Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by:
José Expósito <jose.exposito89@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Nikolai Kondrashov authored
Replace a single pen_frame_flag in struct uclogic_params with subreport_list in struct uclogic_params_pen to prepare for handling more subreports in Huion HS610. Signed-off-by:
Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by:
José Expósito <jose.exposito89@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Nikolai Kondrashov authored
Remove support for pen usage masking from hid-uclogic. Disable whole interfaces instead. Most of those interfaces are useless, and if there is one which has an unused pen usage, but also has useful reports, its report descriptor should be rewritten instead. This simplifies the code and the data structures. Signed-off-by:
Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by:
José Expósito <jose.exposito89@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- 21 Feb, 2022 1 commit
-
-
Pavel Skripkin authored
Syzbot reported an slab-out-of-bounds Read in thrustmaster_probe() bug. The root case is in missing validation check of actual number of endpoints. Code should not blindly access usb_host_interface::endpoint array, since it may contain less endpoints than code expects. Fix it by adding missing validaion check and print an error if number of endpoints do not match expected number Fixes: c49c3363 ("HID: support for initialization of some Thrustmaster wheels") Reported-and-tested-by: syzbot+35eebd505e97d315d01c@syzkaller.appspotmail.com Signed-off-by:
Pavel Skripkin <paskripkin@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- 17 Feb, 2022 2 commits
-
-
Jiri Kosina authored
Commit 817b8b9c ("HID: elo: fix memory leak in elo_probe") introduced memory leak on error path, but more importantly the whole USB reference counting is not needed at all in the first place, as the driver itself doesn't change the reference counting in any way, and the associated usb_device is guaranteed to be kept around by USB core as long as the driver binding exists. Reported-by:
Alan Stern <stern@rowland.harvard.edu> Reported-by:
Dan Carpenter <dan.carpenter@oracle.com> Fixes: fbf42729 ("HID: elo: update the reference count of the usb device structure") Fixes: 817b8b9c ("HID: elo: fix memory leak in elo_probe") Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Jiri Kosina authored
Since hid-apple driver now makes use of LEDS functionality, reflect this properly in Kconfig. Reported-by:
kernel test robot <lkp@intel.com> Fixes: 9018eacb ("HID: apple: Add support for keyboard backlight on certain T2 Macs.") Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- 16 Feb, 2022 5 commits
-
-
Jelle van der Waa authored
Add a driver to enable the macro keys (M1 - M5) by default, these are mapped to XF86Tools and XF86Launch5 - XF86Launch8. The driver remaps them by default to macro keys with an option to retain the old mapping which users most likely already use as there are many scripts to enable the macro keys available on Github and other websites. Signed-off-by:
Jelle van der Waa <jvanderwaa@redhat.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Michael Hübner authored
Different add ons to the wheel base report different models. Having no wheel mounted to the base and using the open wheel attachment is added here. Signed-off-by:
Michael Hübner <michaelh.95@t-online.de> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Aditya Garg authored
This patch adds the Fn mapping for keyboards on certain T2 Macs. [jkosina@suse.cz: rebase on top of apple_setup_input() refactoring] Signed-off-by:
Aditya Garg <gargaditya08@live.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Aun-Ali Zaidi authored
This patch adds the necessary IDs and configuration for Macs with the T2 Security chip. Signed-off-by:
Aun-Ali Zaidi <admin@kodeit.net> Signed-off-by:
Aditya Garg <gargaditya08@live.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Paul Pawlowski authored
This patch introduces the requisite plumbing for supporting keyboard backlight on T2-attached, USB exposed models. The quirk mechanism was used to reuse the existing hid-apple driver. Signed-off-by:
Paul Pawlowski <paul@mrarm.io> Signed-off-by:
Aun-Ali Zaidi <admin@kodeit.net> Signed-off-by:
Aditya Garg <gargaditya08@live.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-