aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSteffen Trumtrar <s.trumtrar@pengutronix.de>2012-10-04 09:32:52 -0400
committerSteffen Trumtrar <s.trumtrar@pengutronix.de>2013-01-24 03:03:48 -0500
commitcc3f414cf2e404130584b63d373161ba6fd24bc2 (patch)
tree08d61d026631c79a176f514fb1364b71011599ba /include
parent8714c0cecfc28f7ce73a520be4831f09743c4fd7 (diff)
video: add of helper for display timings/videomode
This adds support for reading display timings from DT into a struct display_timings. The of_display_timing implementation supports multiple subnodes. All children are read into an array, that can be queried. If no native mode is specified, the first subnode will be used. For cases where the graphics driver knows there can be only one mode description or where the driver only supports one mode, a helper function of_get_videomode is added, that gets a struct videomode from DT. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Afzal Mohammed <Afzal@ti.com> Tested-by: Rob Clark <robclark@gmail.com> Tested-by: Leela Krishna Amudala <leelakrishna.a@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/video/of_display_timing.h20
-rw-r--r--include/video/of_videomode.h18
2 files changed, 38 insertions, 0 deletions
diff --git a/include/video/of_display_timing.h b/include/video/of_display_timing.h
new file mode 100644
index 000000000000..8016eb727cf3
--- /dev/null
+++ b/include/video/of_display_timing.h
@@ -0,0 +1,20 @@
1/*
2 * Copyright 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>
3 *
4 * display timings of helpers
5 *
6 * This file is released under the GPLv2
7 */
8
9#ifndef __LINUX_OF_DISPLAY_TIMING_H
10#define __LINUX_OF_DISPLAY_TIMING_H
11
12struct device_node;
13struct display_timings;
14
15#define OF_USE_NATIVE_MODE -1
16
17struct display_timings *of_get_display_timings(struct device_node *np);
18int of_display_timings_exist(struct device_node *np);
19
20#endif
diff --git a/include/video/of_videomode.h b/include/video/of_videomode.h
new file mode 100644
index 000000000000..a07efcc51424
--- /dev/null
+++ b/include/video/of_videomode.h
@@ -0,0 +1,18 @@
1/*
2 * Copyright 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>
3 *
4 * videomode of-helpers
5 *
6 * This file is released under the GPLv2
7 */
8
9#ifndef __LINUX_OF_VIDEOMODE_H
10#define __LINUX_OF_VIDEOMODE_H
11
12struct device_node;
13struct videomode;
14
15int of_get_videomode(struct device_node *np, struct videomode *vm,
16 int index);
17
18#endif /* __LINUX_OF_VIDEOMODE_H */