]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
2 weeks agoInput: synaptics - add LEN2058 to SMBus passlist for ThinkPad E490
Nicolás Bazaes [Thu, 14 May 2026 01:35:49 +0000 (21:35 -0400)] 
Input: synaptics - add LEN2058 to SMBus passlist for ThinkPad E490

The Lenovo ThinkPad E490 (PNP ID: LEN2058) has a Synaptics TM3471-020
touchpad that supports SMBus/RMI4 mode but is not listed in
smbus_pnp_ids[]. Without this entry, RMI4 over SMBus is not enabled
by default, and the touchpad falls back to PS/2 mode.

Adding LEN2058 to the passlist enables automatic RMI4 detection without
requiring the psmouse.synaptics_intertouch parameter, and matches
the behavior of similar ThinkPad models already in the list
(E480/LEN2054, E580/LEN2055).

Tested on ThinkPad E490 with kernel 7.0.5-zen1 and Arch Linux.
RMI4 over SMBus is confirmed working without any kernel parameters.

Signed-off-by: Nicolás Bazaes <contacto@bazaes.cl>
Assisted-by: Claude:claude-sonnet-4-6
Link: https://patch.msgid.link/20260514013552.14234-1-contacto@bazaes.cl
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 weeks agoInput: atlas - check ACPI_COMPANION() against NULL
Rafael J. Wysocki [Tue, 12 May 2026 16:26:54 +0000 (18:26 +0200)] 
Input: atlas - check ACPI_COMPANION() against NULL

Every platform driver can be forced to match a device that doesn't match
its list of device IDs because of device_match_driver_override(), so
platform drivers that rely on the existence of a device's ACPI companion
object need to verify its presence.

Accordingly, add a requisite ACPI_COMPANION() check against NULL to the
atlas_btns driver.

Fixes: b8303880b641 ("Input: atlas - convert ACPI driver to a platform one")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/8696590.T7Z3S40VBb@rafael.j.wysocki
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
3 weeks agoInput: atmel_mxt_ts - check mem_size before calculating config memory size
Dmitry Torokhov [Mon, 4 May 2026 18:54:46 +0000 (11:54 -0700)] 
Input: atmel_mxt_ts - check mem_size before calculating config memory size

In mxt_update_cfg(), the driver calculates the memory size needed to store
the configuration as data->mem_size - cfg.start_ofs. If data->mem_size is
less than or equal to cfg.start_ofs, this calculation will underflow or
result in a zero-size buffer, neither of which is valid for a configuration
update.

Add a check to return -EINVAL if data->mem_size is too small. While at it,
change the types of start_ofs and mem_size in struct mxt_cfg to u16 to
match the device address space.

Assisted-by: Gemini:gemini-3.1-pro
Link: https://patch.msgid.link/20260504185448.4055973-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
3 weeks agoInput: atmel_mxt_ts - fix boundary check in mxt_prepare_cfg_mem
Dmitry Torokhov [Mon, 4 May 2026 18:54:45 +0000 (11:54 -0700)] 
Input: atmel_mxt_ts - fix boundary check in mxt_prepare_cfg_mem

When a configuration file provides an object size that is larger than the
driver's known mxt_obj_size(object), the driver intends to discard the
extra bytes.

The loop iterates using for (i = 0; i < size; i++). Inside the loop, the
condition to skip processing extra bytes is:

    if (i > mxt_obj_size(object))
        continue;

Since i is a 0-based index, the valid indices for the object are 0 through
mxt_obj_size(object) - 1.

When i == mxt_obj_size(object), the condition evaluates to false, and the
code processes the byte instead of discarding it.

This causes the code to calculate byte_offset = reg + i - cfg->start_ofs
and writes the byte there, overwriting exactly one byte of the adjacent
instance or object.

Update the boundary check to skip extra bytes correctly by using >=.

Fixes: 50a77c658b80 ("Input: atmel_mxt_ts - download device config using firmware loader")
Cc: stable@vger.kernel.org
Assisted-by: Gemini:gemini-3.1-pro
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://patch.msgid.link/20260504185448.4055973-1-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
3 weeks agoInput: fm801-gp - simplify initialisation of pci_device_id array
Uwe Kleine-König (The Capable Hub) [Thu, 7 May 2026 16:00:51 +0000 (18:00 +0200)] 
Input: fm801-gp - simplify initialisation of pci_device_id array

Instead of assigning the pci_device_id members using a list (which is
hard to read as you need to look at the order of the members in that
struct in parallel) use the PCI_VDEVICE() convenience macro to compact
the initialisation while improving readability.

Also drop trailing zeros that the compiler will care about then.

The change doesn't introduce binary changes to the compiled driver,
verified on both ARCH=x86 and ARCH=arm64.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20260507160051.3315630-2-u.kleine-koenig@baylibre.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
4 weeks agoInput: xpad - add "Nova 2 Lite" from GameSir
Qbeliw Tanaka [Fri, 1 May 2026 04:44:12 +0000 (21:44 -0700)] 
Input: xpad - add "Nova 2 Lite" from GameSir

Add support for the gamepad "Nova 2 Lite" from GameSir, compatible with
the Xbox 360 gamepad.

Signed-off-by: Qbeliw Tanaka <q.tanaka@gmx.com>
Link: https://patch.msgid.link/20260429.162040.930225048583399359.q.tanaka@gmx.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
4 weeks agoInput: xpad - add support for ASUS ROG RAIKIRI II
Dmitriy Zharov [Thu, 30 Apr 2026 18:35:22 +0000 (22:35 +0400)] 
Input: xpad - add support for ASUS ROG RAIKIRI II

Add the VID/PIDs for the ASUS ROG RAIKIRI II controller to xpad_device
and the VID to xpad_table. The controller has a physical PC/XBOX toggle
which switches between XBOX360 and XBOXONE protocols.

Signed-off-by: Dmitriy Zharov <contact@zharov.dev>
Link: https://patch.msgid.link/20260430183522.122151-1-contact@zharov.dev
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
4 weeks agoInput: elan_i2c - validate firmware size before use
Dmitry Torokhov [Sun, 26 Apr 2026 05:07:06 +0000 (22:07 -0700)] 
Input: elan_i2c - validate firmware size before use

Ensure that the firmware file is large enough to contain the expected
number of pages and the signature (which resides at the end of the
firmware blob) before accessing them to prevent potential out-of-bounds
reads.

Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/ae2dOgiFvXRm4BHo@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 weeks agoInput: xpad - fix out-of-bounds access for Share button
Dmitry Torokhov [Mon, 27 Apr 2026 04:09:33 +0000 (21:09 -0700)] 
Input: xpad - fix out-of-bounds access for Share button

xpadone_process_packet() receives len directly from urb->actual_length
and uses it to index the share-button byte at data[len - 18] or
data[len - 26]. Since both len and data[0] are under the device's
control, a broken controller can send a GIP_CMD_INPUT packet with
actual_length < 18 (e.g. 5 bytes) and reach this code path, causing
accesses beyond the actual array.

Fix this by calculating the offset and checking bounds against the
packet length.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes: 4ef46367073b ("Input: xpad - fix Share button on Xbox One controllers")
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 weeks agoInput: usbtouchscreen - clamp NEXIO data_len/x_len to URB buffer size
Greg Kroah-Hartman [Mon, 20 Apr 2026 16:00:27 +0000 (18:00 +0200)] 
Input: usbtouchscreen - clamp NEXIO data_len/x_len to URB buffer size

nexio_read_data() pulls data_len and x_len from a packed __be16 header
in the device's interrupt packet and then walks packet->data[0..x_len)
and packet->data[x_len..data_len) comparing each byte against a
threshold.

Both fields are 16-bit on the wire (max 65535).  The existing
adjustments shave at most 0x100 / 0x80 off, so the loop bound can still
reach roughly 0xfeff.  The URB transfer buffer for NEXIO is rept_size
(1024) bytes from usb_alloc_coherent(), with the first 7 occupied by the
packed header — so packet->data[] has 1017 valid bytes.  read_data()
callbacks are not given urb->actual_length, and nothing else bounds the
walk.

A device that lies about its length can get a ~64 KiB out-of-bounds read
past the coherent DMA allocation.  The first index whose byte exceeds
NEXIO_THRESHOLD lands in begin_x / begin_y and from there into the
reported touch coordinates, so adjacent kernel memory contents leak to
userspace as ABS_X / ABS_Y events.  Far enough out, the read can also
hit an unmapped page and fault.

Fix this all by clamping data_len to the buffer's data[] capacity and
x_len to data_len.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Fixes: 5197424cdccc ("Input: usbtouchscreen - add NEXIO (or iNexio) support")
Cc: stable <stable@kernel.org>
Assisted-by: gkh_clanker_t1000
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/2026042026-chlorine-epidermis-fd6d@gregkh
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 weeks agoInput: elan_i2c - increase device reset wait timeout after update FW
Jingle Wu 吳金國 [Tue, 21 Apr 2026 07:02:33 +0000 (07:02 +0000)] 
Input: elan_i2c - increase device reset wait timeout after update FW

Extend wait_for_completion_timeout from 300ms to 700ms to ensure
sufficient time for device reset after firmware update.

Signed-off-by: Jingle Wu <jingle.wu@emc.com.tw>
Link: https://patch.msgid.link/KL1PR01MB5116031986614B3214EF2F30DC2C2@KL1PR01MB5116.apcprd01.prod.exchangelabs.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 weeks agoInput: elan_i2c - add ic type 0x19
Jingle Wu 吳金國 [Tue, 21 Apr 2026 07:00:10 +0000 (07:00 +0000)] 
Input: elan_i2c - add ic type 0x19

The 0x19 is valid 3000 serial ic type too.

Signed-off-by: Jingle Wu <jingle.wu@emc.com.tw>
Link: https://patch.msgid.link/KL1PR01MB511699853D1B66D137C06806DC2C2@KL1PR01MB5116.apcprd01.prod.exchangelabs.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 weeks agoMerge branch 'next' into for-linus
Dmitry Torokhov [Mon, 20 Apr 2026 01:28:57 +0000 (18:28 -0700)] 
Merge branch 'next' into for-linus

Prepare input updates for 7.1 merge window.

6 weeks agoInput: charlieplex_keypad - add GPIO charlieplex keypad
Hugo Villeneuve [Sun, 19 Apr 2026 05:18:54 +0000 (22:18 -0700)] 
Input: charlieplex_keypad - add GPIO charlieplex keypad

Add support for GPIO-based charlieplex keypad, allowing to control
N^2-N keys using N GPIO lines.

Reuse matrix keypad keymap to simplify, even if there is no concept
of rows and columns in this type of keyboard.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Link: https://patch.msgid.link/20260312180304.3865850-5-hugo@hugovil.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 weeks agodt-bindings: input: add GPIO charlieplex keypad
Hugo Villeneuve [Sun, 19 Apr 2026 05:18:30 +0000 (22:18 -0700)] 
dt-bindings: input: add GPIO charlieplex keypad

Add DT bindings for GPIO charlieplex keypad.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20260312180304.3865850-4-hugo@hugovil.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 weeks agodt-bindings: input: add settling-time-us common property
Hugo Villeneuve [Sun, 19 Apr 2026 05:17:43 +0000 (22:17 -0700)] 
dt-bindings: input: add settling-time-us common property

Add common property that can be reused by other bindings.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20260312180304.3865850-3-hugo@hugovil.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 weeks agodt-bindings: input: add debounce-delay-ms common property
Hugo Villeneuve [Sun, 19 Apr 2026 05:16:38 +0000 (22:16 -0700)] 
dt-bindings: input: add debounce-delay-ms common property

A few bindings are already defining a debounce-delay-ms property, so
add it to the input binding to reduce redundant redefines.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20260312180304.3865850-2-hugo@hugovil.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 weeks agoInput: imx_keypad - fix spelling mistake "Colums" -> "Columns"
Ethan Carter Edwards [Sun, 19 Apr 2026 00:58:32 +0000 (20:58 -0400)] 
Input: imx_keypad - fix spelling mistake "Colums" -> "Columns"

There is a spelling mistake in two comments. Fix them.

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Link: https://patch.msgid.link/20260418-imx-typo-v1-1-2a15e54ad4e7@ethancedwards.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 weeks agoInput: edt-ft5x06 - fix use-after-free in debugfs teardown
Dmitry Torokhov [Sat, 11 Apr 2026 04:13:43 +0000 (21:13 -0700)] 
Input: edt-ft5x06 - fix use-after-free in debugfs teardown

The commit 68743c500c6e ("Input: edt-ft5x06 - use per-client debugfs
directory") removed the manual debugfs teardown, relying on the I2C core
to handle it. However, this creates a window where debugfs files are
still accessible after edt_ft5x06_ts_teardown_debugfs() frees
tsdata->raw_buffer.

To prevent a use-after-free, protect the freeing of raw_buffer with the
device mutex and set raw_buffer to NULL. The debugfs read function
already checks if raw_buffer is NULL under the same mutex, so this
safely avoids the use-after-free.

Fixes: 68743c500c6e ("Input: edt-ft5x06 - use per-client debugfs directory")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/adnJicDh-bTUaWXP@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 weeks agoInput: uinput - take event lock when submitting FF request "event"
Dmitry Torokhov [Wed, 8 Apr 2026 05:16:27 +0000 (22:16 -0700)] 
Input: uinput - take event lock when submitting FF request "event"

To avoid racing with FF playback events and corrupting device's event
queue take event_lock spinlock when calling uinput_dev_event() when
submitting a FF upload or erase "event".

Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Link: https://patch.msgid.link/adXkf6MWzlB8LA_s@google.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 weeks agoInput: ims-pcu - fix heap-buffer-overflow in ims_pcu_process_data()
Seungjin Bae [Wed, 8 Apr 2026 16:03:59 +0000 (09:03 -0700)] 
Input: ims-pcu - fix heap-buffer-overflow in ims_pcu_process_data()

The `ims_pcu_process_data()` processes incoming URB data byte by byte.
However, it fails to check if the `read_pos` index exceeds
IMS_PCU_BUF_SIZE.

If a malicious USB device sends a packet larger than IMS_PCU_BUF_SIZE,
`read_pos` will increment indefinitely. Moreover, since `read_pos` is
located immediately after `read_buf`, the attacker can overwrite
`read_pos` itself to arbitrarily control the index.

This manipulated `read_pos` is subsequently used in
`ims_pcu_handle_response()` to copy data into `cmd_buf`, leading to a
heap buffer overflow.

Specifically, an attacker can overwrite the `cmd_done.wait.head` located
at offset 136 relative to `cmd_buf` in the `ims_pcu_handle_response()`.
Consequently, when the driver calls `complete(&pcu->cmd_done)`, it
triggers a control flow hijack by using the manipulated pointer.

Fix this by adding a bounds check for `read_pos` before writing to
`read_buf`. If the packet is too long, discard it, log a warning,
and reset the parser state.

Fixes: 628329d524743 ("Input: add IMS Passenger Control Unit driver")
Co-developed-by: Sanghoon Choi <csh0052@gmail.com>
Signed-off-by: Sanghoon Choi <csh0052@gmail.com>
Signed-off-by: Seungjin Bae <eeodqql09@gmail.com>
Link: https://patch.msgid.link/20251221211442.841549-2-eeodqql09@gmail.com
[dtor: factor out resetting packet state, reset checksum as well]
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 weeks agoInput: ct82c710 - remove driver
Dmitry Torokhov [Thu, 8 Aug 2024 17:27:31 +0000 (10:27 -0700)] 
Input: ct82c710 - remove driver

This is a PS/2 mouse interface chip from Chips & Technologies that was
used in TI TravelMate and Gateway Nomad laptops, which used 386 and 486
CPUs. With 486 support being removed from the kernel (and 386 support is
long gone) it is time to retire this driver as well.

Remove the driver.

Link: https://patch.msgid.link/20240808172733.1194442-6-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 weeks agoInput: mk712 - remove driver
Dmitry Torokhov [Thu, 8 Aug 2024 17:27:30 +0000 (10:27 -0700)] 
Input: mk712 - remove driver

This touchscreen controller was used om Gateway AOL Connected Touchpad
released in 2000 and, according to Wikipedia, removed from the market
in October 2001 due to slow sales.

It looks like it can still be bought on eBay for $1000 but I really
doubt anyone will actually use it.

Remove the driver.

Link: https://patch.msgid.link/20240808172733.1194442-5-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 weeks agoInput: logibm - remove driver
Dmitry Torokhov [Thu, 8 Aug 2024 17:27:28 +0000 (10:27 -0700)] 
Input: logibm - remove driver

Bus mice use specialized bus interface implemented via an ISA add-in
cards. They were superseded by PS/2 and later USB.

Kconfig entry for the Logitech bus mice states that they "are rather
rare these days". This statement was true in 2002 and is no less true
in 2024.

Remove the driver.

Link: https://patch.msgid.link/20240808172733.1194442-3-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 weeks agoInput: inport - remove driver
Dmitry Torokhov [Thu, 8 Aug 2024 17:27:27 +0000 (10:27 -0700)] 
Input: inport - remove driver

Inport (ATI XL and Microsoft) mice use specialized bus interface
implemented via an ISA add-in card. Have been superseded by PS/2 and
then USB, and are historical curiosity by now.

Remove the driver.

Link: https://patch.msgid.link/20240808172733.1194442-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 weeks agoInput: qt1070 - inline i2c_check_functionality check
Thorsten Blum [Wed, 8 Apr 2026 14:19:26 +0000 (16:19 +0200)] 
Input: qt1070 - inline i2c_check_functionality check

Inline the i2c_check_functionality() check, since the function returns a
boolean status rather than an error code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260408141926.1181389-4-thorsten.blum@linux.dev
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 weeks agoInput: qt1050 - inline i2c_check_functionality check
Thorsten Blum [Wed, 8 Apr 2026 14:19:25 +0000 (16:19 +0200)] 
Input: qt1050 - inline i2c_check_functionality check

Inline the i2c_check_functionality() check, since the function returns a
boolean status rather than an error code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260408141926.1181389-3-thorsten.blum@linux.dev
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 weeks agoInput: uinput - fix circular locking dependency with ff-core
Mikhail Gavrilov [Tue, 7 Apr 2026 07:50:31 +0000 (12:50 +0500)] 
Input: uinput - fix circular locking dependency with ff-core

A lockdep circular locking dependency warning can be triggered
reproducibly when using a force-feedback gamepad with uinput (for
example, playing ELDEN RING under Wine with a Flydigi Vader 5
controller):

  ff->mutex -> udev->mutex -> input_mutex -> dev->mutex -> ff->mutex

The cycle is caused by four lock acquisition paths:

1. ff upload: input_ff_upload() holds ff->mutex and calls
   uinput_dev_upload_effect() -> uinput_request_submit() ->
   uinput_request_send(), which acquires udev->mutex.

2. device create: uinput_ioctl_handler() holds udev->mutex and calls
   uinput_create_device() -> input_register_device(), which acquires
   input_mutex.

3. device register: input_register_device() holds input_mutex and
   calls kbd_connect() -> input_register_handle(), which acquires
   dev->mutex.

4. evdev release: evdev_release() calls input_flush_device() under
   dev->mutex, which calls input_ff_flush() acquiring ff->mutex.

Fix this by introducing a new state_lock spinlock to protect
udev->state and udev->dev access in uinput_request_send() instead of
acquiring udev->mutex.  The function only needs to atomically check
device state and queue an input event into the ring buffer via
uinput_dev_event() -- both operations are safe under a spinlock
(ktime_get_ts64() and wake_up_interruptible() do not sleep).  This
breaks the ff->mutex -> udev->mutex link since a spinlock is a leaf in
the lock ordering and cannot form cycles with mutexes.

To keep state transitions visible to uinput_request_send(), protect
writes to udev->state in uinput_create_device() and
uinput_destroy_device() with the same state_lock spinlock.

Additionally, move init_completion(&request->done) from
uinput_request_send() to uinput_request_submit() before
uinput_request_reserve_slot().  Once the slot is allocated,
uinput_flush_requests() may call complete() on it at any time from
the destroy path, so the completion must be initialised before the
request becomes visible.

Lock ordering after the fix:

  ff->mutex -> state_lock (spinlock, leaf)
  udev->mutex -> state_lock (spinlock, leaf)
  udev->mutex -> input_mutex -> dev->mutex -> ff->mutex (no back-edge)

Fixes: ff462551235d ("Input: uinput - switch to the new FF interface")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/CABXGCsMoxag+kEwHhb7KqhuyxfmGGd0P=tHZyb1uKE0pLr8Hkg@mail.gmail.com/
Signed-off-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Link: https://patch.msgid.link/20260407075031.38351-1-mikhail.v.gavrilov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 weeks agoInput: aiptek - validate raw macro indices before updating state
Pengpeng Hou [Tue, 7 Apr 2026 04:52:34 +0000 (21:52 -0700)] 
Input: aiptek - validate raw macro indices before updating state

aiptek_irq() derives macro key indices directly from tablet reports and
then uses them to index macroKeyEvents[]. Report types 4 and 5 also save
the derived value in aiptek->lastMacro and later use that state to
release the previous key.

Validate the raw macro index once before it enters that state machine, so
lastMacro only ever stores an in-range macro key. Keep direct bounds
checks for report type 6, which reads the macro number from the packet
body and uses it immediately.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260329001711.88076-1-pengpeng@iscas.ac.cn
[dtor: fix macro fallback in report 5s to use -1]
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 weeks agoInput: gf2k - skip invalid hat lookup values
Pengpeng Hou [Tue, 7 Apr 2026 01:56:52 +0000 (09:56 +0800)] 
Input: gf2k - skip invalid hat lookup values

gf2k_read() decodes the hat position from a 4-bit field and uses it
directly to index gf2k_hat_to_axis[]. The lookup table only has nine
entries, so malformed packets can read past the end of the fixed table.

Skip hat reporting when the decoded value falls outside the lookup
table instead of forcing it to the neutral position. This keeps the
fix local and avoids reporting a made-up axis state for malformed
packets.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260407120001.1-gf2k-v2-pengpeng@iscas.ac.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 weeks agoInput: xpad - add support for BETOP BTP-KP50B/C controller's wireless mode
Shengyu Qu [Sat, 4 Apr 2026 05:07:28 +0000 (22:07 -0700)] 
Input: xpad - add support for BETOP BTP-KP50B/C controller's wireless mode

BETOP's BTP-KP50B and BTP-KP50C controller's wireless dongles are both
working as standard Xbox 360 controllers. Add USB device IDs for them to
xpad driver.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Link: https://patch.msgid.link/TY4PR01MB14432B4B298EA186E5F86C46B9855A@TY4PR01MB14432.jpnprd01.prod.outlook.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 weeks agoInput: xpad - add support for Razer Wolverine V3 Pro
Zoltan Illes [Sat, 4 Apr 2026 05:03:42 +0000 (22:03 -0700)] 
Input: xpad - add support for Razer Wolverine V3 Pro

Add device IDs for the Razer Wolverine V3 Pro controller in both
wired (0x0a57) and wireless 2.4 GHz dongle (0x0a59) modes.

The controller uses the Xbox 360 protocol (vendor-specific class,
subclass 93, protocol 1) on interface 0 with an identical 20-byte
input report layout, so no additional processing is needed.

Signed-off-by: Zoltan Illes <zoliviragh@gmail.com>
Link: https://patch.msgid.link/20260329220031.1325509-1-137647604+ZlordHUN@users.noreply.github.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 weeks agoInput: xpad - add RedOctane Games vendor id
Sanjay Govind [Sat, 4 Apr 2026 05:35:50 +0000 (22:35 -0700)] 
Input: xpad - add RedOctane Games vendor id

Add vendor ID for RedOctane Games to xpad driver.

Signed-off-by: Sanjay Govind <sanjay.govind9@gmail.com>
Link: https://patch.msgid.link/20260311213106.271577-2-sanjay.govind9@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 weeks agoInput: xpad - remove stale TODO and changelog header
Elliot Tester [Wed, 25 Mar 2026 22:16:17 +0000 (23:16 +0100)] 
Input: xpad - remove stale TODO and changelog header

All items in the TODO block have since been addressed: axis tuning,
analog button handling, rumble support, and dance pad USB IDs are all
implemented. The manual changelog is also removed as history is tracked
in git.

Signed-off-by: Elliot Tester <elliotctester1@gmail.com>
Link: https://patch.msgid.link/20260325221618.135833-1-elliotctester1@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 weeks agoInput: usbtouchscreen - refactor endpoint lookup
Johan Hovold [Wed, 1 Apr 2026 08:22:12 +0000 (10:22 +0200)] 
Input: usbtouchscreen - refactor endpoint lookup

Use the common USB helpers for looking up bulk and interrupt endpoints
(and determining endpoint numbers) instead of open coding.

Note that the NEXIO data interface has two bulk endpoints (see commit
5197424cdccc ("Input: usbtouchscreen - add NEXIO (or iNexio) support")
for the descriptors).

The lookup in probe handles both bulk-in and interrupt-in endpoints and
was added to handle NEXIO devices. Replace the open coded lookup with a
lookup for the common interrupt endpoint and an explicit fallback
accepting a bulk endpoint.

This iterates over the (two) endpoints twice for NEXIO devices but makes
it more clear what is going on.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260401082212.2180434-1-johan@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: aw86927 - add support for Awinic AW86938
Griffin Kroah-Hartman [Wed, 4 Mar 2026 01:40:41 +0000 (17:40 -0800)] 
Input: aw86927 - add support for Awinic AW86938

Add support for the I2C-connected Awinic AW86938 LRA haptic controller.

The AW86938 has a similar but slightly different register layout. In
particular, the boost mode register values.

The AW86938 also has some extra features that aren't implemented
in this driver yet.

Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
Link: https://patch.msgid.link/20260302-aw86938-driver-v4-3-92c865df9cca@fairphone.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agodt-bindings: input: awinic,aw86927: Add Awinic AW86938
Griffin Kroah-Hartman [Wed, 4 Mar 2026 01:40:10 +0000 (17:40 -0800)] 
dt-bindings: input: awinic,aw86927: Add Awinic AW86938

Add bindings for the Awinic AW86938 haptic chip which can be found in
smartphones. These two chips require a similar devicetree configuration,
but have a register layout that's not 100% compatible.
Still, because chip model is fully detectable via ID register, these
chips can be documnented in the same file.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
Link: https://patch.msgid.link/20260302-aw86938-driver-v4-2-92c865df9cca@fairphone.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: aw86927 - respect vibration magnitude levels
Griffin Kroah-Hartman [Wed, 4 Mar 2026 01:37:18 +0000 (17:37 -0800)] 
Input: aw86927 - respect vibration magnitude levels

Previously the gain value was hardcoded. Take the magnitude passed via
the input API and configure the gain register accordingly.

Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
Link: https://patch.msgid.link/20260302-aw86938-driver-v4-1-92c865df9cca@fairphone.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: synaptics_usb - refactor endpoint lookup
Johan Hovold [Mon, 30 Mar 2026 09:59:47 +0000 (11:59 +0200)] 
Input: synaptics_usb - refactor endpoint lookup

Use the common USB helper for looking up interrupt-in endpoints instead
of open coding.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260330095948.1663141-4-johan@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: appletouch - refactor endpoint lookup
Johan Hovold [Mon, 30 Mar 2026 09:59:46 +0000 (11:59 +0200)] 
Input: appletouch - refactor endpoint lookup

Use the common USB helpers for looking up interrupt-in endpoints (and
determining endpoint numbers) instead of open coding.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260330095948.1663141-3-johan@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: keyspan-remote - refactor endpoint lookup
Johan Hovold [Mon, 30 Mar 2026 09:59:45 +0000 (11:59 +0200)] 
Input: keyspan-remote - refactor endpoint lookup

Use the common USB helper for looking up interrupt-in endpoints instead
of open coding.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260330095948.1663141-2-johan@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: pegasus_notetaker - use HID defines
Oliver Neukum [Wed, 25 Mar 2026 14:32:47 +0000 (15:32 +0100)] 
Input: pegasus_notetaker - use HID defines

The driver uses its own definitions for HID requests.
This leads to duplication and obfuscation. Use HID's
definitions.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Link: https://patch.msgid.link/20260325143256.371854-2-oneukum@suse.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: aiptek - use HID headers
Oliver Neukum [Wed, 25 Mar 2026 14:32:46 +0000 (15:32 +0100)] 
Input: aiptek - use HID headers

The driver uses its own definitions for HID requests.
This leads to duplication and obfuscation. Use HID's
definitions.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Link: https://patch.msgid.link/20260325143256.371854-1-oneukum@suse.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: goodix-berlin - report a resolution of 10 units/mm
Val Packett [Sat, 21 Mar 2026 07:30:07 +0000 (04:30 -0300)] 
Input: goodix-berlin - report a resolution of 10 units/mm

Without a reported resolution, userspace was assuming 1 unit/mm which
is wildly wrong: a regular smartphone is clearly not 2.4 meters tall.
Most applications do not care much for this kind of raw mm value,
but Phosh's on-screen keyboard would accidentally trigger swipe-to-close
gestures due to misinterpreting small movements as huge ones.

Do what the older goodix.c driver does and set the resolution to 10
units/mm to make sure the numbers calculated by userspace are reasonable.

Signed-off-by: Val Packett <val@packett.cool>
Link: https://patch.msgid.link/20260321073242.556253-1-val@packett.cool
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: zinitix - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 02:08:21 +0000 (19:08 -0700)] 
Input: zinitix - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: wm97xx - use guard notation when acquiring mutex
Dmitry Torokhov [Fri, 16 Aug 2024 22:18:44 +0000 (15:18 -0700)] 
Input: wm97xx - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: wdt87xx_i2c - switch to using cleanup functions
Dmitry Torokhov [Wed, 29 May 2024 18:08:15 +0000 (11:08 -0700)] 
Input: wdt87xx_i2c - switch to using cleanup functions

Start using __free() and guard() primitives to simplify the code
and error handling.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: tsc2007 - use guard notation when acquiring mutexes
Dmitry Torokhov [Tue, 6 Aug 2024 23:48:00 +0000 (16:48 -0700)] 
Input: tsc2007 - use guard notation when acquiring mutexes

This makes the code more compact and error handling more robust.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: sx8654 - use IRQF_NOAUTOEN when requesting interrupt
Dmitry Torokhov [Wed, 14 Aug 2024 21:22:13 +0000 (14:22 -0700)] 
Input: sx8654 - use IRQF_NOAUTOEN when requesting interrupt

Instead of requesting interrupt normally and immediately disabling it
with call to disable_irq() use IRQF_NOAUTOEN to keep it disabled until
it is needed. This avoids a tiny window when interrupt is enabled but
not needed.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: sx8654 - use guard notation when acquiring spinlock
Dmitry Torokhov [Wed, 14 Aug 2024 21:13:33 +0000 (14:13 -0700)] 
Input: sx8654 - use guard notation when acquiring spinlock

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: sur40 - use guard notation when acquiring spinlock
Dmitry Torokhov [Wed, 14 Aug 2024 21:38:11 +0000 (14:38 -0700)] 
Input: sur40 - use guard notation when acquiring spinlock

Guard notation simplifies code.

Also use list_first_entry() instead of list_entry() to emphasize intent.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: stmfts - use guard notation when acquiring mutex
Dmitry Torokhov [Fri, 16 Aug 2024 21:09:22 +0000 (14:09 -0700)] 
Input: stmfts - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: raydium_i2c_ts - switch to using cleanup functions
Dmitry Torokhov [Wed, 29 May 2024 18:22:15 +0000 (11:22 -0700)] 
Input: raydium_i2c_ts - switch to using cleanup functions

Start using __free() and guard() primitives to simplify the code
and error handling.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: pixcir_i2c_ts - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 02:07:03 +0000 (19:07 -0700)] 
Input: pixcir_i2c_ts - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: novatek-nvt-ts - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 02:04:21 +0000 (19:04 -0700)] 
Input: novatek-nvt-ts - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: mxs-lradc-ts - use guard notation when acquiring spinlock
Dmitry Torokhov [Fri, 23 Aug 2024 00:12:08 +0000 (17:12 -0700)] 
Input: mxs-lradc-ts - use guard notation when acquiring spinlock

Guard notation simplifies code and shows critical section more clearly.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: msg2638 - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 02:02:31 +0000 (19:02 -0700)] 
Input: msg2638 - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: mms114 - use guard notation when acquiring mutex
Dmitry Torokhov [Fri, 16 Aug 2024 20:56:28 +0000 (13:56 -0700)] 
Input: mms114 - use guard notation when acquiring mutex

Guard notation simplifies code.

Also stop trying to check if input device is opened/in use in the
interrupt handler - the interrupt is disabled when device is closed or
suspended.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: mk712 - use guard notation when acquiring spinlock
Dmitry Torokhov [Sun, 1 Sep 2024 23:11:38 +0000 (16:11 -0700)] 
Input: mk712 - use guard notation when acquiring spinlock

Using guard notation makes the code more compact and error handling
more robust by ensuring that locks are released in all code paths
when control leaves critical section.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: melfas_mip4 - switch to using cleanup functions
Dmitry Torokhov [Wed, 29 May 2024 18:58:26 +0000 (11:58 -0700)] 
Input: melfas_mip4 - switch to using cleanup functions

Start using __free() and guard() primitives to simplify the code
and error handling.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: lpc32xx_ts - use guard notation when acquiring mutex
Dmitry Torokhov [Fri, 16 Aug 2024 21:11:25 +0000 (14:11 -0700)] 
Input: lpc32xx_ts - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: iqs7211 - use cleanup facility for fwnodes
Dmitry Torokhov [Wed, 21 Aug 2024 22:48:31 +0000 (15:48 -0700)] 
Input: iqs7211 - use cleanup facility for fwnodes

Use __free(fwnode_handle) cleanup facility to ensure that references to
acquired fwnodes are dropped at appropriate times automatically.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: iqs5xx - simplify parsing of firmware blob
Dmitry Torokhov [Tue, 29 Apr 2025 00:53:02 +0000 (17:53 -0700)] 
Input: iqs5xx - simplify parsing of firmware blob

Do not define or use iqs5xx_ihex_rec structure: the original code was
using just a couple of fields in it and instead used it to calculate
offset to record data. The data field was actually reserving space for
checksum.

Instead iterate through fields and advance pointer explicitly.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: iqs5xx - switch to using cleanup functions
Dmitry Torokhov [Tue, 16 Jan 2024 21:52:33 +0000 (13:52 -0800)] 
Input: iqs5xx - switch to using cleanup functions

Start using __free() and guard() primitives to simplify the code and error
handling.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: ipaq-micro-ts - use guard notation when acquiring mutex/spinlock
Dmitry Torokhov [Sun, 18 Aug 2024 02:01:18 +0000 (19:01 -0700)] 
Input: ipaq-micro-ts - use guard notation when acquiring mutex/spinlock

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: imx6ul_tsc - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 02:00:21 +0000 (19:00 -0700)] 
Input: imx6ul_tsc - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: imagis - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 01:58:22 +0000 (18:58 -0700)] 
Input: imagis - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: hycon-hy46xx - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 01:55:08 +0000 (18:55 -0700)] 
Input: hycon-hy46xx - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: hideep - switch to using cleanup functions
Dmitry Torokhov [Tue, 16 Jan 2024 19:35:26 +0000 (11:35 -0800)] 
Input: hideep - switch to using cleanup functions

Start using __free() and guard() primitives to simplify the code and error
handling.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: goodix - switch to using cleanup functions in firmware code
Dmitry Torokhov [Wed, 29 May 2024 21:43:30 +0000 (14:43 -0700)] 
Input: goodix - switch to using cleanup functions in firmware code

Start using __free(firmware) to simplify the code and error handling.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: exc3000 - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 00:26:09 +0000 (17:26 -0700)] 
Input: exc3000 - use guard notation when acquiring mutex

Guard notation simplifies code.

Note that callers of exc3000_vendor_data_request() always expect
response, so it was adjusted to always wait for it.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: elo - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 00:20:30 +0000 (17:20 -0700)] 
Input: elo - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: elants_i2c - switch to using cleanup facilities
Dmitry Torokhov [Fri, 7 Jun 2024 06:32:05 +0000 (23:32 -0700)] 
Input: elants_i2c - switch to using cleanup facilities

Start using __free() and guard() primitives to simplify the code
and error handling.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: ektf2127 - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 00:17:10 +0000 (17:17 -0700)] 
Input: ektf2127 - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: eeti_ts - use guard notation when acquiring mutexes
Dmitry Torokhov [Mon, 1 Jul 2024 02:26:14 +0000 (19:26 -0700)] 
Input: eeti_ts - use guard notation when acquiring mutexes

This makes the code more compact and error handling more robust.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: edt-ft5x06 - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 00:05:00 +0000 (17:05 -0700)] 
Input: edt-ft5x06 - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: cyttsp - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 00:14:57 +0000 (17:14 -0700)] 
Input: cyttsp - use guard notation when acquiring mutex

Guard notation simplifies code.

Also fix the touchscreen not being marked as suspended when noone has
opened/is using it.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: chipone_icn8318 - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 00:10:01 +0000 (17:10 -0700)] 
Input: chipone_icn8318 - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: bu21029_ts - use guard notation when acquiring mutex
Dmitry Torokhov [Sun, 18 Aug 2024 00:08:28 +0000 (17:08 -0700)] 
Input: bu21029_ts - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: auo-pixcir-ts - use guard notation when acquiring mutexes
Dmitry Torokhov [Mon, 1 Jul 2024 05:51:52 +0000 (22:51 -0700)] 
Input: auo-pixcir-ts - use guard notation when acquiring mutexes

This makes the code more compact and error handling more robust.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: atmel_mxt_ts - switch to using cleanup functions
Dmitry Torokhov [Wed, 29 May 2024 21:37:21 +0000 (14:37 -0700)] 
Input: atmel_mxt_ts - switch to using cleanup functions

Start using __free() and guard() primitives to simplify the code
and error handling.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: ads7846 - switch to using cleanup functions
Dmitry Torokhov [Mon, 1 Jul 2024 05:47:44 +0000 (22:47 -0700)] 
Input: ads7846 - switch to using cleanup functions

Start using __free() and guard() primitives to simplify the code
and error handling.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: ad7879 - use guard notation when acquiring mutexes
Dmitry Torokhov [Mon, 1 Jul 2024 05:40:19 +0000 (22:40 -0700)] 
Input: ad7879 - use guard notation when acquiring mutexes

This makes the code more compact and error handling more robust.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoInput: ad7877 - use guard notation when acquiring mutexes/locks
Dmitry Torokhov [Mon, 1 Jul 2024 05:30:26 +0000 (22:30 -0700)] 
Input: ad7877 - use guard notation when acquiring mutexes/locks

This makes the code more compact and error handling more robust.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agodt-bindings: input: matrix-keymap: fix key board wording
Hugo Villeneuve [Mon, 23 Mar 2026 14:00:21 +0000 (10:00 -0400)] 
dt-bindings: input: matrix-keymap: fix key board wording

The correct wording is keyboard, without a space.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20260323140024.104475-1-hugo@hugovil.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agodt-bindings: input: touchscreen: edt-ft5x06: Add FocalTech FT3519
Bhushan Shah [Sat, 14 Mar 2026 14:57:58 +0000 (20:27 +0530)] 
dt-bindings: input: touchscreen: edt-ft5x06: Add FocalTech FT3519

Document FocalTech FT3519 support by adding the compatible. It's 10
point touchscreen, which is compatible with FT3518

Signed-off-by: Bhushan Shah <bhushan.shah@machinesoul.in>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260314-edt-ft3519-v3-1-5ee91b408ed6@machinesoul.in
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoMerge tag 'v7.0-rc5' into next
Dmitry Torokhov [Tue, 24 Mar 2026 20:49:39 +0000 (13:49 -0700)] 
Merge tag 'v7.0-rc5' into next

Sync up with mainline to pull in a fix for smb compilation error.

2 months agoLinux 7.0-rc5 v7.0-rc5
Linus Torvalds [Sun, 22 Mar 2026 21:42:17 +0000 (14:42 -0700)] 
Linux 7.0-rc5

2 months agoi2c: tegra: Don't mark devices with pins as IRQ safe
Mikko Perttunen [Tue, 3 Mar 2026 04:32:11 +0000 (13:32 +0900)] 
i2c: tegra: Don't mark devices with pins as IRQ safe

I2C devices with associated pinctrl states (DPAUX I2C controllers)
will change pinctrl state during runtime PM. This requires taking
a mutex, so these devices cannot be marked as IRQ safe.

Add PINCTRL as dependency to avoid build errors.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reported-by: Russell King <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/all/E1vsNBv-00000009nfA-27ZK@rmk-PC.armlinux.org.uk/
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2 months agoMerge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Linus Torvalds [Sun, 22 Mar 2026 18:16:06 +0000 (11:16 -0700)] 
Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf

Pull bpf fixes from Alexei Starovoitov:

 - Fix how linked registers track zero extension of subregisters (Daniel
   Borkmann)

 - Fix unsound scalar fork for OR instructions (Daniel Wade)

 - Fix exception exit lock check for subprogs (Ihor Solodrai)

 - Fix undefined behavior in interpreter for SDIV/SMOD instructions
   (Jenny Guanni Qu)

 - Release module's BTF when module is unloaded (Kumar Kartikeya
   Dwivedi)

 - Fix constant blinding for PROBE_MEM32 instructions (Sachin Kumar)

 - Reset register ID for END instructions to prevent incorrect value
   tracking (Yazhou Tang)

* tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
  selftests/bpf: Add a test cases for sync_linked_regs regarding zext propagation
  bpf: Fix sync_linked_regs regarding BPF_ADD_CONST32 zext propagation
  selftests/bpf: Add tests for maybe_fork_scalars() OR vs AND handling
  bpf: Fix unsound scalar forking in maybe_fork_scalars() for BPF_OR
  selftests/bpf: Add tests for sdiv32/smod32 with INT_MIN dividend
  bpf: Fix undefined behavior in interpreter sdiv/smod for INT_MIN
  selftests/bpf: Add tests for bpf_throw lock leak from subprogs
  bpf: Fix exception exit lock checking for subprogs
  bpf: Release module BTF IDR before module unload
  selftests/bpf: Fix pkg-config call on static builds
  bpf: Fix constant blinding for PROBE_MEM32 stores
  selftests/bpf: Add test for BPF_END register ID reset
  bpf: Reset register ID for BPF_END value tracking

2 months agoMerge tag 'trace-v7.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
Linus Torvalds [Sun, 22 Mar 2026 18:10:31 +0000 (11:10 -0700)] 
Merge tag 'trace-v7.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing fixes from Steven Rostedt:

 - Revert "tracing: Remove pid in task_rename tracing output"

   A change was made to remove the pid field from the task_rename event
   because it was thought that it was always done for the current task
   and recording the pid would be redundant. This turned out to be
   incorrect and there are a few corner case where this is not true and
   caused some regressions in tooling.

 - Fix the reading from user space for migration

   The reading of user space uses a seq lock type of logic where it uses
   a per-cpu temporary buffer and disables migration, then enables
   preemption, does the copy from user space, disables preemption,
   enables migration and checks if there was any schedule switches while
   preemption was enabled. If there was a context switch, then it is
   considered that the per-cpu buffer could be corrupted and it tries
   again. There's a protection check that tests if it takes a hundred
   tries, it issues a warning and exits out to prevent a live lock.

   This was triggered because the task was selected by the load balancer
   to be migrated to another CPU, every time preemption is enabled the
   migration task would schedule in try to migrate the task but can't
   because migration is disabled and let it run again. This caused the
   scheduler to schedule out the task every time it enabled preemption
   and made the loop never exit (until the 100 iteration test
   triggered).

   Fix this by enabling and disabling preemption and keeping migration
   enabled if the reading from user space needs to be done again. This
   will let the migration thread migrate the task and the copy from user
   space will likely pass on the next iteration.

 - Fix trace_marker copy option freeing

   The "copy_trace_marker" option allows a tracing instance to get a
   copy of a write to the trace_marker file of the top level instance.
   This is managed by a link list protected by RCU. When an instance is
   removed, a check is made if the option is set, and if so
   synchronized_rcu() is called.

   The problem is that an iteration is made to reset all the flags to
   what they were when the instance was created (to perform clean ups)
   was done before the check of the copy_trace_marker option and that
   option was cleared, so the synchronize_rcu() was never called.

   Move the clearing of all the flags after the check of
   copy_trace_marker to do synchronize_rcu() so that the option is still
   set if it was before and the synchronization is performed.

 - Fix entries setting when validating the persistent ring buffer

   When validating the persistent ring buffer on boot up, the number of
   events per sub-buffer is added to the sub-buffer meta page. The
   validator was updating cpu_buffer->head_page (the first sub-buffer of
   the per-cpu buffer) and not the "head_page" variable that was
   iterating the sub-buffers. This was causing the first sub-buffer to
   be assigned the entries for each sub-buffer and not the sub-buffer
   that was supposed to be updated.

 - Use "hash" value to update the direct callers

   When updating the ftrace direct callers, it assigned a temporary
   callback to all the callback functions of the ftrace ops and not just
   the functions represented by the passed in hash. This causes an
   unnecessary slow down of the functions of the ftrace_ops that is not
   being modified. Only update the functions that are going to be
   modified to call the ftrace loop function so that the update can be
   made on those functions.

* tag 'trace-v7.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  ftrace: Use hash argument for tmp_ops in update_ftrace_direct_mod
  ring-buffer: Fix to update per-subbuf entries of persistent ring buffer
  tracing: Fix trace_marker copy link list updates
  tracing: Fix failure to read user space from system call trace events
  tracing: Revert "tracing: Remove pid in task_rename tracing output"

2 months agoMerge tag 'i2c-for-7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sun, 22 Mar 2026 18:05:34 +0000 (11:05 -0700)] 
Merge tag 'i2c-for-7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:

 - fix broken I2C communication on Armada 3700 with recovery

 - fix device_node reference leak in probe (fsi)

 - fix NULL-deref when serial string is missing (cp2615)

* tag 'i2c-for-7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: pxa: defer reset on Armada 3700 when recovery is used
  i2c: fsi: Fix a potential leak in fsi_i2c_probe()
  i2c: cp2615: fix serial string NULL-deref at probe

2 months agoMerge tag 'x86-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 22 Mar 2026 17:54:12 +0000 (10:54 -0700)] 
Merge tag 'x86-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:

 - Improve Qemu MCE-injection behavior by only using AMD SMCA MSRs if
   the feature bit is set

 - Fix the relative path of gettimeofday.c inclusion in vclock_gettime.c

 - Fix a boot crash on UV clusters when a socket is marked as
   'deconfigured' which are mapped to the SOCK_EMPTY node ID by
   the UV firmware, while Linux APIs expect NUMA_NO_NODE.

   The difference being (0xffff [unsigned short ~0]) vs [int -1]

* tag 'x86-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/platform/uv: Handle deconfigured sockets
  x86/entry/vdso: Fix path of included gettimeofday.c
  x86/mce/amd: Check SMCA feature bit before accessing SMCA MSRs

2 months agoMerge tag 'perf-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 22 Mar 2026 17:31:51 +0000 (10:31 -0700)] 
Merge tag 'perf-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:

 - Fix a PMU driver crash on AMD EPYC systems, caused by
   a race condition in x86_pmu_enable()

 - Fix a possible counter-initialization bug in x86_pmu_enable()

 - Fix a counter inheritance bug in inherit_event() and
   __perf_event_read()

 - Fix an Intel PMU driver branch constraints handling bug
   found by UBSAN

 - Fix the Intel PMU driver's new Off-Module Response (OMR)
   support code for Diamond Rapids / Nova lake, to fix a snoop
   information parsing bug

* tag 'perf-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel: Fix OMR snoop information parsing issues
  perf/x86/intel: Add missing branch counters constraint apply
  perf: Make sure to use pmu_ctx->pmu for groups
  x86/perf: Make sure to program the counter value for stopped events on migration
  perf/x86: Move event pointer setup earlier in x86_pmu_enable()

2 months agoMerge tag 'objtool-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 22 Mar 2026 17:17:50 +0000 (10:17 -0700)] 
Merge tag 'objtool-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull objtool fixes from Ingo Molnar:
 "Fix three more livepatching related build environment bugs, and a
  false positive warning with Clang jump tables"

* tag 'objtool-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool: Fix Clang jump table detection
  livepatch/klp-build: Fix inconsistent kernel version
  objtool/klp: fix mkstemp() failure with long paths
  objtool/klp: fix data alignment in __clone_symbol()

2 months agoMerge tag 'locking-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 22 Mar 2026 16:57:20 +0000 (09:57 -0700)] 
Merge tag 'locking-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fix from Ingo Molnar:
 "Fix a sparse build error regression in <linux/local_lock_internal.h>
  caused by the locking context-analysis changes"

* tag 'locking-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  include/linux/local_lock_internal.h: Make this header file again compatible with sparse

2 months agoMerge tag 'irq-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 22 Mar 2026 16:55:58 +0000 (09:55 -0700)] 
Merge tag 'irq-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fix from Ingo Molnar:
 "Fix a mailbox channel leak in the riscv-rpmi-sysmsi irqchip driver"

* tag 'irq-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/riscv-rpmi-sysmsi: Fix mailbox channel leak in rpmi_sysmsi_probe()

2 months agoMerge tag 'driver-core-7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 21 Mar 2026 23:59:09 +0000 (16:59 -0700)] 
Merge tag 'driver-core-7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core fixes from Danilo Krummrich:

 - Generalize driver_override in the driver core, providing a common
   sysfs implementation and concurrency-safe accessors for bus
   implementations

 - Do not use driver_override as IRQ name in the hwmon axi-fan driver

 - Remove an unnecessary driver_override check in sh platform_early

 - Migrate the platform bus to use the generic driver_override
   infrastructure, fixing a UAF condition caused by accessing the
   driver_override field without proper locking in the platform_match()
   callback

* tag 'driver-core-7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core:
  driver core: platform: use generic driver_override infrastructure
  sh: platform_early: remove pdev->driver_override check
  hwmon: axi-fan: don't use driver_override as IRQ name
  docs: driver-model: document driver_override
  driver core: generalize driver_override in struct device

2 months agoftrace: Use hash argument for tmp_ops in update_ftrace_direct_mod
Jiri Olsa [Thu, 12 Mar 2026 12:37:38 +0000 (13:37 +0100)] 
ftrace: Use hash argument for tmp_ops in update_ftrace_direct_mod

The modify logic registers temporary ftrace_ops object (tmp_ops) to trigger
the slow path for all direct callers to be able to safely modify attached
addresses.

At the moment we use ops->func_hash for tmp_ops filter, which represents all
the systems attachments. It's faster to use just the passed hash filter, which
contains only the modified sites and is always a subset of the ops->func_hash.

Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Menglong Dong <menglong8.dong@gmail.com>
Cc: Song Liu <song@kernel.org>
Link: https://patch.msgid.link/20260312123738.129926-1-jolsa@kernel.org
Fixes: e93672f770d7 ("ftrace: Add update_ftrace_direct_mod function")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2 months agoring-buffer: Fix to update per-subbuf entries of persistent ring buffer
Masami Hiramatsu (Google) [Thu, 19 Mar 2026 09:12:19 +0000 (18:12 +0900)] 
ring-buffer: Fix to update per-subbuf entries of persistent ring buffer

Since the validation loop in rb_meta_validate_events() updates the same
cpu_buffer->head_page->entries, the other subbuf entries are not updated.
Fix to use head_page to update the entries field, since it is the cursor
in this loop.

Cc: stable@vger.kernel.org
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Ian Rogers <irogers@google.com>
Fixes: 5f3b6e839f3c ("ring-buffer: Validate boot range memory events")
Link: https://patch.msgid.link/177391153882.193994.17158784065013676533.stgit@mhiramat.tok.corp.google.com
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>