[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220930124812.450332-2-m.felsch@pengutronix.de>
Date: Fri, 30 Sep 2022 14:48:09 +0200
From: Marco Felsch <m.felsch@...gutronix.de>
To: mchehab@...nel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, kishon@...com, vkoul@...nel.org,
laurent.pinchart@...asonboard.com, sakari.ailus@...ux.intel.com,
jacopo@...ndi.org, hverkuil@...all.nl
Cc: linux-phy@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel@...gutronix.de,
linux-media@...r.kernel.org
Subject: [PATCH v4 1/4] phy: dphy: refactor get_default_config
Factor out the calculation into phy_mipi_dphy_calc_config(). This is
needed for the follow up patch which adds the support to calculate the
timings based on a given hs clock. No functional changes are done.
Signed-off-by: Marco Felsch <m.felsch@...gutronix.de>
Acked-by: Vinod Koul <vkoul@...nel.org>
---
Changelog:
v2:
- added Vinod Koul a-b
drivers/phy/phy-core-mipi-dphy.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/phy-core-mipi-dphy.c b/drivers/phy/phy-core-mipi-dphy.c
index 929e86d6558e..ba365bc77407 100644
--- a/drivers/phy/phy-core-mipi-dphy.c
+++ b/drivers/phy/phy-core-mipi-dphy.c
@@ -17,7 +17,7 @@
* from the valid ranges specified in Section 6.9, Table 14, Page 41
* of the D-PHY specification (v1.2).
*/
-int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,
+static int phy_mipi_dphy_calc_config(unsigned long pixel_clock,
unsigned int bpp,
unsigned int lanes,
struct phy_configure_opts_mipi_dphy *cfg)
@@ -75,6 +75,15 @@ int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,
return 0;
}
+
+int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,
+ unsigned int bpp,
+ unsigned int lanes,
+ struct phy_configure_opts_mipi_dphy *cfg)
+{
+ return phy_mipi_dphy_calc_config(pixel_clock, bpp, lanes, cfg);
+
+}
EXPORT_SYMBOL(phy_mipi_dphy_get_default_config);
/*
--
2.30.2
Powered by blists - more mailing lists