From nobody Thu Apr 2 20:08:15 2026 Received: from mail-yx1-f54.google.com (mail-yx1-f54.google.com [74.125.224.54]) (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 C335F35D5ED for ; Thu, 12 Feb 2026 14:45:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770907560; cv=none; b=K/CC1/q3eXEvU4XtYuhu+rX+1AUfCKbceiVdY4RBynQioEczCS/aleoXUBM44kfonDhFsM1K3Ibn3E5EB0vOBdUbraOvizGOBupwtrRIv++JX8APhm3IPGHpuVJppKUIQnPg6X4xNDmr0pz3eDC9wquD2la1exPms4mvuRj23RE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770907560; c=relaxed/simple; bh=fy4LXU/WUrRSUNC3KYSIjdzX5OzOC+ZS//OJBVtQK7U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MTV4HvyyIp4PlV0R4WqwRnW3Vvo5kahId2y4r6O77XFRWpLrlYaazV8hP/HfKfinqOtje6nO6wxlp76DeV+MgHUsUjxF7x866kVHZ5mFoCvNrJBWZpUatJxUTuw/yd/QKQYIlrFsPi980YHaBU6D86NG3zT8u4GhUF6WdV0TuEc= 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=ij2FT/i6; arc=none smtp.client-ip=74.125.224.54 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="ij2FT/i6" Received: by mail-yx1-f54.google.com with SMTP id 956f58d0204a3-649b5f5570fso2947369d50.0 for ; Thu, 12 Feb 2026 06:45:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770907558; x=1771512358; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=+JG1I3xYlNRfZ4lCELzjfItlxHeuT4mtPnRcvecqAwg=; b=ij2FT/i6ctE7yOV/dNstWG7kJntnWslehKJtkBctgjhWLobYRfIxA0yohUJWFDJNv2 N0GSMGXtNU4NAEnfBe1LHfoNR19e0DR73IkHjH7mspRoQ2ryX5iyUB8Eh0hSA3PvFTuX lSMZbHBXmEK/hLeSD6IjN+7cqWisp9HshVL6P/5t+Yl7i80nFcl9zs1JR7r5J5iVoEoG vKHy8kpo01NF4HmyS3vCtxIu8x70tLyd/iVzzlT6xc2IGBoNYJ91bALAYMsa40e2hU4v QqoOQwGqMcxUHwNWh1h8irfsysXQLfZm5tAy9a4rzltPyliS2NnqbVF1HojXeUd5qY8X oGCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770907558; x=1771512358; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=+JG1I3xYlNRfZ4lCELzjfItlxHeuT4mtPnRcvecqAwg=; b=X7EheJ4f2YIRs5fvgvbjY+mGowtDEa9GewVbo4vDBiW64SVhDPpeuP/hM3ata8zEXP uBzD/Ue1+odPGDkb3+kadP+siJFX4mk8uCae1CpHk/cpH9kQNcRRE/x6rLh6m8hzRrSi iK4uDmf1l8+4w1p5fIUghu7u3ltGBFVSz28IqkoK+eW7tQ7LRCo8i7kizDkvvWJXVNpe 3K8AzgW5APfZMoYXahs/W2kPxiR2KKRlF9JJDLlmLKzo4PY4MxgkN69Hxp/qjKdmLH1y krXr8WJ4FQjiBIAbxFhoaCG4tfvWcfwiUb951ipeCh7t8OyLbhlBdLtkhwVveHOT7F45 qFtg== X-Forwarded-Encrypted: i=1; AJvYcCWerhjpV8oZQYiUUk1S/sFY+n4bFKr+THzV9NlI0fqL5JFo/H6aDvNTQ9KEXg8u39hy/YQH/49l1Oxu8GA=@vger.kernel.org X-Gm-Message-State: AOJu0Yy94gTE21vR5VMZkp4WBDT/S51UHlkqzrIFaLuXC+LNf7+uG9ZY E8lLhYIHAe1KxhEtsUzLuXffIZYGErgzgldKAvIX+dw8caGWBy9SfVgn X-Gm-Gg: AZuq6aKOgQYjfM2iT9HhK2t7xo9fIzfQdqey644H70rmhT8Uzg7bIKOXxnjS7jf/VLN OjfXqH+jx6EnpQozsKAXh0HwgOMs3OTw6ltyM9wf2fraxXWR6HqmH7cDOHY7CJnUtfaaaeRNa6i RadWbXCAIPzJ48NxKLjhXoN+ZNKAKk8/+WMa9fbTVaj3ZI4YyuPugqU5pMu8KhLzq4N+le7xmaQ /gRsXq14tD9EeYMrQuBOrXcvctn8Bbet1NQ0iBKHRQvs3AsKgiFTInpFxHeqeH2o+zNU8SbH95A TmyzjKbxkCHo8UDi8n+oUgDOuYynKp9oLJM9BXcZJCALp/K/7fiMFXGGrPLc8BZr3FJaCCUw3kH yt7VAQDQw6Ctbkq7IhkHyyy/hf8nhaI7IgSwRb+fVpKKF863oruOLtYSs10cfRbTKACPT/k6qWe WOxZ51+MseuQcgcFkbN3KSqW0Gdg== X-Received: by 2002:a05:690e:144f:b0:64a:d716:c8e8 with SMTP id 956f58d0204a3-64bdf2f7ce1mr2097988d50.13.1770907557758; Thu, 12 Feb 2026 06:45:57 -0800 (PST) Received: from [192.168.0.40] ([79.133.247.80]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-64afc83c201sm4897318d50.3.2026.02.12.06.45.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Feb 2026 06:45:57 -0800 (PST) From: Erikas Bitovtas Date: Thu, 12 Feb 2026 16:42:48 +0200 Subject: [PATCH v4 2/2] iio: light: vcnl4000: add support for Capella CM36686 and CM36672P 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: quoted-printable Message-Id: <20260212-cm36686-v4-2-8f587d4a72bf@gmail.com> References: <20260212-cm36686-v4-0-8f587d4a72bf@gmail.com> In-Reply-To: <20260212-cm36686-v4-0-8f587d4a72bf@gmail.com> 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 X-Mailer: b4 0.14.3 Add support for Capella's CM36686 and CM36672P sensors. Capella CM36686 is an ambient light and proximity sensor that is fully compatible with VCNL4040 and can be used as is. For CM36672P, which is a proximity-only sensor, also remove the IIO_LIGHT channel. Signed-off-by: Erikas Bitovtas Reviewed-by: Andy Shevchenko --- drivers/iio/light/vcnl4000.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c index a36c23813679..1f8f4e4586f4 100644 --- a/drivers/iio/light/vcnl4000.c +++ b/drivers/iio/light/vcnl4000.c @@ -185,6 +185,7 @@ static const int vcnl4040_ps_oversampling_ratio[] =3D {= 1, 2, 4, 8}; #define VCNL4000_SLEEP_DELAY_MS 2000 /* before we enter pm_runtime_suspend= */ =20 enum vcnl4000_device_ids { + CM36672P, VCNL4000, VCNL4010, VCNL4040, @@ -235,6 +236,8 @@ struct vcnl4000_chip_spec { }; =20 static const struct i2c_device_id vcnl4000_id[] =3D { + { "cm36672p", CM36672P }, + { "cm36686", VCNL4040 }, { "vcnl4000", VCNL4000 }, { "vcnl4010", VCNL4010 }, { "vcnl4020", VCNL4010 }, @@ -1842,6 +1845,22 @@ static const struct iio_chan_spec vcnl4040_channels[= ] =3D { } }; =20 +static const struct iio_chan_spec cm36672p_channels[] =3D { + { + .type =3D IIO_PROXIMITY, + .info_mask_separate =3D BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_INT_TIME) | + BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO) | + BIT(IIO_CHAN_INFO_CALIBBIAS), + .info_mask_separate_available =3D BIT(IIO_CHAN_INFO_INT_TIME) | + BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO) | + BIT(IIO_CHAN_INFO_CALIBBIAS), + .ext_info =3D vcnl4000_ext_info, + .event_spec =3D vcnl4040_event_spec, + .num_event_specs =3D ARRAY_SIZE(vcnl4040_event_spec), + }, +}; + static const struct iio_info vcnl4000_info =3D { .read_raw =3D vcnl4000_read_raw, }; @@ -1867,6 +1886,19 @@ static const struct iio_info vcnl4040_info =3D { }; =20 static const struct vcnl4000_chip_spec vcnl4000_chip_spec_cfg[] =3D { + [CM36672P] =3D { + .prod =3D "CM36672P", + .init =3D vcnl4200_init, + .measure_proximity =3D vcnl4200_measure_proximity, + .set_power_state =3D vcnl4200_set_power_state, + .channels =3D cm36672p_channels, + .num_channels =3D ARRAY_SIZE(cm36672p_channels), + .info =3D &vcnl4040_info, + .irq_thread =3D vcnl4040_irq_thread, + .int_reg =3D VCNL4040_INT_FLAGS, + .ps_it_times =3D &vcnl4040_ps_it_times, + .num_ps_it_times =3D ARRAY_SIZE(vcnl4040_ps_it_times), + }, [VCNL4000] =3D { .prod =3D "VCNL4000", .init =3D vcnl4000_init, @@ -2033,6 +2065,14 @@ static int vcnl4000_probe(struct i2c_client *client) } =20 static const struct of_device_id vcnl_4000_of_match[] =3D { + { + .compatible =3D "capella,cm36672p", + .data =3D (void *)CM36672P, + }, + { + .compatible =3D "capella,cm36686", + .data =3D (void *)VCNL4040, + }, { .compatible =3D "vishay,vcnl4000", .data =3D (void *)VCNL4000, --=20 2.53.0