From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796441746; b=gUrCUmhYc+97sjlTdFKTaxIBMyQWnfuRiSqsi4bZnOxYnoHgEPcfmYOfn58/xQ/Lc8QA ZWQYzcO41ZmsgJfABIZlbcAVqEVVqU0szRmap32h8D5Dbdw2WgMbJcaw3hF4iLOMPWxKU q+gzSogAIRwqk23MbTq3F0CBAK9LgAD+DNGQmQuE4sRQ7v7oaHi6hyqIoYKqEATZLSIM0 L+tJBsG6CG19KvPOU5UAt3opL9uKWW/ThYqKwofsVHDaFrVtQmjyhQdVBZ6BI9l3H51AA y8Jgl26lVybIgG8I/Iwi+lpQGMfCHRJHJapAKvq4b3Lm8dZnM5hasJd2hZxd24aD8MQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796441746; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To:Cc:X-Mailer; bh=CAOL3+VhYtY0CYBXNSqdccsFg10H2Fna4VJ0NmYXa04=; b=LY9oZ1P46uaZX4GWnNgUhNS/r3fn4AP0uuGeGaYOdlNj0gHut6wfVY6q3JLJUfnqoNo8 kwe5t3wipLPGyEZQhKfGcgiEAlfyO0vH+N220CApPfAKM6n02GVB20NhRMKa2LcfHt0F1 WvSHShh/3SmuxjnHBpS6AiE3jMNHbX3j+ZdzE8qrFwvVBsw1sMWPVigpaBgQ+cb0a2Reh 4fw5YqRTVkyRqiTLF9eIx4H4Bw8uHJloVm4Rm7F0jg4XFuO9p23Q+PNJoiOWGOdzOVlHy w7nqtalw0Horgbi9dQ4ezY3IsNgJNDdhXg4xvrAZv4gYWHSKd+uPz6XoVH+lv0hfnKg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=FVKkP3mz; arc=none smtp.remote-ip=209.85.218.45 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79E0A606A322 for ; Sat, 5 Dec 2026 03:35:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 79E0A606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=FVKkP3mz Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-c54840de9ddso28832866b.1 for ; Fri, 04 Dec 2026 19:35:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796441745; x=1797046545; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=CAOL3+VhYtY0CYBXNSqdccsFg10H2Fna4VJ0NmYXa04=; b=FVKkP3mzZOuZjXk+8oyJeFUgFBWsS/IreYzeFhkioXNVEH4vi8uSZBY890GJdnvfa1 jR/JrEw0kEAnoP3D9fddVEq4CzeCwbVoCtwyvQTHFb45xMv9qqzyMKLBU9FoUHnK1IMH CEEIP5hUUfCINx4e99UYQ0bNFma2+gcfpIQexPoySNwCsymekCNl/6edLhvUmtxrSeRT TqgQRJ6+Na6sseJ8TFwCyVeisDT09zyrn73erP9c7Vthzs4RaRG+8sudNhGfe8aYgVrS mQMPYPqmMicC8a9hfRGKaOYUSvODSoMdlztcbLDahbE66fyweeThdX7M+7oIZheFgrf3 r/Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796441745; x=1797046545; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=CAOL3+VhYtY0CYBXNSqdccsFg10H2Fna4VJ0NmYXa04=; b=Wt2XMp4rIWfwnsJG/oS15ZlmxT/ghfg0Y9xAL1QwE2tm7Pczcz3JjxVIy2IiS0VYu4 9ykWfzo1E/Kp6EAwxZygfjWEBNMYQSCr8vGG7E0EHS3iBJi8n3icHh6mYz4qXga6Cgaz 5YBYmvWGjFSWsqMZxDIXZvw/zrjGTXWwNt4iUcHjabq5rx/ylMtJzYOaoXscrfc9M2CM j2XCLwnz2ZvO6fA2oNeSIwcfqarPH9u5M7jd0eVX65Kpb0+HByMkdsZRejYpqdB0x1x7 gZkqwNN3Yfnw3DzHE51bT/MWbbF/eIPUGQtFjqWjepAj8CbH5CIxJu2+Qmg4hTOOSSEe niiw== X-Forwarded-Encrypted: i=1; AL+hErF/5N9IRsfsJSI6aeMbC94HhHIe7vpxtyz7PTJLUsbAu8eGbEii9coR8QOo5DQpn61IFftrFywaW/R5i38=@vger.kernel.org X-Gm-Message-State: APuU4Z80GdtovoEtce/ZDxtXnkly+11kYeCd6U4pjqIqbr1EehOF38t7 vEz4Swx/1yDHNvoVZl9FIWcvqwILgl3DY+wTkv5XTakpzRm4Id37xvNFWiY/73xCzRM= X-Gm-Gg: AZFdTZeLvVDJBCaxq1cRzP/5jlVVgLcIMShquTSWvzdScZX3TmvjXIh3cyNy6v0i/uy 2gK+O7SoA6YOrMjRAMCXFk9OJgKV9tAWVW5s/S9F23uEH7OHeWIidW5bnBykXeqP8d8tmfYBEDt 8H3+sF3MLowdjy46RYskcBoz5TA6ablDzThqbDTDvOUtEpWt/4+50UyoVyTUz6yIuNIGPoLD2+n GAx3Mi8ON1n7Ah6Ld5LltF46ziKZuJ1uA9PCfpvojPwXNCTl7n81eM6LgXxDYWgPuEZP1J51uNz gdMswl5pdbj/q2+Z+KIHAseZgVasARufHha2wpBnzJZNDI7HQQC7HrTw4Rkez3LW2UTSHBDZmiD qJp4ibg6/6I+5NGZxtBwYyGMIoO1XwSAlXy6pQ1DghWmfM2xf2Z7rWXxlw5BiolUSCtFfbPrt91 zgnctVmVbRjGtu8yoauMrMQUv/q5Bt02w9a5mEKp+EAiAlaFse2w2bDRVFG+zTp7Yz0nsPWF5zN tYkVGzrzlBvulBlJ6t6iKHWH9vVdMNXH761o8Edn6nsvVHiiva8aUyLnzk9D6cdFMD4/euAVCoF ldyS5CuY8re0IgY8ignhFQdkfMctjaG/cg== X-Received: by 2002:a17:906:e290:b0:c52:7255:54b5 with SMTP id a640c23a62f3a-c5272555b0fmr134702266b.9.1796441744848; Fri, 04 Dec 2026 19:35:44 -0800 (PST) Received: from [127.0.1.1] ([195.155.168.196]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c525b2b7568sm199708566b.2.2026.12.04.19.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 19:35:43 -0800 (PST) From: =?utf-8?q?Adil_H=C3=BCsrev_Tepe?= Subject: [PATCH v4 0/2] iio: proximity: add Imagis ISG5320A (Samsung Galaxy XCover5) Date: Sat, 05 Dec 2026 06:35:39 +0300 Message-Id: <20261205-isg5320a-v4-0-a9bb8573c064@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/02Oyw6CMBBFf4XM2pJOkfJY+R/GxUgHGMPDtGBMC P9u0Y13d5J7T+4Ggb1wgDrZwPNLgsxThPMpgaanqWMlLjIYbSyiMUpCl2dGk7LMWJEjslpDrD8 9t/L+qq63H4f1/uBmOfZHo/XzqJbeM/0pscAii0mxzLOqtArVQk6Gfg3xz6UbSYa0mUfY9w+wH gAFrQAAAA== X-Change-ID: 20261122-isg5320a-6ee19adaa600 To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, Joshua Crofts , =?utf-8?q?Adil_H=C3=BCsrev_Tepe?= X-Mailer: b4 0.16.0 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