From: "Adil Hüsrev Tepe" <tadilhusrev@gmail.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
"Joshua Crofts" <crofts@kernel.org>,
"Adil Hüsrev Tepe" <tadilhusrev@gmail.com>
Subject: [PATCH v4 0/2] iio: proximity: add Imagis ISG5320A (Samsung Galaxy XCover5)
Date: Sat, 05 Dec 2026 06:35:39 +0300 [thread overview]
Message-ID: <20261205-isg5320a-v4-0-a9bb8573c064@gmail.com> (raw)
This series adds an IIO driver and its DT binding for the Imagis
ISG5320A capacitive SAR/grip proximity sensor (I2C), as fitted on the
Samsung Galaxy XCover5 (SM-G525F, Exynos850).
Andy asked on v1 why this is a brand new driver: mainline has no driver
for this chip or its register map. The two Imagis drivers in the tree,
drivers/input/touchscreen/imagis.c (IST30xx touchscreen controllers)
and drivers/input/misc/isa1200.c (a haptic driver), are for unrelated
devices, and the SAR drivers in drivers/iio/proximity are for chips
from other vendors (Semtech, Awinic, TYHX).
v4 reworks the driver along the v3 reviews from Jonathan Cameron and
Joshua Crofts and the v2 review from Andy Shevchenko, which v3 had not
addressed, and fixes the two Sashiko AI findings on v3:
- Reads much less like a vendor driver: the per-line vendor references,
the init-table read-back check, the CHIPID read and the dev_info()
noise are gone, constant write sequences use regmap_multi_reg_write(),
and the 16-bit registers use get_unaligned_be16().
- The init table was checked against the values read back after a soft
reset (one unit): 29 of the 150 entries repeat them. Two are dropped.
The other 27 are next to a register that the table changes and stay,
because the register layout is not documented.
- The binding now requires vdd-supply, so Krzysztof's Reviewed-by on
v3 1/2 is dropped. The driver uses devm_regulator_get_enable()
instead of the _optional variant and always applies the power-on
delay.
- Power management is simpler: no disable_irq(), no wakeup support for
now (DEFINE_RUNTIME_DEV_PM_OPS), devm_pm_runtime_set_active_enabled(),
no shutdown(), and the chip is put back to sleep if probe fails after
starting it.
Per-patch details are below each patch's "---" line.
v3: https://lore.kernel.org/r/20261117173333.1853986-1-tadilhusrev@gmail.com
Tested on one Samsung Galaxy XCover5 (SM-G525F, Exynos850) as a module
on a v7.4-rc3 based tree (7.4.0-rc3-00023-gdcb8b91fb779+), this exact
code: probe/bind, runtime suspend/resume, raw reads, and threshold
events on a hand grip. With the thresholds at 300 (rising) / 150
(falling), gripping the lower-left of the back swung in_proximity0_raw
from a ~4 baseline to ~13000 and back, and iio_event_monitor reported
the matching proximity threshold rising-on-grip and falling-on-release
events, the chip's GPIO interrupt count tracking them one for one. The
chip can occasionally need a calibration retry at resume, which the
driver now handles; it stayed calibrated through the grip run. System
suspend was not tested.
Build-tested on arm64 with W=1 (no warnings); dt_binding_check passes
for the binding. checkpatch.pl --strict reports one warning on each
patch, the reminder to check MAINTAINERS for the new file.
Based on v7.4-rc1.
Tool usage
----------
This series was developed during XCover5 mainline bring-up with the
help of an AI coding assistant (Claude Code, Anthropic), which drafted
the IIO driver from the Samsung vendor driver's register map, reworked
it for v4 along the reviews, and drafted these changelogs. I reviewed
every line and take full responsibility for the contribution. Review
comments are welcome and I will answer them myself.
---
Adil Hüsrev Tepe (2):
dt-bindings: iio: proximity: add Imagis ISG5320A
iio: proximity: add Imagis ISG5320A SAR sensor driver
.../bindings/iio/proximity/imagis,isg5320a.yaml | 54 ++
drivers/iio/proximity/Kconfig | 11 +
drivers/iio/proximity/Makefile | 1 +
drivers/iio/proximity/isg5320a.c | 745 +++++++++++++++++++++
4 files changed, 811 insertions(+)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261122-isg5320a-6ee19adaa600
Best regards,
--
Adil Hüsrev Tepe <tadilhusrev@gmail.com>
next reply other threads:[~2026-12-05 3:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 3:35 Adil Hüsrev Tepe [this message]
2026-12-05 3:35 ` [PATCH v4 1/2] dt-bindings: iio: proximity: add Imagis ISG5320A Adil Hüsrev Tepe
2026-12-05 3:35 ` [PATCH v4 2/2] iio: proximity: add Imagis ISG5320A SAR sensor driver Adil Hüsrev Tepe
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=20261205-isg5320a-v4-0-a9bb8573c064@gmail.com \
--to=tadilhusrev@gmail.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=crofts@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=phone-devel@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