Re: [PATCH v4 0/2] iio: proximity: add Imagis ISG5320A (Samsung Galaxy XCover5)
From: Andy Shevchenko
Date: Sat Dec 05 2026 - 06:08:23 EST
On Sat, Dec 05, 2026 at 06:35:39AM +0300, Adil Hüsrev Tepe wrote:
> 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).
Right, but sometimes different vendors doesn't mean completely different IPs.
Have you checked for similarities? (I think it's implied by "mainline has no
driver for this chip or its register map".)
> 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.
--
With Best Regards,
Andy Shevchenko