From: Miotsuki Mizuno <founder@crepuse.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Icenowy Zheng <icenowy@aosc.io>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH 0/3] Add Nsiway NS2009 touchscreen support
Date: Fri, 9 Oct 2026 14:47:40 +0000 [thread overview]
Message-ID: <20261009144729.85832-1-founder@crepuse.com> (raw)
Add polling support for the Nsiway NS2009 I2C resistive touchscreen
controller, together with its vendor prefix and DT binding. Coordinates
are 12-bit ADC readings; raw Z1 is used only to detect contact. The driver
uses a 30 ms polling interval and the common touchscreen transforms.
The implementation derives from Icenowy Zheng's 2017 polling driver [1].
It uses the current input polling API and managed input allocation, with
no private copy of the input core's touch-key state. Failed, short or
malformed I2C reads release the current contact and discard coordinates;
a later valid sample can report a new contact. A transient read error can
therefore cause a pen-up rather than retain an indefinitely active contact.
The driver checks the zero padding in the second byte of a 12-bit response,
as specified by the read-command format. Responses with nonzero padding
are rejected before the decoded value is assigned.
The historical Z1 threshold of 80 remains the default. Boards can override
it with touchscreen-min-pressure; the tested UNIHIKER M10 V1.2 uses 150.
IRQ, wakeup and calibrated pressure reporting are outside this series.
Board DTS changes are also separate.
Validation:
- Latest mainline base: ARM64 driver-object build with W=1, and in-tree
dt_binding_check for the unchanged NS2009 binding.
- UNIHIKER M10 V1.2, Linux 6.18: clicks, long presses, directed drags,
axis orientation, release, and three held-contact inhibit/uninhibit
cycles. A validation module changed only the driver registration name
to replace the existing built-in driver; the read/poll/probe code is
the same as this series. The boot Image and DTB were retained.
- Two malformed Z1 responses were rejected during the physical run;
subsequent contacts were reported normally without stuck key state.
- Controlled read/poll/probe tests with ASan/UBSan cover all 4096 valid
ADC values, every nonzero padding nibble on Z1/X/Y, threshold bounds,
malformed properties, core key resets, short/failed reads and recovery.
Physical NACK/short-read fault injection and system suspend/resume were
not tested. This is a new three-patch series, not a continuation of the
board-specific BSP changes.
[1] https://lore.kernel.org/all/20170315155140.54518-4-icenowy@aosc.xyz/
Mizuno Miotsuki (3):
dt-bindings: vendor-prefixes: add Nsiway
dt-bindings: input: touchscreen: add Nsiway NS2009
Input: add Nsiway NS2009 resistive touchscreen driver
.../input/touchscreen/nsiway,ns2009.yaml | 64 +++++++
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
MAINTAINERS | 7 +
drivers/input/touchscreen/Kconfig | 10 +
drivers/input/touchscreen/Makefile | 1 +
drivers/input/touchscreen/ns2009.c | 175 ++++++++++++++++++
6 files changed, 259 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/touchscreen/nsiway,ns2009.yaml
create mode 100644 drivers/input/touchscreen/ns2009.c
base-commit: af32da41b0327b9c6a37856ba82b6760d6c8d10e
next reply other threads:[~2026-10-09 14:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 14:47 Miotsuki Mizuno [this message]
2026-10-09 14:47 ` [PATCH 1/3] dt-bindings: vendor-prefixes: add Nsiway Miotsuki Mizuno
2026-10-09 14:47 ` [PATCH 2/3] dt-bindings: input: touchscreen: add Nsiway NS2009 Miotsuki Mizuno
2026-10-09 14:47 ` [PATCH 3/3] Input: add Nsiway NS2009 resistive touchscreen driver Miotsuki Mizuno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261009144729.85832-1-founder@crepuse.com \
--to=founder@crepuse.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=icenowy@aosc.io \
--cc=krzk+dt@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®