summaryrefslogtreecommitdiff
path: root/include/linux/phy
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@bootlin.com>2018-12-07 14:55:31 +0100
committerKishon Vijay Abraham I <kishon@ti.com>2018-12-12 10:01:51 +0530
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 {
unsigned char lanes;
};
+int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,
+ unsigned int bpp,
+ unsigned int lanes,
+ struct phy_configure_opts_mipi_dphy *cfg);
+int phy_mipi_dphy_config_validate(struct phy_configure_opts_mipi_dphy *cfg);
+
#endif /* __PHY_MIPI_DPHY_H_ */