[PATCH 05/10] video: simple-panel: Add support for device tree provided nodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This adds support for display timings provided from device tree.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/video/simple-panel.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/video/simple-panel.c b/drivers/video/simple-panel.c
index 4775509..be39ff0 100644
--- a/drivers/video/simple-panel.c
+++ b/drivers/video/simple-panel.c
@@ -87,6 +87,7 @@ static int simple_panel_disable(struct simple_panel *panel)
 
 static int simple_panel_get_modes(struct simple_panel *panel, struct display_timings *timings)
 {
+	struct display_timings *modes;
 	int ret;
 
 	if (panel->ddc_node && IS_ENABLED(CONFIG_DRIVER_VIDEO_EDID) &&
@@ -111,6 +112,13 @@ static int simple_panel_get_modes(struct simple_panel *panel, struct display_tim
 		}
 	}
 
+	modes = of_get_display_timings(panel->dev->device_node);
+	if (modes) {
+		timings->modes = modes->modes;
+		timings->num_modes = modes->num_modes;
+		return 0;
+	}
+
 	dev_err(panel->dev, "No modes found\n");
 
 	return -ENOENT;
-- 
2.5.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux