summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard
AgeCommit message (Collapse)Author
19 hoursMerge branch 'next' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
19 hoursMerge branch 'for-next' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git # Conflicts: # include/linux/mod_devicetable.h
20 hoursMerge branch 'for-linus' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
38 hoursInput: keyboard - use named initializers for acpi_device_idPawel Zalewski
Use a designated initializer for the acpi_device_id fields which makes the code more readable and consistent with how lists are initialized in the rest of the kernel code base. Also drop explicitly setting fields to 0 where it is redundant. Unify the list terminator to have a single space between the brackets and no trailing comma. Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> Link: https://patch.msgid.link/20261013-acpi-input-v1-1-53ad09ba82b7@thegoodpenguin.co.uk Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
38 hoursInput: maple_keyb - remove unused mdev->driver assignmentDmitry Torokhov
The driver field in struct maple_device is no longer used since commit 1795cf48b322 ("sh/maple: clean maple bus code") which removed the reading of this field. Remove the unused assignment to mdev->driver and the now unused mdrv variable in probe_maple_kbd. Assisted-by: Antigravity:gemini-3.5-flash Link: https://patch.msgid.link/20260703-b4-maple-cleanup-v1-13-41e424964da5@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
38 hoursInput: maple_keyb - remove redundant drvdata resettingDmitry Torokhov
The driver core automatically resets driver data to NULL on probe failures and device removal, so we can remove it from the driver. Assisted-by: Antigravity:gemini-3.5-flash Link: https://patch.msgid.link/20260703-b4-maple-cleanup-v1-9-41e424964da5@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
38 hoursInput: maple_keyb - implement open and close methodsDmitry Torokhov
Instead of polling the keyboard constantly from probe, implement open and close methods for the input device to only start polling when the device is actually opened by userspace, and stop polling when it is closed. This matches the behavior of maplemouse and maplecontrol drivers. Assisted-by: Antigravity:gemini-3.5-flash Link: https://patch.msgid.link/20260703-b4-maple-cleanup-v1-7-41e424964da5@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
39 hoursInput: maple_keyb - fix key press detectionDmitry Torokhov
The key press detection logic was using ptr instead of !ptr (where ptr is the result of memchr searching for the new key in the old keys). If ptr is not NULL, it means the key was already pressed in the previous report, so it is not a new press. If ptr is NULL, it means the key was not pressed before, so it is a new press. Using ptr instead of !ptr caused new presses to be ignored in the first poll cycle (only reported in the second cycle if still held, because then it was in 'old'), and caused redundant press events to be sent on every subsequent poll while the key was held. Fix this by using !ptr for press detection, matching the release detection logic. Fixes: b11d2127c489 ("Input: add support for SEGA Dreamcast keyboard") Assisted-by: Antigravity:gemini-3.5-flash Tested-by: Florian Fuchs <fuchsfl@gmail.com> Link: https://patch.msgid.link/20260703-b4-maple-cleanup-v1-2-41e424964da5@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
3 daysMerge branch 'soc/arm' into for-nextArnd Bergmann
* soc/arm: MAINTAINERS: Drop arm64 dts/intel path from ARM/SOCFPGA ARCHITECTURE ARM: tegra: Fix Trun -> Turn typo ARM: vexpress: fix device_node refcount leak in vexpress_smp_dt_prepare_cpus() ARM: vexpress: fix device_node refcount leak in vexpress_flags_set() MAINTAINERS: Change ARM Visconti5 architecture maintenance status to Odd Fixes ARM: mvebu: fix Cortex-A9 errata selection for Armada 38x ARM: OMAP2+: remove unused ctrl_module_wkup_44xx.h header ARM: EXYNOS: Replace __ASSEMBLY__ with __ASSEMBLER__ ARM: s3c: crag6410: use software nodes/properties to set up GPIO keys Input: samsung-keypad - remove support for platform data ARM: s3c: crag6410: switch keypad device to software properties ARM: s3c: register and attach software nodes for Samsung gpio_chips Input: samsung-keypad - handle compact binding dt-bindings: input: samsung,s3c6410-keypad: introduce compact binding ARM: imx6q: remove KSZ9021 PHY fixup ARM: imx: Fix suspend/resume crash with Clang CFI ARM: OMAP2+: Replace __ASSEMBLY__ with __ASSEMBLER__ soc: imx: Replace __ASSEMBLY__ with __ASSEMBLER__ in header file ARM: imx: Replace __ASSEMBLY__ with __ASSEMBLER__
5 daysInput: st-keyscan - disable interrupt while clock is gatedDmitry Torokhov
The driver gates off its peripheral clock when the input device is not open and during system suspend without wakeup. However, the interrupt is requested without IRQF_NO_AUTOEN and remains unmasked when the device is stopped. If a pending or spurious interrupt fires while the clock is disabled, keyscan_isr() will attempt to read the matrix state register with the clock gated off, triggering a bus fault (synchronous external abort) and panicking the system. Request the interrupt with IRQF_NO_AUTOEN, enable it in keyscan_start(), and disable it in keyscan_stop() prior to gating the clock. Drop the pointless clock enable/stop sequence in keyscan_probe(), leaving the clock gated and hardware untouched until the device is opened. Fixes: 062589b13991 ("Input: add st-keyscan driver") Reported-by: sashiko-bot@kernel.org Assisted-by: LLM Link: https://patch.msgid.link/apK-PZ5c97mCxBSC@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: tegra-kbc - drop redundant kbc->idev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes kbc->idev->dev.parent to the supplied parent device, so the explicit assignment in tegra_kbc_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: tc3589x-keypad - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in tc3589x_keypad_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: stmpe-keypad - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in stmpe_keypad_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: st-keyscan - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in keyscan_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: qt1050 - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in qt1050_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: pxa27x-keypad - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in pxa27x_keypad_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: mpr121-touchkey - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in mpr_touchkey_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: max7359-keypad - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in max7359_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: lpc32xx-keys - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in lpc32xx_kscan_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: jornada720-kbd - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in jornada720_kbd_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: imx-keypad - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in imx_keypad_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: cros-ec-keyb - drop redundant idev->dev.parent assignmentsDmitry Torokhov
devm_input_allocate_device() already initializes idev->dev.parent to the supplied parent device, so the explicit assignments in cros_ec_keyb_register_bs() and cros_ec_keyb_register_matrix() are redundant. Remove them. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: clps711x-keypad - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in clps711x_keypad_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: bcm-keypad - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in bcm_kp_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: adp5520-keys - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in adp5520_keys_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: applespi - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignments in applespi_register_touchpad_device() and applespi_probe() are redundant. Remove them. Reported-by: sashiko-bot@kernel.org Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 daysInput: gpio_keys - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in gpio_keys_probe() is redundant. Remove it. Reported-by: sashiko-bot@kernel.org Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 daysInput: matrix_keypad - propagate error code from matrix_keypad_build_keymap()Dmitry Torokhov
When switching to managed resources in matrix_keypad_probe(), the error return path after matrix_keypad_build_keymap() was replaced with a hardcoded -ENOMEM instead of propagating the real error code. Return the original error so the actual failure reason is preserved. Fixes: 7d0f351da460 ("Input: matrix_keypad - switch to using managed resources") Reported-by: sashiko-bot@kernel.org Assisted-by: LLM Link: https://patch.msgid.link/ascss_vYXDPXIxmn@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
13 daysMerge tag 'input-for-v7.3-rc5' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - A fix for the Samsung S6SY761 touchscreen driver to power on the controller before unmasking interrupts during resume and to re-enable touch sensing when the device is open - Updates to the Synaptics touchpad driver to enable SMBus/RMI4 mode on Lenovo ThinkPad T490 and restrict the ThinkPad T440p InterTouch disable quirk to LEN0036 so that ThinkPad L440 retains SMBus support - A quirk for the AT keyboard driver (atkbd) to skip keyboard deactivation on Lenovo IdeaPad Slim 3 15IWC11 so the internal keyboard functions properly - A DMI quirk for the i8042 controller to disable active multiplexing on Fujitsu LIFEBOOK U7410, preventing the internal keyboard and touchpad from dying shortly after boot. * tag 'input-for-v7.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: atkbd - skip deactivate for Lenovo IdeaPad Slim 3 15IWC11 Input: s6sy761 - fix resume ordering and restore sensing Input: synaptics - limit T440p InterTouch quirk to LEN0036 Input: i8042 - add nomux quirk for Fujitsu LIFEBOOK U7410 Input: synaptics - add LEN205b entry to smbus_pnp_ids for ThinkPad T490
13 daysInput: atkbd - skip deactivate for Lenovo IdeaPad Slim 3 15IWC11Martino Papero
The internal keyboard on the Lenovo IdeaPad Slim 3 15IWC11 (83RR) does not work correctly with the default i8042 settings. Using i8042.nopnp=1 and i8042.dumbkbd=1 restores keyboard input, but prevents the Caps Lock LED from working. Using i8042.nopnp=1 alone does not fix the keyboard. The laptop works correctly when atkbd_deactivate_fixup is used instead. Add a DMI quirk for the 83RR to enable it. This was tested without any i8042 command-line parameters. Keyboard input and the Caps Lock LED work correctly, including after suspend and resume and after a cold boot. Link: https://lore.kernel.org/all/4f43465f-98ba-4722-8e29-03df20315369@kernel.org/ Signed-off-by: Martino Papero <martino.papero@lcb.to.it> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Link: https://patch.msgid.link/c0b597b8-e7ad-4fba-a2bb-5d252e3dfbd3@lcb.to.it Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-09-21Input: atkbd - use __assign_bit() where applicablePeng Fan
Convert open-coded if/else with __set_bit/__clear_bit to the __assign_bit API. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20260919130741.3041442-1-peng.fan@oss.nxp.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-09-20Merge tag 'input-for-v7.3-rc3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - Fixes for evdev and input compat handling to zero-initialize on-stack absinfo and force-feedback effect structures before partial or compat copies from userspace, preventing kernel stack memory disclosure - Fixes for the Synaptics RMI4 driver to prevent an out-of-bounds read when writing multi-chunk blocks over SMBus and to avoid a NULL pointer dereference during suspend/resume when the RMI device is unbound - Fixes for the soc_button_array driver to propagate -EPROBE_DEFER on non-Bay Trail/Cherry Trail platforms (fixing broken power and volume buttons on the Microsoft Surface Pro 11) and to validate the ACPI package element count before dereferencing - A fix for the adp5588-keys driver to cache the initial GPIO hardware state before registering the gpiochip so pre-configured pin states are not clobbered by GPIO hogs during registration - A fix for the cyttsp5 touchscreen driver to clamp the device-supplied HID report size before copying into the response buffer, preventing a buffer overflow - A fix for the HP SDC serio driver to use timer_shutdown_sync() on module exit so the periodic kicker timer cannot rearm itself during teardown - A fix for the eeti_ts touchscreen driver to export its OF module alias so the module autoloads on Device Tree platforms - Updates to the xpad joystick driver adding support for the Victrix Pro BFG controller and Azeron devices, and fixing the device type classification for the PDP Marvel Xbox 360 controller - Quirks for the i8042 and atkbd drivers to keep the built-in keyboards functional on the Acer Aspire Go 15 AG15-42P and Xiaomi Redmi Book Pro 16 2026 - A quirk for the Synaptics PS/2 touchpad driver disabling SMBus InterTouch on the Lenovo ThinkPad T440p (board ID 2722) so the touchpad and TrackPoint respond immediately at boot - Other minor updates and documentation fixes, including reading the "ti,poll-period" property as u32 in tsc2007, adding the mt6572 compatible to the MediaTek keypad Device Tree binding, fixing an attribute name typo in the trackpoint sysfs ABI documentation, and documenting that no new LED codes should be added to the input subsystem * tag 'input-for-v7.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: hp_sdc - shut down kicker timer on module exit Input: xpad - add support for Victrix Pro BFG Controller Input: tsc2007 - read "ti,poll-period" as u32 Input: trackpoint - fix the inertia attribute name in the ABI document Input: eeti_ts - publish the OF module alias Input: xpad - add support for Azeron devices Input: xpad - fix PDP Marvel Xbox 360 controller Input: document that no new LED codes should be added Input: soc_button_array - check btns_desc->package.count Input: soc_button_array - fix MS Surface Pro 11 probe failure Input: i8042 - add quirk for Acer Aspire Go 15 AG15-42P Input: synaptics - disable InterTouch on ThinkPad T440p (board id 2722) Input: cyttsp5 - clamp the HID report size before memcpy Input: zero ff_effect before compat copy in input_ff_effect_from_user Input: evdev - zero absinfo before partial copy in EVIOCSABS Input: synaptics-rmi4 - fix GPF in suspend and resume when unbound Input: rmi_smbus - fix out-of-bounds read in rmi_smb_write_block() Input: atkbd - skip deactivate for Xiaomi Redmi Book Pro 16 2026 dt-bindings: input: mediatek,mt6779-keypad: add mt6572 Input: adp5588-keys - cache GPIO state before registering the gpiochip
2026-09-04treewide: refresh kmalloc_obj() conversionsKees Cook
This is another run of the Coccinelle script for converting kmalloc() family of allocations to kmalloc_obj() via the existing rules in scripts/coccinelle/api/kmalloc_objs.cocci This catches both the set of kmalloc() uses added since the first kmalloc_obj() conversions in v7.0 and adds a large group missed in the first pass due to Coccinelle not interacting well with the cleanup.h scoped_...() family of macros[1]. I worked around this with spatch's "--macro-file" argument to a file with all the scoped_...() macros mapped to Coccinelle's YACFE_ITERATOR[2] as that was the closest viable control flow indicator I could find. Build tested allmodconfig on x86, arm64, arm, loongarch, mips, powerpc, riscv, and s390 with no new warnings. Link: https://lore.kernel.org/lkml/202609021314.8A9C0B8@keescook/ [1] Link: https://github.com/coccinelle/coccinelle/blob/master/standard.h [2] Signed-off-by: Kees Cook <kees+treewide@kernel.org>
2026-09-04Input: samsung-keypad - remove support for platform dataDmitry Torokhov
Because there are no more users of samsung_keypad_platdata left in the kernel remove support for it from the driver. The driver supports generic device properties so all configuration should be done using them instead of a custom platform data. Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/20260711-samsung-kp-v3-5-b2fcaba77aff@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2026-09-04Input: samsung-keypad - handle compact bindingDmitry Torokhov
Add support for standard matrix keymap binding (in addition to the existing verbose binding with a sub-node for each key). This will allow easier conversions from platform data to device properties when using static device properties. Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/20260711-samsung-kp-v3-2-b2fcaba77aff@gmail.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2026-08-28Input: atkbd - skip deactivate for Xiaomi Redmi Book Pro 16 2026Alexei Turtanov
The internal keyboard of the Xiaomi Redmi Book Pro 16 2026 (board TM2425) does not work: atkbd_probe() succeeds and every command is ACKed, but no scancodes ever arrive afterwards. Testing on the hardware through serio_raw shows that ATKBD_CMD_RESET_DIS (0xF5) is the culprit. After 0xF5 the embedded controller keeps ACKing commands but stops delivering scancodes, and neither ATKBD_CMD_ENABLE (0xF4) nor ATKBD_CMD_RESET_BAT (0xFF) bring them back. Only re-enabling the keyboard interface at the controller level (i8042 command 0xAE, or rewriting the command byte as i8042_port_close() does) revives it. Running the init sequence without 0xF5 (0xED 0x00, 0xF3 0x00, 0xF4) keeps the keyboard working. 'i8042.dumbkbd=1' also works around this, but then the driver never writes to the keyboard and the LEDs cannot be controlled. Use the existing atkbd_deactivate_fixup quirk instead, as done for the sibling TM2424 by commit 3a046db33bb9 ("Input: atkbd - skip deactivate for Xiaomi Book Pro 14's internal keyboard"). Tested on v7.2: keyboard, Caps Lock LED and s2idle suspend/resume all work. DMI: XIAOMI REDMI Book Pro 16 2026/TM2425, BIOS RMAPT6B0P0909 05/22/2026 Fixes: 9cf6e24c9fbf ("Input: atkbd - do not skip atkbd_deactivate() when skipping ATKBD_CMD_GETID") Cc: stable@vger.kernel.org Signed-off-by: Alexei Turtanov <9alexei9@gmail.com> Link: https://patch.msgid.link/20260828112239.18081-1-9alexei9@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-08-27Input: st-keyscan - improve probe error handlingbui duc phuc
Use dev_err_probe() for devm_clk_get() to prevent log spam when probe returns -EPROBE_DEFER. Drop the redundant error message after devm_request_irq(), since the helper already reports request failures internally. Return the original error from platform_get_irq() instead of replacing it with -EINVAL. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260727101125.28291-2-phucduc.bui@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-08-27Input: snvs_pwrkey - tidy up error reporting in probebui duc phuc
Do not print the error twice when acquiring clock fails and drop the redundant error message after devm_request_irq(), as the helper already reports request failures internally. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260727101125.28291-1-phucduc.bui@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-08-26Input: adp5588-keys - cache GPIO state before registering the gpiochipAlvin Šipraga
So as not to clobber any pre-programmed GPIO state in the execution of its gpiochip ops, the driver caches things during probe time. However, since those ops can be called both during and immediately after the call to devm_gpiochip_add_data(), it is imperative that things are cached before that. That's not the case right now, so reorder the two steps to prevent any clobbering. In the concrete example which motivated this change, a bootloader was preconfiguring an important GPIO output to HIGH before booting the kernel. Linux would then inadvertently set that output to LOW while configuring a GPIO hog on a discrete GPIO line within the same 8-bit bank (because the cached value was 0=LOW). Fixes: ba9f507a1bea ("Input: adp5588-keys - export unused GPIO pins") Signed-off-by: Alvin Šipraga <alvin.sipraga@analog.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Link: https://patch.msgid.link/20260818-adp5588-gpio-cache-v1-1-650a2674fc0d@analog.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-08-25Merge tag 'char-misc-7.3-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc/IIO/etc driver updates from Greg KH: "Here is the big set of char, misc, iio, counter, fpga, and other small driver subsystems for 7.3-rc1. Overall, due to some driver removals we only added a bit more code than removed, which was a nice change. Highlights in this merge request are: - Loads of IIO driver updates and additions - binder driver updates (more on that below...) - Removal of the SGI XP and GRU drivers as they are not used anymore and turn out to be pretty insecure overall - Removal of the obsolete ibmasm driver as it's not being used anymore - Coresight driver updates and additions - Mei driver udpates - Counter driver updates - FPGA driver updates - ICC driver updates - lots and lots of other tiny driver updates to resolve reported issues All of these have been in linux-next for a while" * tag 'char-misc-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (513 commits) iio: chemical: atlas-sensor: use iio_trigger_poll_nested() to fix remove UAF iio: adc: pac1921: fix wrong channel used in trigger handler read iio: light: gp2ap002: re-enable irq if runtime suspend fails iio: light: gp2ap002: Fix unbalanced runtime PM on repeated event writes iio: light: apds9306: fix PM reference leak in apds9306_read_data() iio: gyro: mpu3050: fix sign of raw angular velocity readings iio: srf04: fix pm_runtime handling on probe error path iio: adc: ad4080: configure backend data size iio: adc: adi-axi-adc: add data size support for AD408X backend iio: chemical: atlas-sensor: fix PM reference leak in buffer postenable iio: dac: ad5446: fix OF module device table iio: light: opt4001: Fix reversed GENMASK() arguments in fault count mask iio: light: opt4001: Reject integration times with a non-zero seconds part iio: light: opt4001: Fix incompatible pointer type passed to div_u64_rem() iio: light: opt4001: Fix power down clearing bits of the wrong register iio: light: opt4060: Fix incorrect register name in threshold read error message iio: light: opt4060: Fix pointer type passed to div_u64_rem() iio: light: opt4060: Reject integration times with a non-zero seconds part iio: light: ltrf216a: fix runtime PM reference leak in error path iio: pressure: dps310: fix NULL pointer dereference on ACPI probe ...
2026-08-19Merge tag 'gpio-updates-for-v7.3-rc1-v2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "GPIO core: - extend the gpio-regmap abstraction layer with more features allowing users to override configuration setting, translate register values and masks and enable/disable interrupts - extend GPIO kunit tests with suites verifying probe ordering by software node devlink support and software node hogs - shrink GPIO kunit initialization code - coding style updates (remove commas from sentinels where applicable) - with all users now converted treewide to using real firmware node links for software node GPIO lookup: remove the deprecated label-matching mechanism from from GPIO core - drop redundant return value check of nonseekable_open() in gpiolib-cdev - use IRQ trigger helpers where applicable Driver updates: - refactor error paths and logging in gpio-nomadik - use more modern interfaces for getting resources in gpio-rockchip, gpio-bt8xx and gpio-pca9570 - add missing MODULE_DEVICE_TABLE() to gpio-sifive and gpio-vf610 - drop unused FILONOFF macro from gpio-rcar - extend build coverage of ioport GPIO drivers with COMPILE_TEST=y - only enable the gpio-rtd driver by default with ARCH_REALTEK=y to avoid bloating the build - refactor coding style in several drivers - use correct endianess translation in gpio-pcf85x - add wake-up interrupt support to gpio-mvebu - apply initial value in direction output setter in gpio-by-pinctrl Misc: - replace linux/gpio.h inclusions treewide with linux/gpio/legacy.h which now exports all the deprecated APIs - select GPIOLIB_LEGACY in Kconfig where required treewide - use software nodes for gpio-keys in MFD drivers Devicetree bindings: - describe the realtek rtd1625 GPIO controller - document new models for gpio-pca95xx and gpio-cadence - document new property in gpio-rockchip" * tag 'gpio-updates-for-v7.3-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (61 commits) gpio: gpio-by-pinctrl: Apply initial value in direction output wrapper dt-bindings: gpio: rockchip,gpio-bank: Add rockchip,grf property gpio: Use IRQ trigger mask helpers gpio: allow COMPILE_TEST for IOPORT drivers gpio: realtek: Add driver for Realtek DHC RTD1625 SoC gpio: regmap: Add IRQ enable/disable helpers gpio: regmap: Add set_config callback gpio: regmap: Add value_xlate callback gpio: regmap: Add gpio_regmap_operation to extend reg_mask_xlate callback gpio: regmap: Order kernel-doc descriptions with the actual appearance gpio: regmap: Apply default resource callbacks for regmap IRQ chip gpio: regmap: Provide default IRQ resource request and release callbacks Revert "gpio: realtek: Add driver for Realtek DHC RTD1625 SoC" gpib: gpio: replace linux/gpio.h inclusion Input: matrix_keyboard - replace linux/gpio.h inclusion phy: replace linux/gpio.h inclusions pcmcia: replace linux/gpio.h inclusions ASoC: replace linux/gpio.h inclusions mfd: replace linux/gpio.h inclusions sh: replace linux/gpio.h inclusions ...
2026-08-19Merge tag 'iio-for-7.3a' of ↵Greg Kroah-Hartman
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: IIO new device support, features, cleanup for 7.3 Includes a merge of 7.2-rc2 to pick up the changes around mod_devicetable.h and reduce resulting conflicts around includes. New device support ------------------ adi,ad3530R - Add support for the AD3532R and AD3532 16 channel DACs. adi,ad4080 - Add support for the AD4883 ADC. adi,ad5686 - Add support for AD5313R, AD5317R, AD5674, AD5687R, AD5689, AD5689R DACs over SPI - Add support for AD5316R, AD5674, AD5697R and AD5696 DACs over I2C - Significant driver refactoring prior to these additions, partly to reduce bus traffic and to add triggered buffer and gain control support. An earlier set added support for missing supplies, reset and LDAC GPIO. adi,adf41513 - New driver to support this PLL frequency synthesizer that runs up to 26.5 GHz. - Included infrastructure to handle higher precision attributes with extensive tests adi,ltc2378-20 - New driver supporting LTC2338, LTC2364, LTC2367, LTC2368, LT2369, LTC2370 LTC2376, LTC2377, LTC2378, LTC2379 and LTC23980 ADCs with both high speed capture via appropriate backend and conventional triggered buffer SPI capture. invensense,icm42607 - New driver for this IMU. mediateck,mt6323 - New driver for this PMIC ADC. microchip,mcp47a1 - New driver for this I2C 6 bit DAC. nxp,mcf54415-dac - New driver for this DAC found in NXP SoCs. qst,qmc5884l - New driver for this 3 axis magnetometer. Included dt vendor entry for qst. qst,qmc6308 - New driver for this 3 axis magnetometer. sensiron,slf3s - New driver for this liquid flow sensor. Includes adding IIO_VOLUMEFLOW channel type. st,vl53l1x - Refactors to improve readability. ti,ads112c14 - New driver supporting the ADS112C14 and ADS122C14 ADCs. These bring some new ABI for input chopping, particular useful for resistive sensors like thermocouples or Wheatstone bridges. - Support CRC8 detection of corruption on the bus. - Support buffered reads. ti,tmp117 - (trivial) Add support for the tmp119 temperature sensor. xilinx,versal-sysmon - New ADC driver for this block found on various FPGAs including various bus interfaces, threshold and oversampling support. dt binding updates ------------------ new shared bindings - excitation-channels and excitation-current-nanoamp allow per channel specification of currents used for resistive sensor measurement. - reference-sources property to allow selection of a per channel reference. rockchip,saradc - Add RV1106 which is compatible with the RV3588. Features -------- buffer-dmaengine - Allow cyclic buffers, useful for repeating sequence generation with DACs. devantech,dmard09 - Implement read back of channel scale - previously interface always returned an error. hid,sensors-als - Enable separate channel scaling for hardware that supports it. invensense,timestamp library - Various precision improvements. invensense,icm42600 - Add support for hwfifo watermark interfaces. taos,tcs3472 - Support wait time and sampling frequency control. Cleanups, minor fixes --------------------- Minor cleanups not mentioned at all in this summary such as white space fixes or typos. Affecting various drivers - Cleanup of conditionals that had no affect. - Drop some runtime pm local wrappers as now runtime_pm does the mark_last_busy part inside the put, these provide no useful code deduplication or readability advantages over directly calling the runtime_pm functions. - Return 0 from write_raw() on success. - Use of dev_err_probe() to simplify code and sometimes provide useful info for deferred probe debugging. - Drop some redundant error prints where the called function already provides information on errors. - Make some read only arrays in functions static. - Fix up missing handling of regcache_sync() errors. - Drop some false kernel-doc markings. - Add missing MODULE_DEVICE_TABLE for some of_match_id tables. - Use local variables for things like the struct device to shorten and improve readability of code. - Drop some unused structure elements. - Reorder dds.h macro parameters to be inline with others. - Header reorders and IWYU. Often part of a more significant series. - Remove abstractions designed to allow a driver to support multiple device types, when they have been around a long time and only the original part showed up. - Initialize spi_device_id arrays using member names following dropping of driver data from drivers that didn't actually use it. - Catch up with i2c_device_id tables added since previous effort to use named initializers for all those. - Use kernel types in a few places instead of standard C ones or bare unsigned. Misc - Update Xilinx AMS maintainer. - Update email address for Maxwell Doose. - Update email address for Siratul Islam. - Update email address for Tomasz Duszynski and re-add Tomasz to various maintainer entries. Docs - Encourage use of differential channel naming even when there is no flexibility in input to differential pair mapping. Intended to provide a strong signal to userspace that a channel is differential. adi,ad_sigma_delta - Allow COMPILE_TEST without any users. adi,ad2s1201 - Refactor trigger handler to avoid mix of guard() and goto. adi,ad5686 - Avoid potential NULL dereference is user forces a driver bind. adi,ad5696 - Add a couple of missing entries to the of_match_id table and update binding to match. atmel,ad91_adc - Use const char * for DT string property allowing a cast to be dropped. avia,hx711 - Various refactors and cleanup to enable support of additional parts (to come) - Add missing supply and gpio dt-bindings. bosch,bmc150 - Harden against device reporting too large a FIFO sample count. - Use FIELD_PREP() / FIELD_GET() to improve readability. freescale,fxls8962af - Harden against device reporting too large a FIFO sample count. hid-sensors-* - Reorder probe to not expose userspace interfaces until the rest of the setup is done to avoid potentially dropping data. honeywell,abp2030pa - Drop an unreachable return. invensens,icm45600 - Harden against bad value of FIFO sample count from device. - Use i2c_match_data if firmware table sourced match data isn't available. nxp,mpl1115 - Ensure runtime_pm is balanced on error in probe. rohm,bm1390 - Make the driver slightly more likely to recover from transient errors. sensiron,sgp30 - Handle thread creation errors. st,lsm6dsx - Update the enable mask when doing sensor fusion to avoid incorrect fifo data handling. st,stm32-dfsdm - Treat dt flags as booleans. ti,ads1015 - Switch to devm helpers which simplified code and closed a resource leak. ti,opt3001 - Split complicated opt3001_get_processed() logic into irq an no irq helper functions. - Use devm to simplify code. - Use guard() to simplify code. - Reorder probe so final call exposes userspace interfaces. - Various other more minor cleanup taos,tsl2772 - Fix calibscale readback to check right channel type. taos,tsl2583 - Use sysfs_emit() and sysfs_emit_at() to replace open coded equivalents. * tag 'iio-for-7.3a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (232 commits) iio: dac: mcp47a1: add support for new device dt-bindings: iio: dac: add support for mcp47a1 iio: Update email for Maxwell Doose iio: imu: st_lsm6dsx: Update enable mask when using sensor fusion iio: light: cm32181: return zero after writing calibscale iio: flow: add Sensirion SLF3S liquid flow sensor driver iio: core: add IIO_VAL_DECIMAL64_FEMTO format type dt-bindings: iio: flow: add Sensirion SLF3S liquid flow sensor iio: types: add IIO_VOLUMEFLOW channel type iio: ABI: Encourage differential voltage ABI usage iio: adc: ltc2378: Add support for LTC2338-18 iio: adc: ltc2378: Enable triggered buffer data capture iio: adc: ltc2378: Enable high-speed data capture iio: adc: ltc2378: Add support for LTC2378-20 and similar ADCs dt-bindings: iio: adc: Add ltc2378 iio: magnetometer: ak8974: remove conditional return with no effect iio: light: tsl2583: remove conditional return with no effect iio: adc: rcar-gyroadc: remove rcar_gyroadc_set_power() helper iio: light: vcnl4000: remove vcnl4000_set_pm_runtime_state() helper iio: light: vcnl4035: remove vcnl4035_set_pm_runtime_state() helper ...
2026-08-18Merge tag 'v7.2' of ↵Bartosz Golaszewski
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into gpio/for-next Linux 7.2
2026-08-14Merge branch 'next' into for-linusDmitry Torokhov
Prepare input updates for 7.3 merge window.
2026-08-08Merge tag 'input-for-v7.2-rc6' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - Fixes for information leaks and OOB accesses across several drivers, including evdev, focaltech, edt-ft5x06, iforce, and cs40l50-vibra - Improvements to the synaptics-rmi4 driver to properly handle F54 worker errors and prevent buffer overflows - Input validation fixes in the hynitron_cstxxx touchscreen driver to prevent issues with invalid finger IDs and touch counts - Fixes for use-after-free and initialization bugs in the byd mouse and psxpad-spi drivers - New quirks for the atkbd driver to make keyboard work on HONOR and Xiaomi laptops - Support for the ZENAIM LEVERLESS controller in the xpad driver. * tag 'input-for-v7.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: evdev - sanitize event type index when fetching event masks Input: synaptics-rmi4 - propagate F54 worker errors to V4L2 queue Input: synaptics-rmi4 - block s_input when F54 queue is busy Input: synaptics-rmi4 - bound the F54 report size to the allocated buffer Input: synaptics-rmi4 - zero report size on F54 work error Input: synaptics-rmi4 - fix F55 transmitter electrode count typo Input: hynitron_cstxxx - validate touch count and finger IDs Input: evdev - fix information leak in evdev_pass_values() fixp-arith: convert comments to kernel-doc format Input: focaltech - fix array out-of-bounds in focaltech_process_rel_packet Input: atkbd - skip deactivate for HONOR ZQC-P Input: atkbd - skip deactivate for Xiaomi Book Pro 14's internal keyboard Input: iforce - validate input packet lengths Input: psxpad-spi - set driver data before use Input: cs40l50-vibra - validate custom data from user space Input: xpad - add support for ZENAIM LEVERLESS Input: edt-ft5x06 - ignore contacts with an out-of-range slot id Input: byd - synchronize timer deletion before freeing private data
2026-08-05Input: gscps2 - supply PA-RISC keyboard keymap via device propertyDmitry Torokhov
Instead of hardcoding PA-RISC specific keycode tables into atkbd via compile-time inclusion, have the gscps2 PS/2 port driver attach a linux,keymap software node device property to the serio device when a keyboard port is registered. This allows atkbd to dynamically fetch and apply the custom keymap when probing the port using generic firmware property helpers, removing architecture-specific hacks from generic keyboard driver code. Co-locate the keymap definitions with the serio port driver by moving hpps2atkbd.h from drivers/input/keyboard/ to drivers/input/serio/. To handle the five conflicting keys on RDI PrecisionBook laptops without runtime model string checks or duplicate keymap tables in memory, add CONFIG_SERIO_GSCPS2_RDI_KEYCODES to drivers/input/serio/Kconfig and resolve the conflicting keycodes at compile time via preprocessor macros. Link: https://patch.msgid.link/am_9BvmZu9g4RlUM@google.com Acked-by: Helge Deller <deller@gmx.de> Tested-by: Helge Deller <deller@gmx.de> Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-08-04Input: pmic8xxx-keypad - remove conditional return with no effectSang-Heon Jeon
Both branches of the check return the same value, so the check has no effect. Remove it and return the value directly. This is the result of running the Coccinelle script from scripts/coccinelle/misc/cond_return_no_effect.cocci. Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Link: https://patch.msgid.link/20260729171001.260698-2-ekffu200098@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-08-02Input: samsung-keypad - use pm_runtime_active guardDmitry Torokhov
Simplify the driver by using the block-scope guard(pm_runtime_active) instead of manually invoking pm_runtime_get_sync() and pm_runtime_put(). Assisted-by: Antigravity:gemini-3.5-flash Link: https://patch.msgid.link/20260713-samsung-kp-irq-v2-3-acc84b6daf9a@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-08-02Input: samsung-keypad - keep interrupt disabled while closedDmitry Torokhov
The driver requests the interrupt during probe, which by default enables it. If the bootloader left the keypad interrupts enabled, or if a spurious interrupt fires early before the driver is fully initialized and clocks are enabled, the interrupt handler will attempt to read registers and may cause a synchronous external abort. Fix this by requesting the interrupt with IRQF_NO_AUTOEN, keeping it disabled during probe. Enable the interrupt in samsung_keypad_start() when the device is opened and ready, and disable it in samsung_keypad_stop() when the device is closed. Remove the redundant re-enabling of the interrupt at the end of samsung_keypad_stop(). Additionally, manually clear the pending interrupt status during system resume when the device is closed to avoid immediate resume. Fixes: 0fffed27f92d ("Input: samsung-keypad - Add samsung keypad driver") Assisted-by: Antigravity:gemini-3.1-pro Link: https://patch.msgid.link/20260713-samsung-kp-irq-v2-2-acc84b6daf9a@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-08-02Input: samsung-keypad - clean up wakeup configuration logicDmitry Torokhov
When checking if the device can wake the system, we should pull the device_may_wakeup() check to the caller instead of repeating it inside the toggle_wakeup() handler. Furthermore, when configuring the wakeup, we should safely ensure we write to the registers in the correct order: configure the interrupt receiver before enabling the peripheral's wake functionality, and vice-versa. Assisted-by: Antigravity:gemini-3.1-pro Link: https://patch.msgid.link/20260713-samsung-kp-irq-v2-1-acc84b6daf9a@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>