Commit Graph

5395 Commits

Author SHA1 Message Date
Linus Torvalds
6485cf5ea2 hid-for-linus-2024101301
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIVAwUAZww7rKZi849r7WBJAQI63g/+MJwCtLFv+kDZtmzrmf3jJKtyzxW5JNh4
 ZjfJwp2EGhpbb7ei8PSIyMU2UBXbS285uMz6/LQBE8Y73OuTN90Y5YRHDsxAL3kB
 8itEUkA+HmHDmDEUvVa0Xu9MAZRQN8u7uQEwTZ/PeqMEgKr5eVZ1jPw7qupthxO4
 5QPVyONYuQv8HutJ+BqeRu33z3c/DX044lDec/V2dHpPJ1oxI59z1dUwEWLLKvNb
 hgvbbYdzITyR5SiFTZWYES23S+YOU7/yabDmkOcWgTmLNPUfNYUxiyxqIUzvI6tp
 QU30PAyu5uKuBCDMry/7QNTsOWj7yuOtRMm1BlMwUzEsRYwwXFS64LUJnNY7IcRH
 siS1tikcrklrRdl8g5VkHRCV0knR7eo58l+luDExDH20xYwI8aa/122aU8uxueAe
 sct7Aqut2KD/VPOQkqnxUbEJ8x4Rh+jiLI3LwRGgyAmS9xXCu87T2BucyEKTfHYi
 ZRgwmDJTq5psc77FJybnAsqjChDh3xVK5TPHDWhWdyp5/Yp5u7LHVd2ZVcjbyK7E
 GcUasyu2PvKlgQMXMVqbEipLEbN9EaztQpb1N+OQnzxVt1yklJcR8taBqsA84jxO
 Seo1g1c2ttxnOh4AgcndQwgStfvj08YHIjDgNT2vMQ2V1PhxjLo0UzopMODWa77k
 lp1GNfHWLgk=
 =HKsr
 -----END PGP SIGNATURE-----

Merge tag 'hid-for-linus-2024101301' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid

Pull HID fixes from Jiri Kosina:

 - fix for memory corruption regression in amd_sfh driver (Basavaraj
   Natikar)

 - fix for mis-reporting of BTN_TOOL_PEN and BTN_TOOL_RUBBER for AES
   sensors tools in Wacom driver (Jason Gerecke)

 - fix for unitialized variable use in intel-ish-hid driver
   (SurajSonawane2415)

 - a few device-specific quirks / device ID additions

* tag 'hid-for-linus-2024101301' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: wacom: Hardcode (non-inverted) AES pens as BTN_TOOL_PEN
  HID: amd_sfh: Switch to device-managed dmam_alloc_coherent()
  HID: multitouch: Add quirk for HONOR MagicBook Art 14 touchpad
  HID: multitouch: Add support for B2402FVA track point
  HID: plantronics: Workaround for an unexcepted opposite volume key
  hid: intel-ish-hid: Fix uninitialized variable 'rv' in ish_fw_xfer_direct_dma
2024-10-13 16:35:20 -07:00
Jason Gerecke
2934b12281 HID: wacom: Hardcode (non-inverted) AES pens as BTN_TOOL_PEN
Unlike EMR tools which encode type information in their tool ID, tools
for AES sensors are all "generic pens". It is inappropriate to make use
of the wacom_intuos_get_tool_type function when dealing with these kinds
of devices. Instead, we should only ever report BTN_TOOL_PEN or
BTN_TOOL_RUBBER, as depending on the state of the Eraser and Invert
bits.

Reported-by: Daniel Jutz <daniel@djutz.com>
Closes: https://lore.kernel.org/linux-input/3cd82004-c5b8-4f2a-9a3b-d88d855c65e4@heusel.eu/
Bisected-by: Christian Heusel <christian@heusel.eu>
Fixes: 9c2913b962 ("HID: wacom: more appropriate tool type categorization")
Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/1041
Link: https://github.com/linuxwacom/input-wacom/issues/440
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Cc: stable@vger.kernel.org
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-10-11 11:12:19 +02:00
Basavaraj Natikar
c56f9ecb7f HID: amd_sfh: Switch to device-managed dmam_alloc_coherent()
Using the device-managed version allows to simplify clean-up in probe()
error path.

Additionally, this device-managed ensures proper cleanup, which helps to
resolve memory errors, page faults, btrfs going read-only, and btrfs
disk corruption.

Fixes: 4b2c53d93a ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)")
Tested-by: Chris Hixon <linux-kernel-bugs@hixontech.com>
Tested-by: Richard <hobbes1069@gmail.com>
Tested-by: Skyler <skpu@pm.me>
Reported-by: Chris Hixon <linux-kernel-bugs@hixontech.com>
Closes: https://lore.kernel.org/all/3b129b1f-8636-456a-80b4-0f6cce0eef63@hixontech.com/
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219331
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-10-09 17:18:57 +02:00
WangYuli
7a5ab80711 HID: multitouch: Add quirk for HONOR MagicBook Art 14 touchpad
The behavior of HONOR MagicBook Art 14 touchpad is not consistent
after reboots, as sometimes it reports itself as a touchpad, and
sometimes as a mouse.

Similarly to GLO-GXXX it is possible to call MT_QUIRK_FORCE_GET_FEATURE as a
workaround to force set feature in mt_set_input_mode() for such special touchpad
device.

[jkosina@suse.com: reword changelog a little bit]
Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/1040
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Reviewed-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-10-08 09:15:25 +02:00
Stefan Blum
1a5cbb526e HID: multitouch: Add support for B2402FVA track point
By default the track point does not work on the Asus Expertbook B2402FVA.

From libinput record i got the ID of the track point device:
  evdev:
    # Name: ASUE1201:00 04F3:32AE
    # ID: bus 0x18 vendor 0x4f3 product 0x32ae version 0x100

I found that the track point is functional, when i set the
MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU class for the reported device.

Signed-off-by: Stefan Blum <stefan.blum@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-10-08 09:10:59 +02:00
Wade Wang
87b6962090 HID: plantronics: Workaround for an unexcepted opposite volume key
Some Plantronics headset as the below send an unexcept opposite
volume key's HID report for each volume key press after 200ms, like
unecepted Volume Up Key following Volume Down key pressed by user.
This patch adds a quirk to hid-plantronics for these devices, which
will ignore the second unexcepted opposite volume key if it happens
within 220ms from the last one that was handled.
    Plantronics EncorePro 500 Series  (047f:431e)
    Plantronics Blackwire_3325 Series (047f:430c)

The patch was tested on the mentioned model, it shouldn't affect
other models, however, this quirk might be needed for them too.
Auto-repeat (when a key is held pressed) is not affected per test
result.

Cc: stable@vger.kernel.org
Signed-off-by: Wade Wang <wade.wang@hp.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-10-08 08:45:17 +02:00
SurajSonawane2415
d41bff05a6 hid: intel-ish-hid: Fix uninitialized variable 'rv' in ish_fw_xfer_direct_dma
Fix the uninitialized symbol 'rv' in the function ish_fw_xfer_direct_dma
to resolve the following warning from the smatch tool:
drivers/hid/intel-ish-hid/ishtp-fw-loader.c:714 ish_fw_xfer_direct_dma()
error: uninitialized symbol 'rv'.
Initialize 'rv' to 0 to prevent undefined behavior from uninitialized
access.

Cc: stable@vger.kernel.org
Fixes: 91b228107d ("HID: intel-ish-hid: ISH firmware loader client driver")
Signed-off-by: SurajSonawane2415 <surajsonawane0215@gmail.com>
Link: https://patch.msgid.link/20241004075944.44932-1-surajsonawane0215@gmail.com
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-10-04 10:33:11 +02:00
Linus Torvalds
7ec462100e Getting rid of asm/unaligned.h includes
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQqUNBr3gm4hGXdBJlZ7Krx/gZQ6wUCZv3NAgAKCRBZ7Krx/gZQ
 68kbAP0YzQxUgl0/o7Soda8XwKSPZTM9ls6kRk1UHTTG/i4ZigEA/G+i/mBQctL0
 AB911kK8mxfXppfOXzstFBjoJSqiigQ=
 =IE7D
 -----END PGP SIGNATURE-----

Merge tag 'pull-work.unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull generic unaligned.h cleanups from Al Viro:
 "Get rid of architecture-specific <asm/unaligned.h> includes, replacing
  them with a single generic <linux/unaligned.h> header file.

  It's the second largest (after asm/io.h) class of asm/* includes, and
  all but two architectures actually end up using exact same file.

  Massage the remaining two (arc and parisc) to do the same and just
  move the thing to from asm-generic/unaligned.h to linux/unaligned.h"

[ This is one of those things that we're better off doing outside the
  merge window, and would only cause extra conflict noise if it was in
  linux-next for the next release due to all the trivial #include line
  updates.  Rip off the band-aid.   - Linus ]

* tag 'pull-work.unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  move asm/unaligned.h to linux/unaligned.h
  arc: get rid of private asm/unaligned.h
  parisc: get rid of private asm/unaligned.h
2024-10-02 16:42:28 -07:00
Al Viro
5f60d5f6bb move asm/unaligned.h to linux/unaligned.h
asm/unaligned.h is always an include of asm-generic/unaligned.h;
might as well move that thing to linux/unaligned.h and include
that - there's nothing arch-specific in that header.

auto-generated by the following:

for i in `git grep -l -w asm/unaligned.h`; do
	sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i
done
for i in `git grep -l -w asm-generic/unaligned.h`; do
	sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i
done
git mv include/asm-generic/unaligned.h include/linux/unaligned.h
git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h
sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild
sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
2024-10-02 17:23:23 -04:00
Linus Torvalds
f23aa4c076 hid-for-linus-2024090201
-----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEoEVH9lhNrxiMPSyI7MXwXhnZSjYFAmb9ZycTHGJlbnRpc3NA
 a2VybmVsLm9yZwAKCRDsxfBeGdlKNpW+D/9linFeMgxAAIyypoHVW1sjOnkKGF48
 AHSmFeVr+9AO58KGuBeXSkDKoz55Z9IFM7pv8XAPPYAwP44eShRA1mC1GREOe0R1
 sTfoLjZpe/+MGVrHWiVXE6+oeBJ773lALrM4mWCuuRibTm8k4AuK9GvGIM6cvBtH
 rq06NZSdOlOpPt4z6rheunF/Pa8cqxQoT3ylCNcBTuAERtSy19xwfYTFUaIii5f4
 JNH9stB+gdg3eN8M+9ppL4OVuozF+TPAJJCTCqdLkBJrzAV9rg4OB3NlJtciQIQQ
 MfpsGwFCjKitEbqmpRVOIJAz0YNVTkGRHj4kaGpKuphfiUDC8KYBice/4Ya7CsLu
 awM8X3jna08XZNMPxT/oInwI1sDlZo9mhje8cHi4eRd5oIA3S8iSX5ccBbSnjcCb
 nOjg0zya5LG8awHtv1am9e4/x8a2ql7gDNc2Stf9/jZ4Bu2lV1omdiqswEDT5ngt
 qpOUPl4RzO8DNpHHlemfCmgwTcPymGE9i6YdkHTVdgTB5BSOEPtToimlcBQfrLxm
 vTJCh4AYlmNKaN7nF81VvfvtKWiaT+HM7IgHoBBpRWGI4qxinNANo03lVIxs9SXh
 M3BCVcv3Vo4sNz/8YN8WpehF/6xqTZ2QpN0ypUkwmLwdJzMp//yqmqjIiJF3V/zz
 DdEpiDstlpCBdg==
 =8cfY
 -----END PGP SIGNATURE-----

Merge tag 'hid-for-linus-2024090201' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid

Pull HID fix from Benjamin Tissoires:

 - A small fix from the new HID-BPF code.

   The HID-BPF CI started failing completely because the BPF tree is now
   stricter, exposing a problem in the hid_bpf_ops.

* tag 'hid-for-linus-2024090201' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: bpf: fix cfi stubs for hid_bpf_ops
2024-10-02 12:30:25 -07:00
Benjamin Tissoires
acd5f76fd5 HID: bpf: fix cfi stubs for hid_bpf_ops
With the introduction of commit e42ac14180 ("bpf: Check unsupported ops
from the bpf_struct_ops's cfi_stubs"), a HID-BPF struct_ops containing
a .hid_hw_request() or a .hid_hw_output_report() was failing to load
as the cfi stubs were not defined.

Fix that by defining those simple static functions and restore HID-BPF
functionality.

This was detected with the HID selftests suddenly failing on Linus' tree.

Cc: stable@vger.kernel.org # v6.11+
Fixes: 9286675a2a ("HID: bpf: add HID-BPF hooks for hid_hw_output_report")
Fixes: 8bd0488b5e ("HID: bpf: add HID-BPF hooks for hid_hw_raw_requests")
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-09-27 20:15:21 +02:00
Al Viro
cb787f4ac0 [tree-wide] finally take no_llseek out
no_llseek had been defined to NULL two years ago, in commit 868941b144
("fs: remove no_llseek")

To quote that commit,

  At -rc1 we'll need do a mechanical removal of no_llseek -

  git grep -l -w no_llseek | grep -v porting.rst | while read i; do
	sed -i '/\<no_llseek\>/d' $i
  done

  would do it.

Unfortunately, that hadn't been done.  Linus, could you do that now, so
that we could finally put that thing to rest? All instances are of the
form
	.llseek = no_llseek,
so it's obviously safe.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-09-27 08:18:43 -07:00
Krzysztof Kozlowski
c6bae35fd6 HID: hid-goodix: drop unsupported and undocumented DT part
Drop support for Devicetree from, because the binding is being reverted
(on basis of duplicating existing binding) and property was not added to
the original binding.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-09-25 22:49:49 +02:00
Linus Torvalds
a65b3c3ed4 hid-for-linus-2024091602
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIVAwUAZuqd7aZi849r7WBJAQLI0g//TIM5bR5iJ6FivvTHoYZ6xP4na/43g9fM
 LqLYtfuR6iEogCawqJjC8bETnry3URyph8C6EmqND0TAS7LGQSYg46yu1pdPAar1
 rG+txtJcNqtLq34SkKmZzA8AD3Zyf3X8e9d5XnFTNyqBA/hT1a1B4uivSPaXiEkt
 hwSxVCJt7OQJ7GRkd6LOWvs/tvQTOkW1FgUrIyXj0weI7zMPuNx4vAgAQaKoUP0O
 5DsZwKMRod6/GC4UmXxl5U2eQRcdF/2VvgGbSFIJM559k0uvtwo0saVM6M/5CBNp
 BEvsaEwBnDlBAqnLOdPUyPdKpSPLd8gt2GbtvKhwr/vycyCRX/oZbG2Ldf4s5W/k
 gHJ5JCoYyCX+AQf+N5EAA5C8OU5IypbnkyD4ynDm5wyYcqaIYESO4LJzfV2Y54XQ
 gijLQKqq1GbbVwt2zFyrvOE1IH7ZSSelfNAKQKFSYR1i+HpenqRvTommTR72jvcV
 jCTe4yEfxBUzVA3Cbb7hpR8HXVGnszk80ynCWTS+nqi6t+Uca6yqCwOV6lGeBucL
 UgCbfJ9t2liM6U3rN6X6f+c0i2E7+5ZE6xaZ6k7xHnA1JHtO30N74awIXbIssDOE
 uwngPRZn8wBouKabiTsmdZXr3BjZBDuT8YC2NOXiCwZEtP7dlD7C/N7D4Cp1Xvi6
 VLMrn83Ides=
 =FMSD
 -----END PGP SIGNATURE-----

Merge tag 'hid-for-linus-2024091602' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid

Pull HID updates from Jiri Kosina:

 - New HID over SPI driver for Goodix devices that don't follow
   Microsoft's HID-over-SPI specification, so a separate driver is
   needed. Currently supported device is GT7986U touchscreen (Charles
   Wang)

 - support for new hardware features in Wacom driver (high-res wheel
   scrolling, touchstrings with relative motions, support for two
   touchrings) (Jason Gerecke)

 - support for customized vendor firmware loading in intel-ish driver
   (Zhang Lixu)

 - fix for theoretical race condition in i2c-hid (Dmitry Torokhov)

 - support for HIDIOCREVOKE -- evdev's EVIOCREVOKE equivalent in hidraw
   (Peter Hutterer)

 - initial hidraw selftest implementation (Benjamin Tissoires)

 - constification of device-specific report descriptors (Thomas
   Weißschuh)

 - other small assorted fixes and device ID / quirk additions

* tag 'hid-for-linus-2024091602' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (54 commits)
  hid: cp2112: Use irq_get_trigger_type() helper
  HID: i2c-hid: ensure various commands do not interfere with each other
  HID: multitouch: Add support for Thinkpad X12 Gen 2 Kbd Portfolio
  HID: wacom: Do not warn about dropped packets for first packet
  HID: wacom: Support sequence numbers smaller than 16-bit
  HID: lg: constify fixed up report descriptor
  HID: uclogic: constify fixed up report descriptor
  HID: waltop: constify fixed up report descriptor
  HID: sony: constify fixed up report descriptor
  HID: pxrc: constify fixed up report descriptor
  HID: steelseries: constify fixed up report descriptor
  HID: viewsonic: constify fixed up report descriptor
  HID: vrc2: constify fixed up report descriptor
  HID: xiaomi: constify fixed up report descriptor
  HID: maltron: constify fixed up report descriptor
  HID: keytouch: constify fixed up report descriptor
  HID: holtek-kbd: constify fixed up report descriptor
  HID: dr: constify fixed up report descriptor
  HID: bigbenff: constify fixed up report descriptor
  HID: picoLCD: Use backlight power constants
  ...
2024-09-19 09:42:21 +02:00
Benjamin Tissoires
0aa04373bc Merge branch 'for-6.12/cp2112' into for-linus
- Use irq_get_trigger_type() helper (Jinjie Ruan)
2024-09-13 16:04:30 +02:00
Jinjie Ruan
e9a081c80c hid: cp2112: Use irq_get_trigger_type() helper
Use irq_get_trigger_type() to replace irq_get_irq_data() and then
irqd_get_trigger_type(), if the irq data is NULL it will return 0.

No functional changed.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240913074632.3779321-1-ruanjinjie@huawei.com
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-13 15:39:37 +02:00
Benjamin Tissoires
ce28dae326 Merge branch 'for-6.12/picolcd' into for-linus
- Use backlight power constants (Thomas Zimmermann)
2024-09-13 15:28:14 +02:00
Benjamin Tissoires
c9ce59650e Merge branch 'for-6.12/elan' into for-linus
- Add support for one new Elan device (ekth6a12nay) (Zhaoxiong Lv)
2024-09-13 15:27:27 +02:00
Benjamin Tissoires
54ab927352 Merge branch 'for-6.12/hid-playstation' into for-linus
- Enhance compatibility with clone controllers (Max Staudt)
2024-09-13 15:26:35 +02:00
Benjamin Tissoires
fe9c6249e8 Merge branch 'for-6.12/goodix-spi' into for-linus
- Add support for a new Goodix HID over SPI driver (Charles Wang)

Note: this driver doesn't rely on the spefication of HID over SPI
provided by Microsoft, thus needs a separate driver, not a generic bus
transport low level driver.
2024-09-13 15:24:03 +02:00
Benjamin Tissoires
1a811edf4f Merge branch 'for-6.12/wacom' into for-linus
Various Wacom fixes (Jason Gerecke):
- Support for high-resolution wheel scrolling
- Support touchrings with relative motion
- Support devices with two touchrings
- Support sequence numbers smaller than 16-bit
2024-09-13 15:21:44 +02:00
Benjamin Tissoires
8357632ef9 Merge branch 'for-6.12/amd_sfh' into for-linus
- Convert comma to semicolon (Chen Ni)
2024-09-13 15:20:58 +02:00
Benjamin Tissoires
1b6ff737e2 Merge branch 'for-6.12/intel-ish' into for-linus
- Add support for vendor customized firmware loading (Zhang Lixu)
2024-09-13 15:20:01 +02:00
Benjamin Tissoires
b169410962 Merge branch 'i2c-hid' into for-linus
- ensure various commands do not interfere with each other (Dmitry
  Torokhov)
2024-09-13 15:18:33 +02:00
Benjamin Tissoires
6937a82d48 Merge branch 'for-6.12/hidraw' into for-linus
- introduction of HIDIOCREVOKE ioctl to revoke a hidraw fd opened by a
  regular (non-root) application (Peter Hutterer)
2024-09-13 15:16:56 +02:00
Benjamin Tissoires
054e0bd345 Merge branch 'for-6.12/constify-rdesc' into for-linus
- Constification of report descriptors so drivers can use read-only
  memory when declaring report descriptors fixups (Thomas Weißschuh)
2024-09-13 15:14:56 +02:00
Benjamin Tissoires
37c25a5031 Merge branch 'for-6.12/core' into for-linus
- add helper for finding a field with a certain usage (Kerem Karabay)
2024-09-13 15:14:06 +02:00
Benjamin Tissoires
10a5fd6e98 Merge branch 'for-6.11/upstream-fixes' into for-linus
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-13 15:07:09 +02:00
Dmitry Torokhov
b4ed18a3d5 HID: i2c-hid: ensure various commands do not interfere with each other
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 <dmitry.torokhov@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-09-12 14:11:36 +02:00
Vishnu Sankar
65b72ea91a HID: multitouch: Add support for Thinkpad X12 Gen 2 Kbd Portfolio
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 <vishnuocv@gmail.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-09-11 14:17:52 +02:00
Jason Gerecke
84aecf2d25 HID: wacom: Do not warn about dropped packets for first packet
The driver currently assumes that the first sequence number it will see
is going to be 0. This is not a realiable assumption and can break if,
for example, the tablet has already been running for some time prior to
the kernel driver connecting to the device. This commit initializes the
expected sequence number to -1 and will only print the "Dropped" warning
the it has been updated to a non-negative value.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Tested-by: Joshua Dickens <joshua.dickens@wacom.com>
Fixes: 6d09085b38 ("HID: wacom: Adding Support for new usages")
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-09-10 23:47:03 +02:00
Jason Gerecke
359673ea3a HID: wacom: Support sequence numbers smaller than 16-bit
The current dropped packet reporting assumes that all sequence numbers
are 16 bits in length. This results in misleading "Dropped" messages if
the hardware uses fewer bits. For example, if a tablet uses only 8 bits
to store its sequence number, once it rolls over from 255 -> 0, the
driver will still be expecting a packet "256". This patch adjusts the
logic to reset the next expected packet to logical_minimum whenever
it overflows beyond logical_maximum.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Tested-by: Joshua Dickens <joshua.dickens@wacom.com>
Fixes: 6d09085b38 ("HID: wacom: Adding Support for new usages")
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-09-10 23:47:03 +02:00
Thomas Weißschuh
9f5305ed80 HID: lg: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240905-hid-const-fixup-2-v2-1-70915e0cc1c7@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-06 10:06:02 +02:00
Hans de Goede
56d8b784c5 hwmon fixes for v6.11-rc7
hp-wmi-sensors: Check if WMI event data exists before accessing it
 
 ltc2991: fix register bits defines
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAmbYrGEACgkQyx8mb86f
 mYERyw//V+MQSPf+wmRcM7gU0+u+Ylbl98wbyaO6+YyTiq2XQJgbrk2AnNJFxqu9
 tkv2Xb3xFu1EB1V6Xz5kADzaP6Wp9W+4TK+PrlN0GCa6FZZwbGZBuhIkLS1492ex
 Zf8oRUNNiRnIAHb+5+E0aonDbsHSWe7Ff5WVTRfKBn8rrQW8pchPx4h/Y+o54Llo
 BEOQTA0rN51eg0RL7e9ECFUmBLRNuZA6E1w25F15VA50O4Xx2i6lL7PwPDb7KKpa
 g6fy2JTtr7+hKOiJMR4KdodsOZHvW4RgZ0MvWQkOZsccHw8CLp8c4egIxPYQ41Zu
 Ef4imKHPDVsiSXHW6rjQro0IQWBvRu1/6R1ibbDlXTWN5dkxGaByb0tlrRo3QBQn
 CvoHqkQkhioaX2k1I7bBDbyz6AregHLBJ7kpLq4ClcfW4QmxJ9zPPSDekyIyQiTZ
 vU/OljM/Je6CIbzspcaKS8uhNdykw3FX/LWLVwUEFJawJHV8b7XD+S3aJq7zQqEl
 R0hIeDyWiakP2ca7gozey1RjxpFDNQhCeZUqEaTlLhHlDykvZAceEXNuoczrpKNq
 UaBincY64PVBmzLPpjpDVg7C7C023xoqrWKSSd9kFsl9KzbKTH0XzkVPtD9cjQC5
 d34++QqhffAtJuekIbrWmtfhZsvkgQrfRv1MowNsbce0Lz7dRGE=
 =sSGh
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-v6.11-rc7' into review-hans

Merge "hwmon fixes for v6.11-rc7" into review-hans to bring in
commit a54da9df75 ("hwmon: (hp-wmi-sensors) Check if WMI event
data exists").

This is a dependency for a set of WMI event data refactoring changes.
2024-09-05 16:57:36 +02:00
Thomas Weißschuh
03f8dc1d0a HID: uclogic: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-14-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-05 16:20:57 +02:00
Thomas Weißschuh
24b3c515c6 HID: waltop: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-12-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-05 16:20:57 +02:00
Thomas Weißschuh
d4781a27ad HID: sony: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-11-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-05 16:20:57 +02:00
Thomas Weißschuh
4211f9b112 HID: pxrc: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-10-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-05 16:20:57 +02:00
Thomas Weißschuh
88ae9ffc7c HID: steelseries: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-9-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-05 16:20:57 +02:00
Thomas Weißschuh
4f3ff3a275 HID: viewsonic: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-8-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-05 16:20:57 +02:00
Thomas Weißschuh
49cf20b878 HID: vrc2: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-7-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-05 16:20:57 +02:00
Thomas Weißschuh
c06df4c57a HID: xiaomi: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-6-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-05 16:20:57 +02:00
Thomas Weißschuh
d8b21af666 HID: maltron: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-5-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-05 16:20:56 +02:00
Thomas Weißschuh
b299944af7 HID: keytouch: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-4-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-05 16:20:56 +02:00
Thomas Weißschuh
3ce7edfa4f HID: holtek-kbd: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-3-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-05 16:20:56 +02:00
Thomas Weißschuh
49e00b5ca0 HID: dr: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-2-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-05 16:20:56 +02:00
Thomas Weißschuh
00f6f65bd1 HID: bigbenff: constify fixed up report descriptor
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-1-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-09-05 16:20:56 +02:00
Thomas Zimmermann
28a7eeb9eb HID: picoLCD: Use backlight power constants
Replace FB_BLANK_ constants with their counterparts from the
backlight subsystem. The values are identical, so there's no
change in functionality or semantics.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-09-05 10:55:15 +02:00
Chen Ni
d11cfda966 HID: hid-sensor-custom: Convert comma to semicolon
Replace a comma between expression statements by a semicolon.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-09-03 14:00:05 +02:00
tammy tseng
de07af0ab0 HID: add patch for sis multitouch format
The patch is to add proper quirks for sis multitouch format

Signed-off-by: tammy tseng <tammy0524@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-09-03 13:58:30 +02:00