aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bridge/adv7511/adv7511.h
diff options
context:
space:
mode:
authorArchit Taneja <architt@codeaurora.org>2016-06-15 17:01:27 +0530
committerArchit Taneja <architt@codeaurora.org>2016-07-13 14:24:37 +0530
commit1e4d58cd7f888522d16f221d628356befbb08468 (patch)
tree9b3522f349f458ab29374c639352781caad81246 /drivers/gpu/drm/bridge/adv7511/adv7511.h
parent2437e7cd88e8781cef5fd2c254c85aa62b305d04 (diff)
downloadkernel_replicant_linux-1e4d58cd7f888522d16f221d628356befbb08468.tar.gz
kernel_replicant_linux-1e4d58cd7f888522d16f221d628356befbb08468.tar.bz2
kernel_replicant_linux-1e4d58cd7f888522d16f221d628356befbb08468.zip
drm/bridge: adv7533: Create a MIPI DSI device
In order to pass DSI specific parameters to the DSI host, we need the driver to create a mipi_dsi_device DSI device that attaches to the host. Use of_graph helpers to get the DSI host DT node. Create a MIPI DSI device using this host. Finally, attach this device to the DSI host. Populate DT parameters (number of data lanes for now) that are required for DSI RX to work correctly. Hardcode few other parameters (rgb, embedded_sync) for now. Select DRM_MIPI_DSI config option only when ADV7533 support is enabled. Signed-off-by: Archit Taneja <architt@codeaurora.org>
Diffstat (limited to 'drivers/gpu/drm/bridge/adv7511/adv7511.h')
-rw-r--r--drivers/gpu/drm/bridge/adv7511/adv7511.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511.h b/drivers/gpu/drm/bridge/adv7511/adv7511.h
index 5dea769c3c71..3e4d47a3124a 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511.h
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511.h
@@ -14,6 +14,7 @@
#include <linux/regmap.h>
#include <drm/drm_crtc_helper.h>
+#include <drm/drm_mipi_dsi.h>
#define ADV7511_REG_CHIP_REVISION 0x00
#define ADV7511_REG_N0 0x01
@@ -324,6 +325,11 @@ struct adv7511 {
struct gpio_desc *gpio_pd;
+ /* ADV7533 DSI RX related params */
+ struct device_node *host_node;
+ struct mipi_dsi_device *dsi;
+ u8 num_dsi_lanes;
+
enum adv7511_type type;
};
@@ -333,6 +339,9 @@ void adv7533_dsi_power_off(struct adv7511 *adv);
int adv7533_patch_registers(struct adv7511 *adv);
void adv7533_uninit_cec(struct adv7511 *adv);
int adv7533_init_cec(struct adv7511 *adv);
+int adv7533_attach_dsi(struct adv7511 *adv);
+void adv7533_detach_dsi(struct adv7511 *adv);
+int adv7533_parse_dt(struct device_node *np, struct adv7511 *adv);
#else
static inline void adv7533_dsi_power_on(struct adv7511 *adv)
{
@@ -355,6 +364,20 @@ static inline int adv7533_init_cec(struct adv7511 *adv)
{
return -ENODEV;
}
+
+static inline int adv7533_attach_dsi(struct adv7511 *adv)
+{
+ return -ENODEV;
+}
+
+static inline void adv7533_detach_dsi(struct adv7511 *adv)
+{
+}
+
+static inline int adv7533_parse_dt(struct device_node *np, struct adv7511 *adv)
+{
+ return -ENODEV;
+}
#endif
#endif /* __DRM_I2C_ADV7511_H__ */