GNU Linux-libre 4.9.333-gnu1
[releases.git] / include / video / of_display_timing.h
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
12 #include <linux/errno.h>
13
14 struct device_node;
15 struct display_timing;
16 struct display_timings;
17
18 #define OF_USE_NATIVE_MODE -1
19
20 #ifdef CONFIG_OF
21 int of_get_display_timing(struct device_node *np, const char *name,
22                 struct display_timing *dt);
23 struct display_timings *of_get_display_timings(struct device_node *np);
24 int of_display_timings_exist(struct device_node *np);
25 #else
26 static inline int of_get_display_timing(struct device_node *np, const char *name,
27                 struct display_timing *dt)
28 {
29         return -ENOSYS;
30 }
31 static inline struct display_timings *of_get_display_timings(struct device_node *np)
32 {
33         return NULL;
34 }
35 static inline int of_display_timings_exist(struct device_node *np)
36 {
37         return -ENOSYS;
38 }
39 #endif
40
41 #endif