[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <25313d70-2d7b-483a-b1cf-493f0697c6cd@linaro.org>
Date: Sat, 17 Jan 2026 21:54:19 +0000
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: david@...t.cz, Robert Foss <rfoss@...nel.org>,
Todor Tomov <todor.too@...il.com>,
Vladimir Zapolskiy <vladimir.zapolskiy@...aro.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Luca Weiss <luca.weiss@...rphone.com>, Petr Hodina <phodina@...tonmail.com>,
Casey Connolly <casey.connolly@...aro.org>, "Dr. Git" <drgitx@...il.com>
Cc: Konrad Dybcio <konrad.dybcio@....qualcomm.com>,
Joel Selvaraj <foss@...lselvaraj.com>, Kieran Bingham <kbingham@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>, linux-media@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
phone-devel@...r.kernel.org
Subject: Re: [PATCH v3 7/8] media: qcom: camss: csiphy-3ph: C-PHY needs own
lane configuration
On 17/01/2026 15:36, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@...t.cz>
>
> 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 <david@...t.cz>
> ---
> 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
Powered by blists - more mailing lists