214 Commits

Author SHA1 Message Date
Kate Wang
0e6c2aedaf drivers: input: Add TMA525B capacitive touch controller driver
This commit adds support for the Parade Tech TMA525B capacitive touch
controller. The driver supports both interrupt-driven and polling modes,
and can handle up to 4 simultaneous touch points.

Key features:
- I2C communication interface
- Multi-touch support (up to 4 touch points)
- Interrupt mode with GPIO callback support
- Polling mode with timer
- Power management support with PM notifier
- Reset and power control via GPIO
- Touch event tracking (down, contact, up)

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2026-01-20 14:36:06 -05:00
Camille BAUD
fd9b0b81b7 drivers: input: Add CH9350L USB keyboard driver
Adds a driver that allows using CH9350 as a USB keyboard interface chip

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-01-20 14:35:50 -05:00
Peter Johanson
a17503cb17 drivers: input: Add sleep-mode-enable property for Pinnacle
Add a new sleep-mode-enable property for the Cirque Pinnacle input driver,
to enable the sleep-mode for those peripherals, which will go into a lower
power state after 5 seconds with no fingers detected.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2026-01-18 09:40:21 -06:00
Peter Johanson
fa7037ca71 input: pinnacle: Perform software reset on init
Don't rely on power-on-reset for the connected device, issue a software
reset on init to be sure we're reset before continuing.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2026-01-18 09:40:12 -06:00
Camille BAUD
1936dc6cc4 drivers: input: Introduce bflb IR RX driver
Introduces a driver for the IR receiver on BFLB socs

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-01-07 10:21:20 +01:00
Sylvio Alves
f8d2e00a0e includes: remove duplicated entries in zephyr-tree
Remove duplicated #include directives within the same
preprocessor scope across the Zephyr tree.

Duplicates inside different #ifdef branches are preserved
as they may be intentional.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-12-17 13:57:38 -05:00
Daniel Kampert
495bf16234 drivers: input: cst816s: Refactor errors and warnings
Add error code to error and warning log messages to
make debugging easier.

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2025-12-16 16:08:10 +00:00
Daniel Kampert
6a432cfb5e drivers: input: cst816s: Add motion interrupt
Add support for gesture / motion based interrupts
when INPUT_CST816S_EV_DEVICE is enabled.

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2025-12-16 16:08:10 +00:00
Daniel Kampert
11ff520ec7 drivers: input: cst816s: Add power management
Add power management support

Closes: #100300

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2025-12-16 16:08:10 +00:00
Sylvio Alves
b7b32944fc drivers: espressif: move ISRs into IRAM area
Most of Espressif drivers ISRs are already running in IRAM area, except
those in this PR. Move ISRs accordingly so we avoid any
interrupt miss when cache is disabled.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-12-15 07:27:10 -05:00
Matthias Alleman
158ec0384b drivers: input: input_chsc5x: configurable ic type verification
Add Kconfig option to skip or execute the verification of the ic
type. This adds a delay of 100ms to the initialization.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2025-12-12 09:56:30 -05:00
Matthias Alleman
7a662cac8b drivers: input: input_chsc5x: add delay after reset
The sensor requires at least 94ms of delay before starting
communication after a reset. This is not mentioned in the
datasheet but is arbitrarily defined.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2025-12-12 09:56:30 -05:00
Matthias Alleman
476483075c drivers: input: input_chsc5x: fix sda and scl being pulled low
The CHSC5X chip requires reads to be aligned to multiples of 4 bytes.
If the read length is not a multiple of 4, the device pulls SDA/SCL low
for about 140 ms. The IC_TYPE address is corrected to 0x80.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2025-12-05 13:39:48 +02:00
Fabian Blatz
0f07faa14b drivers: input: gt911: Add touchscreen common config
Adds the touchscreen common config to the gt911 controller.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-11-27 16:02:13 +01:00
Benjamin Cabé
9d23d32814 drivers: input: gt911: prefix all macros
macros with very generic name like DEVICE_ID are really not ideal so
prefix them all with GT911_.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-11-25 20:22:20 -05:00
Fabian Blatz
8c264d30ea drivers: input: chsc5x: Add INPUT_TOUCH_STRUCT_CHECK for config
Adds the missing INPUT_TOUCH_STRUCT_CHECK for the config struct, to harden
against member reordering.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-11-24 15:27:41 -05:00
Fabian Blatz
421a4232ee drivers: input: Add input-touch assert for inversion without dimensions
Adds an assert to inform the user of possible coordinate wrap around
due to missing screen dimension configurations.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-11-24 15:27:41 -05:00
Fabian Blatz
a7659d8460 drivers: input: cst816s: Default to interrupt if irq-gpio available
Changes the default value of the INPUT_CST816S_INTERRUPT flag to default to
true if the there is a compatible with the irq-gpio property enabled.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-11-20 17:15:22 +00:00
Peter Johanson
eace19a59e drivers: input: Support invert x/y in rel mode
Despite the datasheet stating otherwise, the Pinnacle based trackpads can
have their X/Y data inverted when operating in relative mode, so set those
configs in all modes during init.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2025-11-20 06:01:35 -05:00
Atakan Demirtaş
20337689a1 drivers: input: vs1838b: Add noise filter for IR signals
Adds logic to shift out the first edge if the initial three edges do not
match a leading burst, improving noise resilience
in the IR input signal processing.

Signed-off-by: Atakan Demirtaş <atakan_demirtas@outlook.com>
2025-11-17 09:27:24 +02:00
Qingsong Gou
5c52f25f5a drivers: input: add ft6146 driver
add initial driver for ft6146

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2025-11-13 20:36:08 -05:00
Anas Nashif
303af992e5 style: fix 'if (' usage in cmake files
Replace with 'if(' and 'else(' per the cmake style guidelines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-29 11:44:13 +02:00
Lin Yu-Cheng
ad320ee4f2 driver: input: implement input PM function
Add the pm device for rts5912 input driver

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-10-24 01:12:49 +03:00
Fabio Baltieri
b0b5c083fb input: use single evaluation clamp
Use single evaluation clamp for few input drivers. No reason not to,
make some sense for the input_kbd_matrix call since one of the arguments
is a function.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-22 15:54:25 +03:00
Minh Tang
4c74ff8a0b drivers: ctsu: Add support CTSU driver for RX MCUs
Add support for Capatitive Touch Sensing Unit driver for RX MCUs

Signed-off-by: Minh Tang <minh.tang.ue@bp.renesas.com>
2025-10-14 12:52:50 +03:00
Alberto Escolar Piedras
19b181e58e drivers/input/linux_evdev: Close input file on exec
If the process does an exec() (or fork, or..) all descriptors are kept
open by default, unless O_CLOEXEC is set when opening them.
This is usefull for stdin/out/err so that new process is connected to
them, but it is very rare for it to be usefull for any other descriptor.

In general this leads to descriptors being kept open unnecessarily,
which either will block other process from getting them (for example
if the child survives the parent but it does something else).
Or for a "leak" which unnecessarily uses descriptors and memory in the
child process.

Let's ensure we do not leak it for this component as we do not need it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-10-02 22:00:02 +02:00
Declan Snyder
570b445a61 drivers: Convert to use SPI macro without delay parameters
Convert all drivers and other consumers to use SPI macros without the
delay parameters.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-01 14:39:36 +03:00
Qiang Zhang
93edbeba94 drivers: input: Adapt to the latest SDK kpp driver
Get the KPP_keyPressScanning status value
to determine the stability of key data.
Update read_keys_old data update timing.

Signed-off-by: Qiang Zhang <qiang.zhang_6@nxp.com>
2025-09-17 08:43:05 +02:00
Qiang Zhang
2441e76ad0 driver: input: Add support for KPP driver.
Added support for KPP driver.

Signed-off-by: Qiang Zhang <qiang.zhang_6@nxp.com>
2025-08-27 09:47:10 +02:00
Sylvio Alves
34eb58c043 espressif: fix Kconfig style issues
Fix Kconfig style issues in Espressif files.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-08-21 18:41:52 +02:00
Pieter De Gendt
713603595b drivers: input: chsc5x: Add suspend/resume PM actions
Implement suspend and resume actions for the CHSC5X touch driver.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-08-13 14:32:44 +03:00
Ruibin Chang
3fc27e71d2 drivers: input: it8xxx2: resolve runtime assertion failure
When the kso[17:16] lines are enabled and `CONFIG_ASSERT` is
configured, the following error occurs: "Input cannot be
enabled for 'Open Drain', 'Open Source' modes without Output."
To address this, this commit configures kso16 and kso17 as
gpio output before applying the pinctrl settings.

Tested with: no abnormal keyscan occurs during
initialization

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2025-08-11 12:50:00 +03:00
Wai-Hong Tam
b4404b0340 input: it8xxx2_kbd: Respect kso_ignore_mask for all KSO pins
The kso_ignore_mask DTS property was not being fully applied in the
ITE IT8xxx2 keyboard driver:
 1. The driver performed direct writes to the KBS_KSOH2 register,
    which controls KSO[17:16]. This did not account for the
    kso_ignore_mask and could overwrite bits in the register that
    are used for other GPIO functions.
 2. The driver would attempt to initialize the GPIOs for KSO16 and
    KSO17 based solely on the col-size property. It ignored the
    kso_ignore_mask, which could lead to reconfiguring a pin that
    is intended for another purpose.

Signed-off-by: Wai-Hong Tam <waihong@google.com>
2025-08-06 12:13:16 +03:00
The Nguyen
9ae5b7efd9 drivers: input: initial support for renesas,ra-ctsu
First commit to add support for Renesas RA Capasitive Sensing Unit

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-07-29 11:19:20 +01:00
Matthias Alleman
947189f70a drivers: input: add chsc5x driver
Add support for the chsc5x touch controller.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2025-07-28 08:34:35 -04:00
Jun Lin
f1f7ca459b drivers: input: npcx: init semaphore before interrupt enable
A kernel panic was observed on a platform when k_sem_give() was called
in npcx_kbd_ksi_isr(). From the panic information, it appears that
the semaphore was used before it was initialized. This commit prevents
the potential issue by enabling the interrupt only after
the input_kbd_matrix_common_init() function is called
(where the semaphore is initialized).

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2025-07-21 07:22:53 -04:00
Alberto Escolar Piedras
6e923834e6 drivers/input sdl & evdev: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Pisit Sawangvonganan
b8a8173c1f drivers: kconfig: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in `Kconfig` files within the `drivers` directory.
Additionally, incorporates a fix recommended by the reviewer.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-07-01 10:58:54 -10:00
Benjamin Cabé
67cfd32e04 drivers: input: esp32: fix threshold calculation
Fix a bug in the touch threshold calculation where channel_num was
incorrectly used instead of channel_sens.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-09 14:54:30 -07:00
Benjamin Cabé
3d97b76438 drivers: input: esp32: fix reference voltage assignment
Fixed a copy-paste error where `refl` configuration value was not
properly assigned.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-09 14:53:22 -07:00
Marcel Krüger
45f3b71b39 input_gpio: Fix not using latest pin state on pm resume
When the device was suspended and the pin level changed during
that time, the pin level of course isn't updated in the pins cb_data.
Once the device is resumed, this leads to potentially having
a wrong value in the pin state data leading to swallowing the first
event due to comparing the stored level vs. the new level before
reporting.

Also added some `const`s and deleted an unused struct element.

Signed-off-by: Marcel Krüger <marcel@mkgr.dev>
2025-06-06 10:12:11 +02:00
Jeremy Dick
621f29e331 drivers: input: cap12xx Fix integer overflow warning
Check that calsens values are valid to prevent integer overflow

Coverity-CID: 524767
Fixes #90481

Signed-off-by: Jeremy Dick <jdick@pivotint.com>
2025-05-28 01:48:22 +02:00
jhan bo chao
31b756562a drivers: input: rts5912: clear pending irq when setup
clear pending irq when setup.

Signed-off-by: jhan bo chao <jhan_bo_chao@realtek.com>
2025-05-20 09:16:31 +02:00
Mahesh Mahadevan
0abf4f589b drivers: input_gt911: Reinitialize interrupt GPIO on exit from PM
Certain power modes lose state of the GPIO, hence we need to
reconfigure the interrupt GPIO. This is managed using pm_notifiers

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-05-19 16:36:42 +02:00
Fabio Baltieri
82509f7295 input: add arduino,modulino-buttons
Add an input driver for the modulino buttons module. This is a pluggable
I2C board implementing three buttons and three LEDs, the I2C protocol is
implemented on a microcontroller on the modulino board itself, the
firmware for that is open source and can be updated using an Arduino
sketch:

Link: https://github.com/arduino/node_modulino_firmware
Link: https://github.com/arduino-libraries/Modulino
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-05-14 11:03:10 +01:00
Martin Jäger
81cd7cacc4 drivers: input: input_adc_keys: add debouncing to avoid false events
The previous implementation already reported a key-press event after
reading an ADC value close to the threshold for the first time.

This may lead to false events if the ADC takes a reading just during
the transition from one button state to another (especially if a
somewhat large capacitor is used to avoid noise).

A key-press state must be same for at least two samples in order to
avoid such issues, which is what this commit implements.

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-05-08 12:25:48 +02:00
Jeremy Dick
a167c2d895 drivers: input: cap12xx Add properties for sensitivity and guard signal
The Microchip CAP12xx series has a configurable sensitivity and
can drive an optional guard signal to reduce noise sensitivity.

Signed-off-by: Jeremy Dick <jdick@pivotint.com>
2025-05-08 12:25:18 +02:00
Bastien JAUNY
d5365ba513 drivers: input: vs1838b: Add support for VS1838B
The VS1838B is one of the most found infrared receiver
found in electronic kits and is easy to setup with only
a single GPIO used for signal transmission (apart from
VCC and GND).
This new driver let applications use the VS1838B as an
input with events relayed as 0x0000<address><command>.

Only the NEC protocol is supported in this version but
more can be added later.
Link: https://github-wiki-see.page/m/CoreELEC/remotes/wiki/08.-NEC-IR-Protocol-Datasheet

This has been tested using the input_dump sample.

Signed-off-by: Bastien JAUNY <bastien.jauny@smile.fr>
2025-04-29 19:06:37 +02:00
Peter van der Perk
6a37f325a4 drivers: input: sbus: Fix race and infinite loop
Under certain conditions report_lock could already be used by the irq
before it was initialized, now we ensure we enable irq after report_lock
is initialized.

Furthermore in some conditions data->xfer_bytes could be equal
SBUS_FRAME_LEN resulting in a infinite loop doing zero reads when
fifo is still holding new bytes

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-04-11 16:17:56 +02:00
Ruibin Chang
fb35b6890d drivers/input/it51xxx: implement kbd driver
Implement kbd driver for ITE it51xxx series chip.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2025-04-11 14:53:11 +02:00