diff options
author | Marco Felsch <m.felsch@pengutronix.de> | 2022-08-09 11:04:33 +0200 |
---|---|---|
committer | Marco Felsch <m.felsch@pengutronix.de> | 2022-09-16 15:18:07 +0200 |
commit | a2ebb9e543c00774a800f7ff9690af0a54861357 (patch) | |
tree | e749f79f51cf79f98bcd0910bbec0d7e2502f9e6 | |
parent | 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff) | |
download | linux-0-day-a2ebb9e543c00774a800f7ff9690af0a54861357.tar.gz linux-0-day-a2ebb9e543c00774a800f7ff9690af0a54861357.tar.xz |
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@pengutronix.de>
Acked-by: Vinod Koul <vkoul@kernel.org>
---
Changelog:
v2:
- added Vinod Koul a-b
-rw-r--r-- | drivers/phy/phy-core-mipi-dphy.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/phy/phy-core-mipi-dphy.c b/drivers/phy/phy-core-mipi-dphy.c index 929e86d6558e0..ba365bc774077 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); /* |