aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-09-13Merge branch 'for-6.12/amd_sfh' into for-linusBenjamin Tissoires1-2/+2
- Convert comma to semicolon (Chen Ni)
2024-09-13Merge branch 'for-6.12/intel-ish' into for-linusBenjamin Tissoires4-9/+159
- Add support for vendor customized firmware loading (Zhang Lixu)
2024-09-13Merge branch 'i2c-hid' into for-linusBenjamin Tissoires1-15/+27
- ensure various commands do not interfere with each other (Dmitry Torokhov)
2024-09-13Merge branch 'for-6.12/hidraw' into for-linusBenjamin Tissoires8-440/+714
- introduction of HIDIOCREVOKE ioctl to revoke a hidraw fd opened by a regular (non-root) application (Peter Hutterer)
2024-09-13Merge branch 'for-6.12/constify-rdesc' into for-linusBenjamin Tissoires58-171/+167
- Constification of report descriptors so drivers can use read-only memory when declaring report descriptors fixups (Thomas Weißschuh)
2024-09-13Merge branch 'for-6.12/core' into for-linusBenjamin Tissoires3-25/+29
- add helper for finding a field with a certain usage (Kerem Karabay)
2024-09-13Merge branch 'for-6.11/bpf' into for-linusBenjamin Tissoires0-0/+0
One leftover which should have gone earlier: - fix HID-BPF samples (Benjamin Tissoires)
2024-09-13Merge branch 'for-6.11/upstream-fixes' into for-linusBenjamin Tissoires6-7/+29
Small fixes for drivers/hid: - Add support for 3 multitouch panels (He Lugang, tammy tseng and Vishnu Sankar) - Unused declarations cleanups (Yue Haibing) - Fix comma vs semicolon (Chen Ni)
2024-09-12HID: i2c-hid: ensure various commands do not interfere with each otherDmitry Torokhov1-15/+27
i2c-hid uses 2 shared buffers: command and "raw" input buffer for sending requests to peripherals and read data from peripherals when executing variety of commands. Such commands include reading of HID registers, requesting particular power mode, getting and setting reports and so on. Because all such requests use the same 2 buffers they should not execute simultaneously. Fix this by introducing "cmd_lock" mutex and acquire it whenever we needs to access ihid->cmdbuf or idid->rawbuf. Signed-off-by: Dmitry Torokhov <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2024-09-11HID: multitouch: Add support for Thinkpad X12 Gen 2 Kbd PortfolioVishnu Sankar2-0/+7
This applies similar quirks used by previous generation device, so that Trackpoint and buttons on the touchpad works. New USB KBD PID 0x61AE for Thinkpad X12 Tab is added. Signed-off-by: Vishnu Sankar <[email protected]> Reviewed-by: Mark Pearson <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2024-09-06HID: lg: constify fixed up report descriptorThomas Weißschuh1-14/+14
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-05HID: uclogic: constify fixed up report descriptorThomas Weißschuh5-28/+28
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-05HID: waltop: constify fixed up report descriptorThomas Weißschuh1-14/+14
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-05HID: sony: constify fixed up report descriptorThomas Weißschuh1-6/+6
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-05HID: pxrc: constify fixed up report descriptorThomas Weißschuh1-1/+1
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-05HID: steelseries: constify fixed up report descriptorThomas Weißschuh1-2/+2
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-05HID: viewsonic: constify fixed up report descriptorThomas Weißschuh1-2/+2
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-05HID: vrc2: constify fixed up report descriptorThomas Weißschuh1-1/+1
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-05HID: xiaomi: constify fixed up report descriptorThomas Weißschuh1-2/+2
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-05HID: maltron: constify fixed up report descriptorThomas Weißschuh1-2/+2
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-05HID: keytouch: constify fixed up report descriptorThomas Weißschuh1-4/+2
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-05HID: holtek-kbd: constify fixed up report descriptorThomas Weißschuh1-2/+2
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-05HID: dr: constify fixed up report descriptorThomas Weißschuh1-2/+2
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-05HID: bigbenff: constify fixed up report descriptorThomas Weißschuh1-2/+2
Now that the HID core can handle const report descriptors, constify them where possible. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-09-03HID: hid-sensor-custom: Convert comma to semicolonChen Ni1-1/+1
Replace a comma between expression statements by a semicolon. Signed-off-by: Chen Ni <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2024-09-03HID: add patch for sis multitouch formattammy tseng1-0/+14
The patch is to add proper quirks for sis multitouch format Signed-off-by: tammy tseng <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2024-09-03HID: multitouch: Add support for lenovo Y9000P TouchpadHe Lugang2-2/+7
The 2024 Lenovo Y9000P which use GT7868Q chip also needs a fixup. The information of the chip is as follows: I2C HID v1.00 Mouse [GXTP5100:00 27C6:01E0] Signed-off-by: He Lugang <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2024-09-03HID: amd_sfh: Convert comma to semicolonChen Ni1-2/+2
Replace a comma between expression statements by a semicolon. Signed-off-by: Chen Ni <[email protected]> Acked-by: Basavaraj Natikar <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2024-08-29selftests/hid: Add HIDIOCREVOKE testsBenjamin Tissoires1-0/+147
Add 4 tests for the new revoke ioctl, for read/write/ioctl and poll. Reviewed-by: Peter Hutterer <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-08-29selftests/hid: Add initial hidraw tests skeletonBenjamin Tissoires3-1/+92
Largely inspired from hid_bpf.c for the fixture setup. Create a couple of tests for hidraw: - create a uhid device and check if the fixture is working properly - inject one uhid event and read it through hidraw These tests are not that useful for now, but will be once we start adding the ioctl and BPFs to revoke the hidraw node. Reviewed-by: Peter Hutterer <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-08-29selftests/hid: extract the utility part of hid_bpf.c into its own headerBenjamin Tissoires2-435/+438
When adding new tests programs, we need the same mechanics to create new virtual devices, and read from their matching hidraw node. Extract the common part into its own header so we can easily add new tests C-files. Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-08-29HID: hidraw: add HIDIOCREVOKE ioctlPeter Hutterer3-4/+37
There is a need for userspace applications to open HID devices directly. Use-cases include configuration of gaming mice or direct access to joystick devices. The latter is currently handled by the uaccess tag in systemd, other devices include more custom/local configurations or just sudo. A better approach is what we already have for evdev devices: give the application a file descriptor and revoke it when it may no longer access that device. This patch is the hidraw equivalent to the EVIOCREVOKE ioctl, see commit c7dc65737c9a ("Input: evdev - add EVIOCREVOKE ioctl") for full details. An MR for systemd-logind has been filed here: https://github.com/systemd/systemd/pull/33970 Signed-off-by: Peter Hutterer <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-08-27HID: winwing: constify read-only structsThomas Weißschuh1-3/+3
These structs are never modified, so mark them as const. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-08-27HID: cmedia: constify fixed up report descriptorThomas Weißschuh1-2/+2
The HID core now allows static report descriptors to be read-only, make use of it. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-08-27HID: change return type of report_fixup() to constThomas Weißschuh51-68/+68
By allowing the drivers to return a "const *" they can constify their static report arrays. This makes it clear to driver authors that the HID core will not modify those reports and they can be reused for multiple devices. Furthermore security is slightly improved as those reports are protected against accidental or malicious modifications. [bentiss: fixup hid-cougar.c and hid-multitouch.c for latest version of the master branch] Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-08-27HID: constify hid_device::dev_rdescThomas Weißschuh1-1/+1
Once a report descriptor has been created by the HID core it is not supposed to be modified anymore. Enforce this invariant through the type system. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-08-27HID: constify params and return value of fetch_item()Thomas Weißschuh2-7/+7
fetch_item() does not modify the descriptor it operates on. As a prerequisite for the constification of hid_driver::dev_rdesc, mark the parameters and return value of fetch_item() as const. Also adapt the variable types in the callers to match this constification. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-08-27HID: constify hid_device::rdescThomas Weißschuh1-1/+1
Once a report descriptor has been created by the HID core it is not supposed to be modified anymore. Enforce this invariant through the type system. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-08-27HID: constify parameter rdesc of hid_parse_report()Thomas Weißschuh2-2/+2
The parameter is never modified, so mark it as const. This is a prerequisite for constification changes in the HID core. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-08-27HID: bpf: constify parameter rdesc of call_hid_bpf_rdesc_fixup()Thomas Weißschuh2-5/+3
The parameter is never modified, so mark it as const. Also inline the return statement to avoid a type mismatch error. This is a prerequisite for constification changes in the HID core. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
2024-08-19hid: intel-ish-hid: Add support for vendor customized firmware loadingZhang Lixu2-3/+103
Enhance the firmware loader to support the loading of vendor-specific customized firmware for the Intel Integrated Sensor Hub (ISH). The loader now constructs firmware file names based on the DMI_SYS_VENDOR, DMI_PRODUCT_NAME, and DMI_PRODUCT_SKU information in Desktop Management Interface (DMI). The loader will attempt to load the firmware files following a specific naming convention in sequence. If successful, it will skip the remaining files. For more details, please refer to Documentation/hid/intel-ish-hid.rst. Signed-off-by: Zhang Lixu <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2024-08-19HID: intel-ish-hid: Use CPU generation string in driver_dataZhang Lixu3-9/+30
ISH allows vendors to customize ISH firmware. To differentiate different vendors and load the correct firmware, Intel defined a firmware file name format. As part of the filename, there is a "generation" string. To load correct format the driver must know the generation name to create file name. In the absence of any vendor specific firmware, default ISH firmware is loaded. Currently full ISH firmware file name is stored as part of driver data. This file name already includes the generation name. For example, for Lunar Lake, the name is ish_lnlm.bin, where "lnlm" is the generation. So instead of storing both generation name and ISH default firmware file name, just store generation name and create the default ISH firmware file name string during initialization. No functional changes are expected. Signed-off-by: Zhang Lixu <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2024-08-19Documentation: hid: intel-ish-hid: Add vendor custom firmware loadingZhang Lixu1-0/+29
Add ISH firmware loading guidelines for vendor custom firmware. Signed-off-by: Zhang Lixu <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2024-08-19HID: amd_sfh: Remove unused declarationsYue Haibing1-2/+0
Commit 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)") declared but never implemented them. Signed-off-by: Yue Haibing <[email protected]> Acked-by: Basavaraj Natikar <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2024-08-19HID: intel-ish-hid: Remove unused declarationsYue Haibing2-2/+0
Commit 3703f53b99e4 ("HID: intel_ish-hid: ISH Transport layer") declared ishtp_remove_all_clients()/ishtp_can_client_connect() but never implemented them. Signed-off-by: Yue Haibing <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2024-08-19Merge tag 'hid-for-linus-2024081901' of ↵Linus Torvalds6-3/+46
git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - memory corruption fixes for hid-cougar (Camila Alvarez) and hid-amd_sfh (Olivier Sobrie) - fix for regression in Wacom driver of twist gesture handling (Jason Gerecke) - two new device IDs for hid-multitouch (Dmitry Savin) and hid-asus (Luke D. Jones) * tag 'hid-for-linus-2024081901' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: wacom: Defer calculation of resolution until resolution_code is known HID: multitouch: Add support for GT7868Q HID: amd_sfh: free driver_data after destroying hid device hid-asus: add ROG Ally X prod ID to quirk list HID: cougar: fix slab-out-of-bounds Read in cougar_report_fixup
2024-08-19Merge tag 'printk-for-6.11-rc5' of ↵Linus Torvalds3-2/+9
git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk fix from Petr Mladek: - Do not block printk on non-panic CPUs when they are dumping backtraces * tag 'printk-for-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk/panic: Allow cpu backtraces to be written into ringbuffer during panic
2024-08-18Linux 6.11-rc4Linus Torvalds1-1/+1
2024-08-18Merge tag 'driver-core-6.11-rc4' of ↵Linus Torvalds2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two driver fixes for regressions from 6.11-rc1 due to the driver core change making a structure in a driver core callback const. These were missed by all testing EXCEPT for what Bart happened to be running, so I appreciate the fixes provided here for some odd/not-often-used driver subsystems that nothing else happened to catch. Both of these fixes have been in linux-next all week with no reported issues" * tag 'driver-core-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: mips: sgi-ip22: Fix the build ARM: riscpc: ecard: Fix the build
2024-08-18Merge tag 'char-misc-6.11-rc4' of ↵Linus Torvalds3-30/+37
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc fixes from Greg KH: "Here are some small char/misc fixes for 6.11-rc4 to resolve reported problems. Included in here are: - fastrpc revert of a change that broke userspace - xillybus fixes for reported issues Half of these have been in linux-next this week with no reported problems, I don't know if the last bit of xillybus driver changes made it in, but they are 'obviously correct' so will be safe :)" * tag 'char-misc-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: char: xillybus: Check USB endpoints when probing device char: xillybus: Refine workqueue handling Revert "misc: fastrpc: Restrict untrusted app to attach to privileged PD" char: xillybus: Don't destroy workqueue from work item running on it