blob: e1126a74882a5f0d0d1678d59c77cf998addb76c [file] [log] [blame]
Thomas Gleixner55716d22019-06-01 10:08:42 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Steffen Trumtrarcc3f4142012-10-04 15:32:52 +02002/*
3 * Copyright 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>
4 *
5 * display timings of helpers
Steffen Trumtrarcc3f4142012-10-04 15:32:52 +02006 */
7
8#ifndef __LINUX_OF_DISPLAY_TIMING_H
9#define __LINUX_OF_DISPLAY_TIMING_H
10
11struct device_node;
Fabio Estevamd22cd3012013-06-26 10:34:25 -030012struct display_timing;
Steffen Trumtrarcc3f4142012-10-04 15:32:52 +020013struct display_timings;
14
15#define OF_USE_NATIVE_MODE -1
16
Tomi Valkeinen422b67e2014-10-06 15:03:57 +030017#ifdef CONFIG_OF
Laurent Pinchartf5a000c2016-10-03 16:55:48 +030018int of_get_display_timing(const struct device_node *np, const char *name,
Tomi Valkeinenffa3fd22013-05-16 15:36:38 +030019 struct display_timing *dt);
Laurent Pinchartf5a000c2016-10-03 16:55:48 +030020struct display_timings *of_get_display_timings(const struct device_node *np);
Tomi Valkeinen422b67e2014-10-06 15:03:57 +030021#else
Laurent Pinchartf5a000c2016-10-03 16:55:48 +030022static inline int of_get_display_timing(const struct device_node *np,
23 const char *name, struct display_timing *dt)
Tomi Valkeinen422b67e2014-10-06 15:03:57 +030024{
25 return -ENOSYS;
26}
Laurent Pinchartf5a000c2016-10-03 16:55:48 +030027static inline struct display_timings *
28of_get_display_timings(const struct device_node *np)
Tomi Valkeinen422b67e2014-10-06 15:03:57 +030029{
30 return NULL;
31}
Tomi Valkeinen422b67e2014-10-06 15:03:57 +030032#endif
Steffen Trumtrarcc3f4142012-10-04 15:32:52 +020033
34#endif