<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/hid, branch for-next</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=for-next</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=for-next'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-12-05T18:06:47Z</updated>
<entry>
<title>Merge tag 'hid-for-linus-2024120501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid</title>
<updated>2024-12-05T18:06:47Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-12-05T18:06:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2a770b49b1bf00fca5473cb386eaf36d21d17d4b'/>
<id>urn:sha1:2a770b49b1bf00fca5473cb386eaf36d21d17d4b</id>
<content type='text'>
Pull HID fixes from Benjamin Tissoires:

 - regression fix in suspend/resume for i2c-hid (Kenny Levinsen)

 - fix wacom driver assuming a name can not be null (WangYuli)

 - a couple of constify changes/fixes (Thomas Weißschuh)

 - a couple of selftests/hid fixes (Maximilian Heyne &amp; Benjamin
   Tissoires)

* tag 'hid-for-linus-2024120501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  selftests/hid: fix kfunc inclusions with newer bpftool
  HID: bpf: drop unneeded casts discarding const
  HID: bpf: constify hid_ops
  selftests: hid: fix typo and exit code
  HID: wacom: fix when get product name maybe null pointer
  HID: i2c-hid: Revert to using power commands to wake on resume
</content>
</entry>
<entry>
<title>module: Convert symbol namespace to string literal</title>
<updated>2024-12-02T19:34:44Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2024-12-02T14:59:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cdd30ebb1b9f36159d66f088b61aee264e649d7a'/>
<id>urn:sha1:cdd30ebb1b9f36159d66f088b61aee264e649d7a</id>
<content type='text'>
Clean up the existing export namespace code along the same lines of
commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.

Scripted using

  git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
  do
    awk -i inplace '
      /^#define EXPORT_SYMBOL_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /^#define MODULE_IMPORT_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /MODULE_IMPORT_NS/ {
        $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
      }
      /EXPORT_SYMBOL_NS/ {
        if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
  	if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &amp;&amp;
  	    $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &amp;&amp;
  	    $0 !~ /^my/) {
  	  getline line;
  	  gsub(/[[:space:]]*\\$/, "");
  	  gsub(/[[:space:]]/, "", line);
  	  $0 = $0 " " line;
  	}

  	$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
  		    "\\1(\\2, \"\\3\")", "g");
        }
      }
      { print }' $file;
  done

Requested-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Get rid of 'remove_new' relic from platform driver struct</title>
<updated>2024-12-01T23:12:43Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-12-01T23:12:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e70140ba0d2b1a30467d4af6bcfe761327b9ec95'/>
<id>urn:sha1:e70140ba0d2b1a30467d4af6bcfe761327b9ec95</id>
<content type='text'>
The continual trickle of small conversion patches is grating on me, and
is really not helping.  Just get rid of the 'remove_new' member
function, which is just an alias for the plain 'remove', and had a
comment to that effect:

  /*
   * .remove_new() is a relic from a prototype conversion of .remove().
   * New drivers are supposed to implement .remove(). Once all drivers are
   * converted to not use .remove_new any more, it will be dropped.
   */

This was just a tree-wide 'sed' script that replaced '.remove_new' with
'.remove', with some care taken to turn a subsequent tab into two tabs
to make things line up.

I did do some minimal manual whitespace adjustment for places that used
spaces to line things up.

Then I just removed the old (sic) .remove_new member function, and this
is the end result.  No more unnecessary conversion noise.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>HID: bpf: drop unneeded casts discarding const</title>
<updated>2024-11-28T13:49:51Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-11-27T16:42:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b1b0c112437d7547a6588009e08face31b22c47'/>
<id>urn:sha1:0b1b0c112437d7547a6588009e08face31b22c47</id>
<content type='text'>
In commit 33c0fb85b571 ("HID: bpf: make part of struct hid_device writable")
the const qualifier was dropped from struct hid_bpf_ctx::hid.
The casts are now unnecessary.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Link: https://patch.msgid.link/20241127-hid-bpf-cast-v1-1-f26424960e84@weissschuh.net
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: bpf: constify hid_ops</title>
<updated>2024-11-28T13:49:28Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-11-27T16:41:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f9a11da1d92f78279afafdc811214b88cfe54a77'/>
<id>urn:sha1:f9a11da1d92f78279afafdc811214b88cfe54a77</id>
<content type='text'>
The hid_ops struct is never modified. Mark it as const.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Link: https://patch.msgid.link/20241127-hid-bpf-ops-v1-1-f9e41bfa3afd@weissschuh.net
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: wacom: fix when get product name maybe null pointer</title>
<updated>2024-11-28T13:40:42Z</updated>
<author>
<name>WangYuli</name>
<email>wangyuli@uniontech.com</email>
</author>
<published>2024-11-25T05:26:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=59548215b76be98cf3422eea9a67d6ea578aca3d'/>
<id>urn:sha1:59548215b76be98cf3422eea9a67d6ea578aca3d</id>
<content type='text'>
Due to incorrect dev-&gt;product reporting by certain devices, null
pointer dereferences occur when dev-&gt;product is empty, leading to
potential system crashes.

This issue was found on EXCELSIOR DL37-D05 device with
Loongson-LS3A6000-7A2000-DL37 motherboard.

Kernel logs:
[   56.470885] usb 4-3: new full-speed USB device number 4 using ohci-pci
[   56.671638] usb 4-3: string descriptor 0 read error: -22
[   56.671644] usb 4-3: New USB device found, idVendor=056a, idProduct=0374, bcdDevice= 1.07
[   56.671647] usb 4-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   56.678839] hid-generic 0003:056A:0374.0004: hiddev0,hidraw3: USB HID v1.10 Device [HID 056a:0374] on usb-0000:00:05.0-3/input0
[   56.697719] CPU 2 Unable to handle kernel paging request at virtual address 0000000000000000, era == 90000000066e35c8, ra == ffff800004f98a80
[   56.697732] Oops[#1]:
[   56.697734] CPU: 2 PID: 2742 Comm: (udev-worker) Tainted: G           OE      6.6.0-loong64-desktop #25.00.2000.015
[   56.697737] Hardware name: Inspur CE520L2/C09901N000000000, BIOS 2.09.00 10/11/2024
[   56.697739] pc 90000000066e35c8 ra ffff800004f98a80 tp 9000000125478000 sp 900000012547b8a0
[   56.697741] a0 0000000000000000 a1 ffff800004818b28 a2 0000000000000000 a3 0000000000000000
[   56.697743] a4 900000012547b8f0 a5 0000000000000000 a6 0000000000000000 a7 0000000000000000
[   56.697745] t0 ffff800004818b2d t1 0000000000000000 t2 0000000000000003 t3 0000000000000005
[   56.697747] t4 0000000000000000 t5 0000000000000000 t6 0000000000000000 t7 0000000000000000
[   56.697748] t8 0000000000000000 u0 0000000000000000 s9 0000000000000000 s0 900000011aa48028
[   56.697750] s1 0000000000000000 s2 0000000000000000 s3 ffff800004818e80 s4 ffff800004810000
[   56.697751] s5 90000001000b98d0 s6 ffff800004811f88 s7 ffff800005470440 s8 0000000000000000
[   56.697753]    ra: ffff800004f98a80 wacom_update_name+0xe0/0x300 [wacom]
[   56.697802]   ERA: 90000000066e35c8 strstr+0x28/0x120
[   56.697806]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
[   56.697816]  PRMD: 0000000c (PPLV0 +PIE +PWE)
[   56.697821]  EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
[   56.697827]  ECFG: 00071c1d (LIE=0,2-4,10-12 VS=7)
[   56.697831] ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0)
[   56.697835]  BADV: 0000000000000000
[   56.697836]  PRID: 0014d000 (Loongson-64bit, Loongson-3A6000)
[   56.697838] Modules linked in: wacom(+) bnep bluetooth rfkill qrtr nls_iso8859_1 nls_cp437 snd_hda_codec_conexant snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_timer snd soundcore input_leds mousedev led_class joydev deepin_netmonitor(OE) fuse nfnetlink dmi_sysfs ip_tables x_tables overlay amdgpu amdxcp drm_exec gpu_sched drm_buddy radeon drm_suballoc_helper i2c_algo_bit drm_ttm_helper r8169 ttm drm_display_helper spi_loongson_pci xhci_pci cec xhci_pci_renesas spi_loongson_core hid_generic realtek gpio_loongson_64bit
[   56.697887] Process (udev-worker) (pid: 2742, threadinfo=00000000aee0d8b4, task=00000000a9eff1f3)
[   56.697890] Stack : 0000000000000000 ffff800004817e00 0000000000000000 0000251c00000000
[   56.697896]         0000000000000000 00000011fffffffd 0000000000000000 0000000000000000
[   56.697901]         0000000000000000 1b67a968695184b9 0000000000000000 90000001000b98d0
[   56.697906]         90000001000bb8d0 900000011aa48028 0000000000000000 ffff800004f9d74c
[   56.697911]         90000001000ba000 ffff800004f9ce58 0000000000000000 ffff800005470440
[   56.697916]         ffff800004811f88 90000001000b98d0 9000000100da2aa8 90000001000bb8d0
[   56.697921]         0000000000000000 90000001000ba000 900000011aa48028 ffff800004f9d74c
[   56.697926]         ffff8000054704e8 90000001000bb8b8 90000001000ba000 0000000000000000
[   56.697931]         90000001000bb8d0 9000000006307564 9000000005e666e0 90000001752359b8
[   56.697936]         9000000008cbe400 900000000804d000 9000000005e666e0 0000000000000000
[   56.697941]         ...
[   56.697944] Call Trace:
[   56.697945] [&lt;90000000066e35c8&gt;] strstr+0x28/0x120
[   56.697950] [&lt;ffff800004f98a80&gt;] wacom_update_name+0xe0/0x300 [wacom]
[   56.698000] [&lt;ffff800004f9ce58&gt;] wacom_parse_and_register+0x338/0x900 [wacom]
[   56.698050] [&lt;ffff800004f9d74c&gt;] wacom_probe+0x32c/0x420 [wacom]
[   56.698099] [&lt;9000000006307564&gt;] hid_device_probe+0x144/0x260
[   56.698103] [&lt;9000000005e65d68&gt;] really_probe+0x208/0x540
[   56.698109] [&lt;9000000005e661dc&gt;] __driver_probe_device+0x13c/0x1e0
[   56.698112] [&lt;9000000005e66620&gt;] driver_probe_device+0x40/0x100
[   56.698116] [&lt;9000000005e6680c&gt;] __device_attach_driver+0x12c/0x180
[   56.698119] [&lt;9000000005e62bc8&gt;] bus_for_each_drv+0x88/0x160
[   56.698123] [&lt;9000000005e66468&gt;] __device_attach+0x108/0x260
[   56.698126] [&lt;9000000005e63918&gt;] device_reprobe+0x78/0x100
[   56.698129] [&lt;9000000005e62a68&gt;] bus_for_each_dev+0x88/0x160
[   56.698132] [&lt;9000000006304e54&gt;] __hid_bus_driver_added+0x34/0x80
[   56.698134] [&lt;9000000005e62bc8&gt;] bus_for_each_drv+0x88/0x160
[   56.698137] [&lt;9000000006304df0&gt;] __hid_register_driver+0x70/0xa0
[   56.698142] [&lt;9000000004e10fe4&gt;] do_one_initcall+0x104/0x320
[   56.698146] [&lt;9000000004f38150&gt;] do_init_module+0x90/0x2c0
[   56.698151] [&lt;9000000004f3a3d8&gt;] init_module_from_file+0xb8/0x120
[   56.698155] [&lt;9000000004f3a590&gt;] idempotent_init_module+0x150/0x3a0
[   56.698159] [&lt;9000000004f3a890&gt;] sys_finit_module+0xb0/0x140
[   56.698163] [&lt;900000000671e4e8&gt;] do_syscall+0x88/0xc0
[   56.698166] [&lt;9000000004e12404&gt;] handle_syscall+0xc4/0x160
[   56.698171] Code: 0011958f  00150224  5800cd85 &lt;2a00022c&gt; 00150004  4000c180  0015022c  03400000  03400000
[   56.698192] ---[ end trace 0000000000000000 ]---

Fixes: 09dc28acaec7 ("HID: wacom: Improve generic name generation")
Reported-by: Zhenxing Chen &lt;chenzhenxing@uniontech.com&gt;
Co-developed-by: Xu Rao &lt;raoxu@uniontech.com&gt;
Signed-off-by: Xu Rao &lt;raoxu@uniontech.com&gt;
Signed-off-by: WangYuli &lt;wangyuli@uniontech.com&gt;
Link: https://patch.msgid.link/B31757FE8E1544CF+20241125052616.18261-1-wangyuli@uniontech.com
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: i2c-hid: Revert to using power commands to wake on resume</title>
<updated>2024-11-28T10:18:14Z</updated>
<author>
<name>Kenny Levinsen</name>
<email>kl@kl.wtf</email>
</author>
<published>2024-11-19T23:53:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34851431ceca1bf457d85895bd38a4e7967e2055'/>
<id>urn:sha1:34851431ceca1bf457d85895bd38a4e7967e2055</id>
<content type='text'>
commit 7d6f065de37c ("HID: i2c-hid: Use address probe to wake on resume")
replaced the retry of power commands with the dummy read "bus probe" we
use on boot which accounts for a necessary delay before retry.

This made at least one Weida device (2575:0910 in an ASUS Vivobook S14)
very unhappy, as the bus probe despite being successful somehow lead to
the following power command failing so hard that the device never lets
go of the bus. This means that even retries of the power command would
fail on a timeout as the bus remains busy.

Remove the bus probe on resume and instead reintroduce retry of the
power command for wake-up purposes while respecting the newly
established wake-up retry timings.

Fixes: 7d6f065de37c ("HID: i2c-hid: Use address probe to wake on resume")
Cc: stable@vger.kernel.org
Reported-by: Michael &lt;auslands-kv@gmx.de&gt;
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219440
Link: https://lore.kernel.org/r/d5acb485-7377-4139-826d-4df04d21b5ed@leemhuis.info/
Signed-off-by: Kenny Levinsen &lt;kl@kl.wtf&gt;
Link: https://patch.msgid.link/20241119235615.23902-1-kl@kl.wtf
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>Revert "HID: bpf: allow write access to quirks field in struct hid_device"</title>
<updated>2024-11-25T17:21:47Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-11-25T17:21:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=919464deeca24e5bf13b6c8efd0b1d25cc43866f'/>
<id>urn:sha1:919464deeca24e5bf13b6c8efd0b1d25cc43866f</id>
<content type='text'>
This reverts commit 6fd47effe92b, and the related self-test update
commit e14e0eaeb040 ("selftests/hid: add test for assigning a given
device to hid-generic").

It results in things like the scroll wheel on Logitech mice not working
after a reboot due to the kernel being confused about the state of the
high-resolution mode.

Quoting Benjamin Tissoires:
 "The idea of 6fd47effe92b was to be able to call hid_bpf_rdesc_fixup()
  once per reprobe of the device.

  However, because the bpf filter can now change the quirk value, the
  call had to be moved before the driver gets bound (which was
  previously ensuring the unicity of the call).

  The net effect is that now, in the case hid-generic gets loaded first
  and then the specific driver gets loaded once the disk is available,
  the value of -&gt;quirks is not reset, but kept to the value that was set
  by hid-generic (HID_QUIRK_INPUT_PER_APP).

  Once hid-logitech-hidpp kicks in, that quirk is now set, which creates
  two inputs for the single mouse: one keyboard for fancy shortcuts, and
  one mouse node.

  However, hid-logitech-hidpp expects only one input node to be attached
  (it stores it into hidpp-&gt;input), and when a wheel event is received,
  because there is some processing with high-resolution wheel events,
  the wheel event is injected into hidpp-&gt;input.

  And of course, when HID_QUIRK_INPUT_PER_APP is set, hidpp-&gt;input gets
  the keyboard node, which doesn't have wheel event type, and the events
  are ignored"

Reported-and-bisected-by: Mike Galbraith &lt;efault@gmx.de&gt;
Link: https://lore.kernel.org/all/CAHk-=wiUkQM3uheit2cNM0Y0OOY5qqspJgC8LkmOkJ2p2LDxcw@mail.gmail.com/
Acked-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'backlight-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight</title>
<updated>2024-11-23T00:29:57Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-11-23T00:29:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2fb7eb3d7e8c5c0375c726c7d5c443e6f7e53741'/>
<id>urn:sha1:2fb7eb3d7e8c5c0375c726c7d5c443e6f7e53741</id>
<content type='text'>
Pull backlight updates from Lee Jones:

 - Improve handling of LCD power states and interactions with the fbdev
   subsystem

 - Introduce new LCD_POWER_ constants to decouple the LCD subsystem from
   fbdev

 - Update several drivers to use the new LCD_POWER_ constants

 - Clarify the semantics of the lcd_ops.controls_device callback

 - Remove unnecessary includes and dependencies

 - Remove unused notifier functionality

 - Simplify code with scoped for-each loops

 - Fix module autoloading for the ktz8866 driver

 - Update device tree bindings to yaml format

 - Minor cleanups and improvements in various drivers

* tag 'backlight-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (33 commits)
  MAINTAINERS: Use Daniel Thompson's korg address for Backlight work
  dt-bindings: backlight: Convert zii,rave-sp-backlight.txt to yaml
  backlight: Remove notifier
  backlight: ktz8866: Fix module autoloading
  backlight: 88pm860x_bl: Simplify with scoped for each OF child loop
  backlight: lcd: Do not include &lt;linux/fb.h&gt; in lcd header
  backlight: lcd: Remove struct fb_videomode from set_mode callback
  backlight: lcd: Replace check_fb with controls_device
  HID: picoLCD: Replace check_fb in favor of struct fb_info.lcd_dev
  fbdev: omap: Use lcd power constants
  fbdev: imxfb: Use lcd power constants
  fbdev: imxfb: Replace check_fb in favor of struct fb_info.lcd_dev
  fbdev: clps711x-fb: Use lcd power constants
  fbdev: clps711x-fb: Replace check_fb in favor of struct fb_info.lcd_dev
  backlight: tdo24m: Use lcd power constants
  backlight: platform_lcd: Use lcd power constants
  backlight: platform_lcd: Remove match_fb from struct plat_lcd_data
  backlight: platform_lcd: Remove include statement for &lt;linux/backlight.h&gt;
  backlight: otm3225a: Use lcd power constants
  backlight: ltv350qv: Use lcd power constants
  ...
</content>
</entry>
<entry>
<title>Merge branch 'for-6.13/bpf' into for-linus</title>
<updated>2024-11-18T21:02:17Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.com</email>
</author>
<published>2024-11-18T21:02:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=903796855b6152c479bae07dcebded77897f9e1c'/>
<id>urn:sha1:903796855b6152c479bae07dcebded77897f9e1c</id>
<content type='text'>
- improvement of the way hid-bpf coexists with specific drivers (others than
  hid-generic) that are already bound to devices (Benjamin Tissoires)
</content>
</entry>
</feed>
