[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230925154059.837152-14-bryan.odonoghue@linaro.org>
Date: Mon, 25 Sep 2023 16:40:55 +0100
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: linux-arm-msm@...r.kernel.org, linux-media@...r.kernel.org,
hverkuil@...all.nl, laurent.pinchart@...asonboard.com,
robert.foss@...aro.org, todor.too@...il.com, agross@...nel.org,
andersson@...nel.org, konrad.dybcio@...aro.org, mchehab@...nel.org,
sakari.ailus@...ux.intel.com, andrey.konovalov@...aro.org
Cc: linux-kernel@...r.kernel.org,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>
Subject: [PATCH v6 13/17] media: qcom: camss: Fix support for setting CSIPHY clock name csiphyX
Several of our upstream and soon-to-be upstream SoC CAMSS dtsi declare
csiphyX as opposed to the older clock name csiX_phy.
Right now the CAMSS code will fail to set the csiphyX clock even if we have
declared it in our list of clocks. For sdm845 and sm8250 we appear to "get
away" with this error, however on sc8280xp we don't.
The right approach here is to set the clock when it is declared. If a SoC
doesn't require or a SoC driver implementer doesn't think we need, then the
clock ought to simply be omitted from the clock list.
Include csiphyX in the set of permissible strings which will subsequently
lead to the csiphyX clock being set during csiphy_set_clock_rates() phase.
sdm845 and sm8250 will work with the code as-is so I've omitted this from a
suggested Fixes list.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
---
drivers/media/platform/qcom/camss/camss-csiphy.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.c b/drivers/media/platform/qcom/camss/camss-csiphy.c
index 20bb361e9ad05..edd573606a6ae 100644
--- a/drivers/media/platform/qcom/camss/camss-csiphy.c
+++ b/drivers/media/platform/qcom/camss/camss-csiphy.c
@@ -677,6 +677,10 @@ int msm_csiphy_subdev_init(struct camss *camss,
if (csiphy->rate_set[i])
break;
}
+
+ csiphy->rate_set[i] = csiphy_match_clock_name(clock->name, "csiphy%d", k);
+ if (csiphy->rate_set[i])
+ break;
}
}
--
2.42.0
Powered by blists - more mailing lists