aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/phy
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@bootlin.com>2018-12-07 08:55:31 -0500
committerKishon Vijay Abraham I <kishon@ti.com>2018-12-11 23:31:51 -0500
commitdddc97e823033b705bbc06bc08b078200ad736a3 (patch)
tree2f3b69df4d12b4699d1aba68898173769961fa47 /include/linux/phy
parent2ed869990e14bc5528aeb00c45e42793c5406637 (diff)
phy: dphy: Add configuration helpers
The MIPI D-PHY spec defines default values and boundaries for most of the parameters it defines. Introduce helpers to help drivers get meaningful values based on their current parameters, and validate the boundaries of these parameters if needed. Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'include/linux/phy')
-rw-r--r--include/linux/phy/phy-mipi-dphy.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/phy/phy-mipi-dphy.h b/include/linux/phy/phy-mipi-dphy.h
index 29bf94db88ad..c08aacc0ac35 100644
--- a/include/linux/phy/phy-mipi-dphy.h
+++ b/include/linux/phy/phy-mipi-dphy.h
@@ -276,4 +276,10 @@ struct phy_configure_opts_mipi_dphy {
276 unsigned char lanes; 276 unsigned char lanes;
277}; 277};
278 278
279int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,
280 unsigned int bpp,
281 unsigned int lanes,
282 struct phy_configure_opts_mipi_dphy *cfg);
283int phy_mipi_dphy_config_validate(struct phy_configure_opts_mipi_dphy *cfg);
284
279#endif /* __PHY_MIPI_DPHY_H_ */ 285#endif /* __PHY_MIPI_DPHY_H_ */