From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f53.google.com (mail-yx1-f53.google.com [74.125.224.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BD603382D0 for ; Tue, 17 Feb 2026 12:13:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771330415; cv=none; b=PLmQ1M6loAJSV99SRlbLu901iWMmTlEzD8rGtguOdL03Kz1CFLoomeHyErQU1rISPQwz/bwrdrpKfXo3gaDSWn5GlYW4Sk8D6Vi7pSlQwbdqBFUHrgBaRiS3JoNO9TKaC+5J0LdYTJYD3RS8miQg9+3FOOH+K1j0hqbWKPVYKQ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771330415; c=relaxed/simple; bh=YpXWy4g7+t7X7zx1cT8W68M3ZmvB/pe8TsSW1+fLS3I=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=YzGPg9pWvfVRf2hLAhBwZaZcjWUUq3O5nCHFBM+Li48P3FD9V+mq+tMReqcCnm9yp+W8YFnDoA76vmuslYA9ZQncbfGUV98ol3E0rhwuAz6ZWY7e+1LvGtJBRoroSjK71D/YvHDgQOgf6krkqoYvSl2G9hMsrX+ld7/5TgWxEe4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KEvHhf9j; arc=none smtp.client-ip=74.125.224.53 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) header.d=gmail.com header.i=@gmail.com header.b="KEvHhf9j" Received: by mail-yx1-f53.google.com with SMTP id 956f58d0204a3-649df393c04so3580431d50.1 for ; Tue, 17 Feb 2026 04:13:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771330413; x=1771935213; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=ad+zouveqL0jevr2Wpb297zGwvqmkqHDiYrYOYw1pbk=; b=KEvHhf9jEMLq6m+C8bP21gXfThW2EicJ7pFNoNLSfXB7cLhEgKcB+eVb9NCcNhjRNG p3T8cWiqA0xrDyTwRuvqvZoiknYKl/wurDY9yPRkKJSWONHsO2OLKeiMk0vaGbd5r6cL RJ/Z6genHZUdrLYeKJ6SXLT7TnRxdAK7jUxz1/ByXJLVygSCmSSG3TIIdFHbWz+WnFzo PUdAsgsUEyAkAxNApEvpc2JLDgzD5hLoxmmKEcPjtrfCHaSyY0zuH994dSWHHoBVOmMm ePnyViELZbfVdcLpHZXkHui9pVgrs5zz9SOiA74TQV2NfjRbXFvnPlQZ7Lv5H+l9QfNS +kIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771330413; x=1771935213; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ad+zouveqL0jevr2Wpb297zGwvqmkqHDiYrYOYw1pbk=; b=Kdpiy3fZoHBZW7Q0ZXZqAJCeZcKwr12XHDIWhWkqXfTPOgz9utvsqNdsgz5RtlG409 8Y+cgWbwRf+LHpZR42343z1OhebG1F/4g28pJFTkp0Y4OjRKDcHUK+33+9ZW9yx6x139 H4riCZlwFPCcdW4Jz1EZCIIGipDLgfcX0H5uGjcW4Q3yw5bFs/XSExYCpoka8hg+bVjR NZOMqo4G8v+KAYOOVepc+KElOc/M0pW7O1tC2+VeiQud12wCT0SVCatO4cSH8fsTE3kN 5M+Jy3u0Qln78nfUeOYi9Wf0cLEsTUJrjaDNb3cUWocMXy0VBiVfhkULJRtHryYQdE0I a1SQ== X-Forwarded-Encrypted: i=1; AJvYcCVLr7VMgP5RPsUSfFM9lE8Nq7FmFRCQ+M918j5G1wT6y1pqVzin+0bWXq/i0EWU0BE44inXBOhWFdWMPSI=@vger.kernel.org X-Gm-Message-State: AOJu0YyeR7+r7JJBOYpR8HQQvMC6rOoamTYkuqMBEE9G4V14i7KNW/83 lVHBSDck+uP5p5OB8IKRw1+TKiV4Cp9+M6gFvmnzo8bapxUzrNBJ7kJO X-Gm-Gg: AZuq6aLknxf2+69L34ENRlzHtGOKGfEz3hzJJnGiCqxKDZLPGJ5bhxyKvlxRZDcsbcA P6mCM/eCdyx8x9lLDggmpxKU5eJZfWO5ZMuwOH11a+bv+PvMMB1/qhBpU7LMoL/q8JMWVlw+Bw7 OzlamE3jiXcU2woB+2MaJ299zOPXkwQoHqOyhA/suTmRWLCsU28JmahLSJ7SskYd8UARTfSPtdm RCG6bvOEUJXxM0eue7EgRyMzIyKhiZwB3SZ/dN11tq7ROMvu/PgfYE3Qv6i0L3psq7cCW9D9fwL ykp8huyw5hKV0Y+EisTmKHpHyVKgRCCAXu7sh2BKDSUJDGHhVEM9nr2OZBcXrckjbKbVMpHymA3 zGJm/I9+n+rftlUzl3xW+fwLq+if87OFTOaA34mHXh2WemhAhHwolG4ybH331hm4AoSsYF4+Yjg RlowZa96ZbtulrorgFlqnbJ1KKJA== X-Received: by 2002:a05:690c:113:b0:796:3f2f:a310 with SMTP id 00721157ae682-797a0cb9039mr93355227b3.32.1771330412998; Tue, 17 Feb 2026 04:13:32 -0800 (PST) Received: from [192.168.0.40] ([79.133.247.80]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7966c16eb07sm115610727b3.7.2026.02.17.04.13.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Feb 2026 04:13:32 -0800 (PST) From: Erikas Bitovtas Subject: [PATCH v5 0/2] iio: light: Add support for Capella cm36686 and cm36672p sensors Date: Tue, 17 Feb 2026 14:13:14 +0200 Message-Id: <20260217-cm36686-v5-0-63c2de9709d8@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyTHUUlJIzE vPSU3UzU4B8JSMDIzMDIwND3eRcYzMzCzPdtGTzRAtjC9M0w+QUJaDqgqLUtMwKsEnRsbW1AHg nh2pZAAAA X-Change-ID: 20260201-cm36686-fc7a8385f1cd To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peter Meerwald Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Erikas Bitovtas , Andy Shevchenko X-Mailer: b4 0.14.3 This patch series adds support for Capella cm36686 and cm36672p ambient light and proximity sensors. Capella cm36686 is a combined ambient light and proximity sensor with adjustable integration time, interrupt and hysteresis support. It has the slave address of 0x60. cm36672p is partially compatible with cm36686, in that it is a proximity-only sensor that shares the same proximity register field interface with cm36686. Unfortunately, datasheets for these sensors are not publicly available. Initially, this patch series introduced a new driver, which had code based on Android downstream kernels for devices which did use these sensors and a previous submission for cm36672p to mailing lists: https://github.com/LineageOS/android_kernel_xiaomi_msm8992/blob/cm-14.1/drivers/iio/light/cm36686.c https://github.com/shakalaca/ASUS_ZenFone_ZD551KL/blob/android-6.0/kernel/drivers/input/misc/cm36283.c https://lore.kernel.org/linux-iio/1465462845-1571-1-git-send-email-capellamicro@gmail.com/ The following code has been tested on Asus ZenFone 2 Laser/Selfie, which uses cm36686 as its ambient light and proximity sensor. Changes since v4: - CM36672P is only partially compatible with CM36686, reword patch series commits to reflect that. - Add comment explaining why we use VCNL4040 device ID for CM36686. - Link to v4: https://lore.kernel.org/linux-iio/20260212-cm36686-v4-0-8f587d4a72bf@gmail.com/ Changes since v3 (misversioned as v1): - Move Capella enum IDs up so device IDs are sorted by string literal. - Move device tree table entries up so they are sorted by string literal. - Add a trailing comma to the cm36672p_channels proximity channel entry. - Link to v3: https://lore.kernel.org/linux-iio/20260210-cm36686-v1-0-aef68dd46ad4@gmail.com/ Changes since v2: - Remove the previous unnecessary proposed driver and bindings. - Add a fallback compatible for cm36686 of vcnl4040. - Add a new compatible for cm36672p. - Add channel info for cm36672p. - Remove redundant information in the dt-bindings commit message. - Link to v2: https://lore.kernel.org/linux-iio/20260209-cm36686-v2-0-a48126d2b124@gmail.com/ Changes since v1: - Add copyright information. - Sort includes in alphabetical order. - Add trailing commas. - Remove blank spaces where unnecessary. - Add a fallback for capella,cm36686 compatible. - Make power supplies required. - Add '-microamp' suffix for capella,proximity-led-current. - Replace local caching and i2c_smbus calls with regmap API. - Make interrupt optional. - Add action or reset only after setup is done. - Replace mutex_[un]lock calls with guard(mutex) - Add comments on where mutex is used. - Add comments on proximity register defaults. - Remove default proximity sensor duty ratio and integration time. Those were taken from the testing device and had no real reason to be there. - Replace dev_err_probe on device's part ID with a warning. - Replace chip->supplies property with a single devm_regulator_bulk_get_enable call. - Use individual structs instead of array-style device info - Remove enums which are no longer used. - Link to v1: https://lore.kernel.org/linux-iio/20260201-cm36686-v1-0-4949a2a9ba63@gmail.com/ Signed-off-by: Erikas Bitovtas --- Erikas Bitovtas (2): dt-bindings: iio: light: vcnl4000: add Capella CM36686 and CM36672P iio: light: vcnl4000: add support for Capella CM36686 and CM36672P .../bindings/iio/light/vishay,vcnl4000.yaml | 17 +++++---- drivers/iio/light/vcnl4000.c | 41 ++++++++++++++++++++++ 2 files changed, 52 insertions(+), 6 deletions(-) --- base-commit: 350adaf7fde9fdbd9aeed6d442a9ae90c6a3ab97 change-id: 20260201-cm36686-fc7a8385f1cd Best regards, -- Erikas Bitovtas