Thomas Gleixner | 55716d2 | 2019-06-01 10:08:42 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Steffen Trumtrar | cc3f414 | 2012-10-04 15:32:52 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de> |
| 4 | * |
| 5 | * display timings of helpers |
Steffen Trumtrar | cc3f414 | 2012-10-04 15:32:52 +0200 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __LINUX_OF_DISPLAY_TIMING_H |
| 9 | #define __LINUX_OF_DISPLAY_TIMING_H |
| 10 | |
| 11 | struct device_node; |
Fabio Estevam | d22cd301 | 2013-06-26 10:34:25 -0300 | [diff] [blame] | 12 | struct display_timing; |
Steffen Trumtrar | cc3f414 | 2012-10-04 15:32:52 +0200 | [diff] [blame] | 13 | struct display_timings; |
| 14 | |
| 15 | #define OF_USE_NATIVE_MODE -1 |
| 16 | |
Tomi Valkeinen | 422b67e | 2014-10-06 15:03:57 +0300 | [diff] [blame] | 17 | #ifdef CONFIG_OF |
Laurent Pinchart | f5a000c | 2016-10-03 16:55:48 +0300 | [diff] [blame] | 18 | int of_get_display_timing(const struct device_node *np, const char *name, |
Tomi Valkeinen | ffa3fd2 | 2013-05-16 15:36:38 +0300 | [diff] [blame] | 19 | struct display_timing *dt); |
Laurent Pinchart | f5a000c | 2016-10-03 16:55:48 +0300 | [diff] [blame] | 20 | struct display_timings *of_get_display_timings(const struct device_node *np); |
Tomi Valkeinen | 422b67e | 2014-10-06 15:03:57 +0300 | [diff] [blame] | 21 | #else |
Laurent Pinchart | f5a000c | 2016-10-03 16:55:48 +0300 | [diff] [blame] | 22 | static inline int of_get_display_timing(const struct device_node *np, |
| 23 | const char *name, struct display_timing *dt) |
Tomi Valkeinen | 422b67e | 2014-10-06 15:03:57 +0300 | [diff] [blame] | 24 | { |
| 25 | return -ENOSYS; |
| 26 | } |
Laurent Pinchart | f5a000c | 2016-10-03 16:55:48 +0300 | [diff] [blame] | 27 | static inline struct display_timings * |
| 28 | of_get_display_timings(const struct device_node *np) |
Tomi Valkeinen | 422b67e | 2014-10-06 15:03:57 +0300 | [diff] [blame] | 29 | { |
| 30 | return NULL; |
| 31 | } |
Tomi Valkeinen | 422b67e | 2014-10-06 15:03:57 +0300 | [diff] [blame] | 32 | #endif |
Steffen Trumtrar | cc3f414 | 2012-10-04 15:32:52 +0200 | [diff] [blame] | 33 | |
| 34 | #endif |