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>
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>
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>
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>
Add support for gesture / motion based interrupts
when INPUT_CST816S_EV_DEVICE is enabled.
Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
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>
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>
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>
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>
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>
Adds the missing INPUT_TOUCH_STRUCT_CHECK for the config struct, to harden
against member reordering.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>