[PATCH v2 8/9] drm/panel: lvds: Add support for the IDK-2121WR
From: Fabrizio Castro
Date: Thu Aug 15 2019 - 07:05:31 EST
The IDK-2121WR from Advantech is a dual-LVDS display.
Signed-off-by: Fabrizio Castro <fabrizio.castro@xxxxxxxxxxxxxx>
---
v1->v2:
* new patch
drivers/gpu/drm/panel/panel-lvds.c | 8 ++++++++
1 file changed, 8 insertions(+)
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 */ },
};
--
2.7.4