Skip to contentSkip to conversation

media: ccs-pll: Print PLL calculator flags in the beginning

PATCH New Sakari Ailus 1 participant 1 message Mar 5, 2025

Subsystems (2)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 media: ccs-pll: Print PLL calculator flags in the beginning

Print the PLL calculator flags right away when the PLL calculator is called. Previously this was done only in a successful case and that didn't really help solving a problem when one happened.

---
 drivers/media/i2c/ccs-pll.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/media/i2c/ccs-pll.c +6 -1
index 49cc4491ebdd..cf06414f8faa 100644
@@ -123,8 +123,11 @@ static void print_pll(struct device *dev, struct ccs_pll *pll)
 		pll->pixel_rate_pixel_array);
 	dev_dbg(dev, "pixel rate on CSI-2 bus:\t%u\n",
 		pll->pixel_rate_csi);
+}
 
-	dev_dbg(dev, "flags%s%s%s%s%s%s%s%s%s%s\n",
+static void print_pll_flags(struct device *dev, struct ccs_pll *pll)
+{
+	dev_dbg(dev, "PLL flags%s%s%s%s%s%s%s%s%s%s\n",
 		pll->flags & PLL_FL(LANE_SPEED_MODEL) ? " lane-speed" : "",
 		pll->flags & PLL_FL(LINK_DECOUPLED) ? " link-decoupled" : "",
 		pll->flags & PLL_FL(EXT_IP_PLL_DIVIDER) ?
@@ -737,6 +740,8 @@ int ccs_pll_calculate(struct device *dev, const struct ccs_pll_limits *lim,
 	u32 i;
 	int rval = -EINVAL;
 
+	print_pll_flags(dev, pll);
+
 	if (!(pll->flags & CCS_PLL_FLAG_LANE_SPEED_MODEL)) {
 		pll->op_lanes = 1;
 		pll->vt_lanes = 1;
Signature · 1 line
2.39.5