Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

authored by

Marco Felsch and committed by
Sakari Ailus
7afa5db0 379c2586

+10 -1
+10 -1
drivers/phy/phy-core-mipi-dphy.c
··· 17 17 * from the valid ranges specified in Section 6.9, Table 14, Page 41 18 18 * of the D-PHY specification (v1.2). 19 19 */ 20 - int phy_mipi_dphy_get_default_config(unsigned long pixel_clock, 20 + static int phy_mipi_dphy_calc_config(unsigned long pixel_clock, 21 21 unsigned int bpp, 22 22 unsigned int lanes, 23 23 struct phy_configure_opts_mipi_dphy *cfg) ··· 74 74 cfg->lanes = lanes; 75 75 76 76 return 0; 77 + } 78 + 79 + int phy_mipi_dphy_get_default_config(unsigned long pixel_clock, 80 + unsigned int bpp, 81 + unsigned int lanes, 82 + struct phy_configure_opts_mipi_dphy *cfg) 83 + { 84 + return phy_mipi_dphy_calc_config(pixel_clock, bpp, lanes, cfg); 85 + 77 86 } 78 87 EXPORT_SYMBOL(phy_mipi_dphy_get_default_config); 79 88