blob: 956455fc9f9a9bfa15ef9a7e4b516938361b41e2 [file] [log] [blame]
Steffen Trumtrarcc3f4142012-10-04 15:32:52 +02001/*
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;
Fabio Estevamd22cd302013-06-26 10:34:25 -030013struct display_timing;
Steffen Trumtrarcc3f4142012-10-04 15:32:52 +020014struct display_timings;
15
16#define OF_USE_NATIVE_MODE -1
17
Tomi Valkeinen422b67e2014-10-06 15:03:57 +030018#ifdef CONFIG_OF
Laurent Pinchartf5a000c2016-10-03 16:55:48 +030019int of_get_display_timing(const struct device_node *np, const char *name,
Tomi Valkeinenffa3fd22013-05-16 15:36:38 +030020 struct display_timing *dt);
Laurent Pinchartf5a000c2016-10-03 16:55:48 +030021struct display_timings *of_get_display_timings(const struct device_node *np);
22int of_display_timings_exist(const struct device_node *np);
Tomi Valkeinen422b67e2014-10-06 15:03:57 +030023#else
Laurent Pinchartf5a000c2016-10-03 16:55:48 +030024static inline int of_get_display_timing(const struct device_node *np,
25 const char *name, struct display_timing *dt)
Tomi Valkeinen422b67e2014-10-06 15:03:57 +030026{
27 return -ENOSYS;
28}
Laurent Pinchartf5a000c2016-10-03 16:55:48 +030029static inline struct display_timings *
30of_get_display_timings(const struct device_node *np)
Tomi Valkeinen422b67e2014-10-06 15:03:57 +030031{
32 return NULL;
33}
Laurent Pinchartf5a000c2016-10-03 16:55:48 +030034static inline int of_display_timings_exist(const struct device_node *np)
Tomi Valkeinen422b67e2014-10-06 15:03:57 +030035{
36 return -ENOSYS;
37}
38#endif
Steffen Trumtrarcc3f4142012-10-04 15:32:52 +020039
40#endif