[PATCH 1/4] phy: dphy: Add lane_positions to DPHY config struct

Bryan O'Donoghue posted 4 patches 1 week, 1 day ago
[PATCH 1/4] phy: dphy: Add lane_positions to DPHY config struct
Posted by Bryan O'Donoghue 1 week, 1 day ago
Add lane_positions to the DPHY configuration struct. This data-field
represents the physical positions of the data-lanes indexed by lane number.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 include/linux/phy/phy-mipi-dphy.h | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/include/linux/phy/phy-mipi-dphy.h b/include/linux/phy/phy-mipi-dphy.h
index 1ac128d78dfeb..c7eb11c41d7ec 100644
--- a/include/linux/phy/phy-mipi-dphy.h
+++ b/include/linux/phy/phy-mipi-dphy.h
@@ -6,6 +6,8 @@
 #ifndef __PHY_MIPI_DPHY_H_
 #define __PHY_MIPI_DPHY_H_
 
+#define PHY_MIPI_DPHY_MAX_DATA_LANES    4
+
 /**
  * struct phy_configure_opts_mipi_dphy - MIPI D-PHY configuration set
  *
@@ -269,10 +271,19 @@ struct phy_configure_opts_mipi_dphy {
 	/**
 	 * @lanes:
 	 *
-	 * Number of active, consecutive, data lanes, starting from
-	 * lane 0, used for the transmissions.
+	 * Number of active data lanes used for the transmission.
+	 * When @lane_positions is not populated, lanes are consecutive
+	 * starting from lane 0.
 	 */
 	unsigned char		lanes;
+
+	/**
+	 * @lane_positions:
+	 *
+	 * Array representing the physical positions of the data-lanes.
+	 * Indexed by logical lane number.
+	 */
+	unsigned char		lane_positions[PHY_MIPI_DPHY_MAX_DATA_LANES];
 };
 
 int phy_mipi_dphy_get_default_config(unsigned long pixel_clock,

-- 
2.52.0