summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-6.4/wacom' into for-linusJiri Kosina2023-04-263-41/+54
|\ | | | | | | | | - improved handling of battery quirk (Jason Gerecke) - lazy initialization of battery interfaces (Jason Gerecke)
| * HID: wacom: generic: Set battery quirk only when we see battery dataJason Gerecke2023-04-141-22/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices will include battery status usages in the HID descriptor but we won't see that battery data for one reason or another. For example, AES sensors won't send battery data unless an AES pen is in proximity. If a user does not have an AES pen but instead only interacts with the AES touchscreen with their fingers then there is no need for us to create a battery object. Similarly, if a family of peripherals shares the same HID descriptor between wired-only and wireless-capable SKUs, users of the former may never see a battery event and will not want a power_supply object created. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217062 Link: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2354 Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Tested-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: wacom: Lazy-init batteriesJason Gerecke2023-04-142-17/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than creating batteries as part of the initial device probe, let's make the process lazy. This gives us the opportunity to prevent batteries from being created in situations where they are unnecessary. There are two cases in particular where batteries are being unnecessarily created at initialization. These are AES sensors (for which we don't know any battery status information until a battery-powered pen actually comes into prox) peripheral tablets which share HID descriptors between the wired-only and wireless-capable SKUs of a family of devices. This patch will delay battery initialization of the former until a pen actually comes into prox. It will delay battery initialization of the latter until either a pen comes into prox or a "heartbeat" packet is processed. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217062 Link: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2354 Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Tested-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: wacom: Set a default resolution for older tabletsPing Cheng2023-04-131-2/+10
| | | | | | | | | | | | | | | | | | Some older tablets may not report physical maximum for X/Y coordinates. Set a default to prevent undefined resolution. Signed-off-by: Ping Cheng <ping.cheng@wacom.com> Link: https://lore.kernel.org/r/20230409164229.29777-1-ping.cheng@wacom.com Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * HID: wacom: insert timestamp to packed Bluetooth (BT) eventsPing Cheng2023-03-102-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To fully utilize the BT polling/refresh rate, a few input events are sent together to reduce event delay. This causes issue to the timestamp generated by input_sync since all the events in the same packet would pretty much have the same timestamp. This patch inserts time interval to the events by averaging the total time used for sending the packet. This decision was mainly based on observing the actual time interval between each BT polling. The interval doesn't seem to be constant, due to the network and system environment. So, using solutions other than averaging doesn't end up with valid timestamps. Signed-off-by: Ping Cheng <ping.cheng@wacom.com> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'for-6.4/tests' into for-linusJiri Kosina2023-04-2631-10/+8614
|\ \ | | | | | | | | | | | | - import of bunch of HID selftests from out-of-tree hid-tools project (Benjamin Tissoires)
| * | selftests: hid: import hid-tools usb-crash testsBenjamin Tissoires2023-04-123-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. This one gets skipped when run by vmtest.sh as we currently need to test against actual kernel modules (.ko), not built-in to fetch the list of supported devices. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | selftests: hid: import hid-tools hid-sony and hid-playstation testsBenjamin Tissoires2023-04-124-0/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. The code is taken from [1] to fix a change in v6.3. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Link: https://gitlab.freedesktop.org/libevdev/hid-tools/-/merge_requests/143 [1] Cc: Roderick Colenbrander <roderick.colenbrander@sony.com> Cc: Jose Torreguitar <jtguitar@google.com> Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | selftests: hid: import hid-tools hid-ite testsBenjamin Tissoires2023-04-124-0/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Peter Hutterer <peter.hutterer@who-t.net> Cc: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | selftests: hid: import hid-tools hid-apple testsBenjamin Tissoires2023-04-124-0/+449
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | selftests: hid: import hid-tools wacom testsBenjamin Tissoires2023-04-125-0/+2215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | selftests: hid: import hid-tools hid-multitouch and hid-tablets testsBenjamin Tissoires2023-04-127-0/+2980
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. There are a lot of multitouch tests, and the default timeout of 45 seconds is not big enough. Bump it to 200 seconds. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Peter Hutterer <peter.hutterer@who-t.net> Cc: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: Roderick Colenbrander <roderick.colenbrander@sony.com> Cc: наб <nabijaczleweli@nabijaczleweli.xyz> Cc: Blaž Hrastnik <blaz@mxxn.io> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | selftests: hid: import hid-tools hid-mouse testsBenjamin Tissoires2023-04-123-0/+985
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Peter Hutterer <peter.hutterer@who-t.net> Cc: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | selftests: hid: import hid-tools hid-keyboards testsBenjamin Tissoires2023-04-123-0/+493
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Cc: Peter Hutterer <peter.hutterer@who-t.net> Cc: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | selftests: hid: import hid-tools hid-gamepad testsBenjamin Tissoires2023-04-123-0/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Candle Sun <candle.sun@unisoc.com> Cc: Jose Torreguitar <jtguitar@google.com> Cc: Peter Hutterer <peter.hutterer@who-t.net> Cc: Roderick Colenbrander <roderick.colenbrander@sony.com> Cc: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | selftests: hid: import hid-tools hid-core testsBenjamin Tissoires2023-04-128-1/+620
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. I haven't imported all of hid-tools, the python module, but only the tests related to the kernel. We can rely on pip to fetch the latest hid-tools release, and then run the tests directly from the tree. This should now be easier to request tests when something is not behaving properly in the HID subsystem. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | selftests: hid: make vmtest rely on makeBenjamin Tissoires2023-04-121-10/+15
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Having a default binary is simple enough, but this also means that we need to keep the targets in sync as we are adding them in the Makefile. So instead of doing that manual work, make vmtest.sh generic enough to actually be capable of running 'make -C tools/testing/selftests/hid'. The new image we use has make installed, which the base fedora image doesn't. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
* | Merge branch 'for-6.4/nintendo' into for-linusJiri Kosina2023-04-261-9/+86
|\ \ | | | | | | | | | | | | | | | - drastically reducing Bluetooth disconnects on hid-nintendo driven devices (Daniel J. Ogorchock) - proper rumble queue overrun handling (Daniel J. Ogorchock)
| * | HID: nintendo: fix rumble rate limiterDaniel J. Ogorchock2023-03-101-6/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's been discovered that BT controller disconnect events correlate to erratic input report timestamp deltas. In experimentation, it's been found that ensuring that multiple timestamp deltas are consistent prior to transmitting a rumble packet drastically reduces the occurence rate of BT disconnects. Alter the joycon_enforce_subcmd_rate() function to use this new approach. Signed-off-by: Daniel J. Ogorchock <djogorchock@gmail.com> Reviewed-by: Silvan Jegen <s.jegen@gmail.com Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | HID: nintendo: prevent rumble queue overrunsDaniel J. Ogorchock2023-03-101-3/+17
| |/ | | | | | | | | | | | | | | | | | | | | Make sure that we never throw out the most recent rumble setting, opting to overwrite the prior queue head instead. This prevents instances where we could get rumble stuck on if there were an overrun at the wrong time. Signed-off-by: Daniel J. Ogorchock <djogorchock@gmail.com> Reviewed-by: Silvan Jegen <s.jegen@gmail.com Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'for-6.4/mcp2221' into for-linusJiri Kosina2023-04-261-3/+3
|\ \ | | | | | | | | | - generic code improvements for mcp2221 driver (Louis Morhet)
| * | HID: mcp2221: fix get and get_direction for gpioLouis Morhet2023-04-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mcp2221_raw_event retrieves the value and direction of gpio on the same command, by setting the value on mcp->status and the direction on mcp->gpio_dir; and the offset at which they are read is based on mcp->gp_idx, set by the gpiochip callbacks. However, the individual gpiochip calls set the index to look for directly on the field they want to track. This create a "double offset" in the final read in the response report. Align the behaviour of mcp2221_raw_event and mcp_gpio_get/mcp_gpio_get_direction by putting gp_idx on those calls to the base offset of the gpio status struct. Signed-off-by: Louis Morhet <lmorhet@kalrayinc.com> Link: https://lore.kernel.org/r/dd0b23800a79d2a464e1e9ed429b018b69fd5df2.1680602387.git.lmorhet@kalrayinc.com Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | HID: mcp2221: fix report layout for gpio getLouis Morhet2023-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation of the component (section 3.1.12 GET GPIO VALUES) describes the hid report structure with two fields per gpio: its value, followed by its direction. However, the driver describes it with a wrong order: direction followed by value. Fix the structure representing the report answered by the chip to the GET GPIO VALUES command. Fixes commit 567b8e9fed8a ("HID: mcp2221: Fix GPIO output handling") Signed-off-by: Louis Morhet <lmorhet@kalrayinc.com> Link: https://lore.kernel.org/r/945967fbab56d53f9630ad3844b64734f8c3107e.1680602387.git.lmorhet@kalrayinc.com Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
* | | Merge branch 'for-6.4/logitech-hidpp' into for-linusJiri Kosina2023-04-266-7/+373
|\ \ \ | | | | | | | | | | | | | | | | - support for ADC measurement (Bastien Nocera) - support for Logitech G935 (Bastien Nocera)
| * | | USB: core: Fix docs warning caused by wireless_status featureBastien Nocera2023-04-062-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix wrongly named 'dev' parameter in doc block, should have been iface: drivers/usb/core/message.c:1939: warning: Function parameter or member 'iface' not described in 'usb_set_wireless_status' drivers/usb/core/message.c:1939: warning: Excess function parameter 'dev' description in 'usb_set_wireless_status' And fix missing struct member doc in kernel API, and reorder to match struct: include/linux/usb.h:270: warning: Function parameter or member 'wireless_status_work' not described in 'usb_interface' Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Link: https://lore.kernel.org/linux-next/20230405114807.5a57bf46@canb.auug.org.au/T/#t Fixes: 0a4db185f078 ("USB: core: Add API to change the wireless_status") Signed-off-by: Bastien Nocera <hadess@hadess.net> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20230405092754.36579-1-hadess@hadess.net [bentiss: fix checkpatch warning] Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | HID: logitech-hidpp: Set wireless_status for G935 receiverBastien Nocera2023-04-031-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the USB interface "wireless_status" for the G935 receiver when receiving battery notifications. This will allow sound daemons such as Pipewire or PulseAudio to know whether or not the headset is turned on and connected. Signed-off-by: Bastien Nocera <hadess@hadess.net> Link: https://lore.kernel.org/r/20230302105555.51417-6-hadess@hadess.net Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | USB: core: Add API to change the wireless_statusBastien Nocera2023-04-032-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the API that allows device specific drivers to tell user-space about whether the wireless device is connected to its receiver dongle. See "USB: core: Add wireless_status sysfs attribute" for a detailed explanation of what this attribute should be used for. Signed-off-by: Bastien Nocera <hadess@hadess.net> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20230302105555.51417-5-hadess@hadess.net Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | USB: core: Add wireless_status sysfs attributeBastien Nocera2023-04-034-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a wireless_status sysfs attribute to USB devices to keep track of whether a USB device that's comprised of a receiver dongle and an emitter device over a, most of the time proprietary, wireless link has its emitter connected or disconnected. This will be used by user-space OS components to determine whether the battery-powered part of the device is wirelessly connected or not, allowing, for example: - upower to hide the battery for devices where the device is turned off but the receiver plugged in, rather than showing 0%, or other values that could be confusing to users - Pipewire to hide a headset from the list of possible inputs or outputs or route audio appropriately if the headset is suddenly turned off, or turned on - libinput to determine whether a keyboard or mouse is present when its receiver is plugged in. This is done at the USB interface level as: - the interface on which the wireless status is detected is sometimes not the same as where it could be consumed (eg. the audio interface on a headset dongle will still appear even if the headset is turned off), and we cannot have synchronisation of status across subsystems. - this behaviour is not specific to HID devices, even if the protocols used to determine whether or not the remote device is connected can be HID. This is not an attribute that is meant to replace protocol specific APIs, such as the ones available for WWAN, WLAN/Wi-Fi, or Bluetooth or any other sort of networking, but solely for wireless devices with an ad-hoc “lose it and your device is e-waste” receiver dongle. The USB interface will only be exporting the wireless_status sysfs attribute if it gets set through the API exported in the next commit. Signed-off-by: Bastien Nocera <hadess@hadess.net> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20230302105555.51417-4-hadess@hadess.net Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | HID: logitech-hidpp: Add Logitech G935 headsetBastien Nocera2023-04-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the Logitech G935 headset that uses the HID++ protocol to the list of supported devices. Signed-off-by: Bastien Nocera <hadess@hadess.net> Link: https://lore.kernel.org/r/20230302105555.51417-3-hadess@hadess.net Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | HID: logitech-hidpp: Add support for ADC measurement featureBastien Nocera2023-04-031-2/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is used in a number of Logitech headsets to report the voltage of the battery. Tested on a Logitech G935. Signed-off-by: Bastien Nocera <hadess@hadess.net> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216483 Link: https://lore.kernel.org/r/20230302105555.51417-2-hadess@hadess.net Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | HID: logitech-hidpp: Simplify array length checkBastien Nocera2023-04-031-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the compiler to force a 100-length array, rather than check the length after the fact. Signed-off-by: Bastien Nocera <hadess@hadess.net> Link: https://lore.kernel.org/r/20230302105555.51417-1-hadess@hadess.net Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | HID: logitech-hidpp: Reconcile USB and Unifying serialsBastien Nocera2023-04-031-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that USB HID++ devices can gather a serial number that matches the one that would be gathered when connected through a Unifying receiver, remove the last difference by dropping the product ID as devices usually have different product IDs when connected through USB or Unifying. For example, on the serials on a G903 wired/wireless mouse: - Unifying before patch: 4067-e8-ce-cd-45 - USB before patch: c086-e8-ce-cd-45 - Unifying and USB after patch: e8-ce-cd-45 Signed-off-by: Bastien Nocera <hadess@hadess.net> Link: https://lore.kernel.org/r/20230302130117.3975-2-hadess@hadess.net Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | HID: logitech-hidpp: Don't use the USB serial for USB devicesBastien Nocera2023-04-031-0/+51
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For devices that support the 0x0003 feature (Device Information) version 4, set the serial based on the output of that feature, rather than relying on the usbhid code setting the USB serial. This should allow the serial when connected through USB to (nearly) match the one when connected through a unifying receiver. For example, on the serials on a G903 wired/wireless mouse: - Unifying: 4067-e8-ce-cd-45 - USB before patch: 017C385C3837 - USB after patch: c086-e8-ce-cd-45 Signed-off-by: Bastien Nocera <hadess@hadess.net> Link: https://lore.kernel.org/r/20230302130117.3975-1-hadess@hadess.net Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
* | | Merge branch 'for-6.4/led-includes' into for-linusJiri Kosina2023-04-263-0/+3
|\ \ \ | | | | | | | | | | | | - explicit include fixes (Thomas Weißschuh)
| * | | HID: asus: explicitly include linux/leds.hThomas Weißschuh2023-04-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of relying on an accidental, transitive inclusion of linux/leds.h use it directly. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20230215-power_supply-leds-hid-v1-3-35b6f1dcee8a@weissschuh.net Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | HID: lg-g15: explicitly include linux/leds.hThomas Weißschuh2023-04-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of relying on an accidental, transitive inclusion of linux/leds.h use it directly. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20230215-power_supply-leds-hid-v1-2-35b6f1dcee8a@weissschuh.net Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | HID: steelseries: explicitly include linux/leds.hThomas Weißschuh2023-04-131-0/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Instead of relying on an accidental, transitive inclusion of linux/leds.h use it directly. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20230215-power_supply-leds-hid-v1-1-35b6f1dcee8a@weissschuh.net Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
* | | Merge branch 'for-6.4/kye' into for-linusJiri Kosina2023-04-263-526/+421
|\ \ \ | | | | | | | | | | | | - generic support for all Kye tablets (David Yang)
| * | | HID: kye: Fix rdesc for kye tabletsDavid Yang2023-04-131-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I forget to add them in previous commit 2dd438cdc2e9 ("HID: kye: Add support for all kye tablets"). Signed-off-by: David Yang <mmyangfl@gmail.com> Link: https://lore.kernel.org/r/20230411173308.422756-1-mmyangfl@gmail.com Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | HID: kye: Add support for all kye tabletsDavid Yang2023-03-243-0/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Physical data for all kye tablets are collected from Windows driver, to generate correct HID reports. Signed-off-by: David Yang <mmyangfl@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: kye: Sort kye devicesDavid Yang2023-03-103-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort kye devices by their Produce IDs. Signed-off-by: David Yang <mmyangfl@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: kye: Generate tablet fixup descriptors on the flyDavid Yang2023-03-101-490/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove duplicated descriptor structures and make it easier to discover bugs. Signed-off-by: David Yang <mmyangfl@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: kye: Rewrite tablet descriptor fixup routineDavid Yang2023-03-101-12/+102
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Genius digitizer tablets send incorrect (vendor-defined) report descriptors by default. Descriptors for several models were added to override original ones. Since they share the same structure and are handled by the same Windows driver routine, extract the descriptor template and dynamic parameters for easier new device adoption. Signed-off-by: David Yang <mmyangfl@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | Merge branch 'for-6.4/i2c-hid' into for-linusJiri Kosina2023-04-262-11/+33
|\ \ \ | | | | | | | | | | | | - reset GPIO support (Hans de Goede)
| * | | HID: i2c-hid-of: Add reset GPIO support to i2c-hid-ofHans de Goede2023-04-131-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add reset GPIO support to the generic i2c-hid-of driver This is necessary to make the Wacom digitizer on the Lenovo Yoga Book 1 (yb1-x90f/l) work and this will also allow consolidating the 2 specialized i2c-hid-of-elan.c and i2c-hid-of-goodix.c drivers into the generic i2c-hid-of driver. For now the new "post-reset-deassert-delay-ms" property is only used on x86/ACPI (non devicetree) devs. IOW it is not used in actual devicetree files and the same goes for the reset GPIO. The devicetree-bindings maintainers have requested properties like these to not be added to the devicetree-bindings, so the new property + GPIO are deliberately not added to the existing devicetree-bindings. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Link: https://lore.kernel.org/r/20230413093625.71146-4-hdegoede@redhat.com Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | HID: i2c-hid-of: Allow using i2c-hid-of on non OF platformsHans de Goede2023-04-132-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some x86 tablets / 2-in-1s which ship with Android as their factory OS image. These have pretty broken ACPI tables, relying on everything being hardcoded in the factory kernel image. platform/x86/x86-android-tablets.c manually instantiates i2c-clients for i2c devices on these tablets to make them work with the mainline kernel. The Lenovo Yoga Book 1 (yb1-x90f/l) is such a 2-in-1. It has 2 I2C-HID devices its main touchscreen and a Wacom digitizer. Its main touchscreen can alternatively also be used in HiDeep's native protocol mode but for the Wacom digitizer we really need I2C-HID. This patch allows using i2c-hid-of on non OF platforms so that it can bind to a non ACPI instantiated i2c_client on x86 for the Wacom digitizer. Note the driver already has an "i2c-over-hid" i2c_device_id (rather then an of_device_id). Besides enabling building on non-OF platforms this also replaces the only of_property_read_u32() call with device_property_read_u32() note that other properties where already read using device_property_read_...(). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Link: https://lore.kernel.org/r/20230413093625.71146-3-hdegoede@redhat.com Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | HID: i2c-hid-of: Consistenly use dev local variable in probe()Hans de Goede2023-04-131-8/+5
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | i2c_hid_of_probe() has a dev local variable pointing to &i2c_client->dev, consistently use this everywhere in i2c_hid_of_probe(). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Link: https://lore.kernel.org/r/20230413093625.71146-2-hdegoede@redhat.com Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
* | | Merge branch 'for-6.4/core' into for-linusJiri Kosina2023-04-263-1/+15
|\ \ \ | | | | | | | | | | | | | | | | - improve handling of generic "Digitizer" usage (Jason Gerecke) - support for KEY_CAMERA_FOCUS (Feng Qi)
| * | | HID: Ignore battery for ELAN touchscreen on ROG Flow X13 GV301RAweiliang15032023-04-132-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore the reported battery level of the built-in touchscreen to suppress battery warnings when a stylus is used. The device ID was added and the battery ignore quirk was enabled. Signed-off-by: weiliang1503 <weiliang1503@gmail.com> Link: https://lore.kernel.org/r/20230330115638.16146-1-weiliang1503@gmail.com Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
| * | | HID: Recognize "Digitizer" as a valid input applicationJason Gerecke2023-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Digitizer" is a generic usage that may be used by various devices but which is particularly used by non-display pen tablets. This patch adds the usage to the list of values matched by the IS_INPUT_APPLICATION() macro that determines if an input device should be allocated or not. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Ping Cheng <ping.cheng@wacom.com> Link: https://lore.kernel.org/r/20221019151832.44522-1-jason.gerecke@wacom.com Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>