From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 C8F9F2DAFAC for ; Sat, 17 Jan 2026 21:54:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768686867; cv=none; b=OrvKwNZr4HSZisEOwqfKwWeo16k8s0d2oZKdFnMLMskTrqUAmpLXlRTh50uFna/u4iCDfOXXboTWcg4I9zZgd8rF4FrWtHDL4NcgxBtfVfgJ4t0y+RNBFhU9rMjoNnM3tIL3trftnFsxa5LCYYjjfCiTpB5wHvng9X57K2RGj74= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768686867; c=relaxed/simple; bh=61farPWAS3rdz5Y29Ms/plzBMDmfaogO+QU+97XcWXk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pwpjiZYXlSPZ768Za3g4tj6GpIe5br7B/oAKK/xNC4wq7eTLlXIqLdolzCfMXCTs8oB77NPYPzCn2O4YyyOER1MBg9mw9SnhEhYWkAcP4QSn6ESrWajcKCRsGESe5E4+woNnusyaQfrbJW0iGrCRLfH9AAH2GqUUpIONM/jd3tE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=hXlNgR3b; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hXlNgR3b" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4801c731d0aso17152505e9.1 for ; Sat, 17 Jan 2026 13:54:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768686864; x=1769291664; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=VwPNYfeXiQuitQb++/nMJ12hS+N4b8LejrqLKmJ1Kx8=; b=hXlNgR3barPPKa/aL5zVbt7XW8e/0iu5L6x7pnN9dGm7rinFAK0FBwMbD5K8+hWm+0 FC/iUTkndob1IZDmLNln/UeDyr3r5bBgVv4/iT0xRhdiUFrXyTwLLReSt9KpOm36mSLc /GBD9oYMlVvg8MhS6qfGWb6KjcrHIEtbIwBXApmH0gzdeiV7zifF2I/VTXe92WUB6ch+ hLIiee6yOpNBcDflBG5rHejvF+rL9g98u2NcOSLCXw0dE8yaB8k+ycuz2y8hBvxB1VjQ BEabnDHwCsWfFLRHs7WzIr9z7XkD3dFLQoQeENNUT2zsiuRvPtUHhvfw7IGOAaEKw9rn 3jxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768686864; x=1769291664; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VwPNYfeXiQuitQb++/nMJ12hS+N4b8LejrqLKmJ1Kx8=; b=kQNRWS/RHvo+bmqvZybKcnYgKR8UKGKyS3qv6OP8t7VulWPvQ9yZ2BOc86QEi5C5D5 F8jmbSFIzAkS2aRKSNxzwIMySWWHCMZ+6Wdm6kIvMuWx5vHfZOGSyG4g3ceJz8dWqPVk xtGufSV9RYPpXdzAF7W0lvk8uNEz8WTrBe7wtzWDcwh64koPh8KZ5tgyoUGd1AX7Tac3 1DuzwYMxDokDd+DAxgGtDgGNQbis1DflevmZ1QkXuvqOfaqoWR+Blc//0AcwyigpIfeC yza8n+UZcDpZvjmrovRgWQb3eiKn11OrmdRDuCk3CoByXbnyIxYYgSesFxRO+C4HEQJW 3eGw== X-Forwarded-Encrypted: i=1; AJvYcCWTQkrw5t1pyGqtzi/zJew3LUrZEFqNIpS7D4xZw87eWRCR0RGGBeplftWQgpXHRDGvulfAjzECHSwfEWg=@vger.kernel.org X-Gm-Message-State: AOJu0Yw5/7XLCDsqiIf6OZOH+fuRrY4xMTK8xct5puaz20iuYeA2Bwme 9ZeBR8UzLCPiRi58XIpctZ4svXxfN1BfUj7MNux0JgIPb/zD5VCnxMqKZiczsl8IE28= X-Gm-Gg: AY/fxX7lTmGKG4kC7XKz6E0DbadduK0vK2s4MhsnPWlcTVmM0ocL+HCDOxoeVYDe+yo DrjpvD51p+lylzQzRKxY6xCv8i0F6Vo2EmRHCHhuItJw5GyyCazQ7uFsmikznbSzWtArNmlD2iB axYGHXbHGeQQ247GmDF21534gSjnBJn52B36kKSSSFBpy6wVI5nLfTvNXOb5iaPIAv1LOjpBXNe DbBk4gAGGY9XJgzWO9ZRooJ0jMBHUB93bKoDMGaZWHkmjkD7R3I/ZqzH1osZYucHAFMcf6J+Up1 xyVLeA4PKZFZGp01KYN40w3AgJo69i81a0xj/qOsKtk4Be7QxPHlKHNMGJkidK8WtpxOikP8Yht vIDN+P7wjSUOrk/83d4/824+j4rfihKTBCpVetvSt0BP5LAxYTf1AGqI9+KlicvVInlKvg8/y2X 5y43BxqaFxiG624U4CEQtQNmw7aJXGYUs1k5lDr+AgwXlAWB8eFVi8 X-Received: by 2002:a05:600d:6413:10b0:480:1e40:3d2 with SMTP id 5b1f17b1804b1-4801e400518mr65526585e9.29.1768686864184; Sat, 17 Jan 2026 13:54:24 -0800 (PST) Received: from [192.168.0.40] (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356997e6cdsm14234007f8f.31.2026.01.17.13.54.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 17 Jan 2026 13:54:23 -0800 (PST) Message-ID: <25313d70-2d7b-483a-b1cf-493f0697c6cd@linaro.org> Date: Sat, 17 Jan 2026 21:54:19 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 7/8] media: qcom: camss: csiphy-3ph: C-PHY needs own lane configuration To: david@ixit.cz, Robert Foss , Todor Tomov , Vladimir Zapolskiy , Mauro Carvalho Chehab , Luca Weiss , Petr Hodina , Casey Connolly , "Dr. Git" Cc: Konrad Dybcio , Joel Selvaraj , Kieran Bingham , Sakari Ailus , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org References: <20260117-qcom-cphy-v3-0-8ce76a06f7db@ixit.cz> <20260117-qcom-cphy-v3-7-8ce76a06f7db@ixit.cz> From: Bryan O'Donoghue Content-Language: en-US In-Reply-To: <20260117-qcom-cphy-v3-7-8ce76a06f7db@ixit.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 17/01/2026 15:36, David Heidelberg via B4 Relay wrote: > From: David Heidelberg > > Catch when C-PHY configuration gets used on SoC with CAMSS missing C-PHY > configuration lane registers. > > Hopefully this check will disappear as these lane regs gets populated. > > Signed-off-by: David Heidelberg > --- > drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c > index d82a88dad74b5..89bfe3710fc3a 100644 > --- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c > +++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c > @@ -1217,6 +1217,22 @@ static int csiphy_lanes_enable(struct csiphy_device *csiphy, > u8 val; > int i; > > + if (c->phy_cfg == V4L2_MBUS_CSI2_CPHY) { > + switch (csiphy->camss->res->version) { > + case CAMSS_2290: > + case CAMSS_8280XP: > + case CAMSS_X1E80100: > + case CAMSS_8550: > + case CAMSS_8650: > + case CAMSS_8300: > + case CAMSS_8775P: > + dev_err(dev, "Missing lane_regs definition for C-PHY\n"); > + return -EINVAL; > + default: > + break; > + } > + } > + > switch (csiphy->camss->res->version) { > case CAMSS_845: > if (c->phy_cfg == V4L2_MBUS_CSI2_CPHY) { > Proliferating special cases in switch statements on a per-SoC basis is verboten. Please find another way to do this, you already have a bool to indicate cphy in struct csid_phy_config {} so at some level CAMSS already has a bool to indicate what to do. Please make that logic accessible to logical consumers throughout, in this case the CPHY code. --- bod