From fdc5f677f2aa4437fb9f1f799a96de58b98fbcc1 Mon Sep 17 00:00:00 2001 From: Sanghyuk Jung Date: Fri, 10 Apr 2026 13:14:23 +0900 Subject: [PATCH] Guard SET_HOST_IDENTIFIER with magic_num_support check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 14d0181 ("Fix I2C read for protocol 1.0 firmware") added the magic_num_support check around cvs_get_device_cap() but missed guarding the SET_HOST_IDENTIFIER call. On protocol 1.0 devices (e.g., OV02C10 with ACPI HID OVTI02C1), SET_HOST_IDENTIFIER unconditionally returns -EIO, causing CVS probe failure. Since OVTI02C1 receives power through the CVS path (L1CL=0xFF), this probe failure also prevents the camera sensor from powering on, resulting in ov02c10 probe failure (-ENXIO). Wrap the SET_HOST_IDENTIFIER call with the same magic_num_support condition used for cvs_get_device_cap(), so protocol 1.0 devices skip the unsupported command and proceed to sensor acquisition. Tested on Dell XPS 13 9350 (2024) with Intel Core Ultra 7 258V (Lunar Lake) and OmniVision OV02C10 — 1920x1080 capture confirmed via GStreamer icamerasrc. Signed-off-by: Sanghyuk Jung --- drivers/misc/icvs/intel_cvs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/misc/icvs/intel_cvs.c b/drivers/misc/icvs/intel_cvs.c index e85652b..74a377a 100644 --- a/drivers/misc/icvs/intel_cvs.c +++ b/drivers/misc/icvs/intel_cvs.c @@ -166,10 +166,12 @@ static int cvs_common_probe(struct device *dev, bool is_i2c) goto exit; } - ret = cvs_write_i2c(SET_HOST_IDENTIFIER, NULL, 0); - if (ret) { - dev_err(cvs->dev, "%s:set_host_identifier cmd failed", __func__); - goto exit; + if (icvs->magic_num_support) { + ret = cvs_write_i2c(SET_HOST_IDENTIFIER, NULL, 0); + if (ret) { + dev_err(cvs->dev, "%s:set_host_identifier cmd failed", __func__); + goto exit; + } } } }