diff mbox series

[v2,8/9] drm/panel: lvds: Add support for the IDK-2121WR

Message ID 1565867073-24746-9-git-send-email-fabrizio.castro@bp.renesas.com (mailing list archive)
State Superseded
Delegated to: Kieran Bingham
Headers show
Series Add dual-LVDS panel support to EK874 | expand

Commit Message

Fabrizio Castro Aug. 15, 2019, 11:04 a.m. UTC
The IDK-2121WR from Advantech is a dual-LVDS display.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

---
v1->v2:
* new patch

 drivers/gpu/drm/panel/panel-lvds.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c
index 1ec57d0..2cd41757 100644
--- a/drivers/gpu/drm/panel/panel-lvds.c
+++ b/drivers/gpu/drm/panel/panel-lvds.c
@@ -22,6 +22,7 @@ 
 
 #include <drm/drm_crtc.h>
 #include <drm/drm_panel.h>
+#include <drm/drm_timings.h>
 
 struct panel_lvds {
 	struct drm_panel panel;
@@ -259,6 +260,7 @@  static int panel_lvds_probe(struct platform_device *pdev)
 	/* Register the panel. */
 	drm_panel_init(&lvds->panel);
 	lvds->panel.dev = lvds->dev;
+	lvds->panel.timings = of_device_get_match_data(lvds->dev);
 	lvds->panel.funcs = &panel_lvds_funcs;
 
 	ret = drm_panel_add(&lvds->panel);
@@ -287,7 +289,13 @@  static int panel_lvds_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct drm_timings advantech_idk_2121wr = {
+	.dual_link = true,
+	.link_flags = DRM_LINK_DUAL_LVDS_ODD_EVEN,
+};
+
 static const struct of_device_id panel_lvds_of_table[] = {
+	{ .compatible = "advantech,idk-2121wr", .data = &advantech_idk_2121wr},
 	{ .compatible = "panel-lvds", },
 	{ /* Sentinel */ },
 };