XenevaOS
Loading...
Searching...
No Matches
of_graph.h
Go to the documentation of this file.
1/*
2 * DCL of_graph.h -- device-tree graph traversal answers "absent".
3 *
4 * drm_of.h includes this; the of_* functions in drm_bridge.c sit inside
5 * #ifdef CONFIG_OF (drm_bridge.c:1518-1626) and never compile here, but
6 * drm_of.h's own declarations and any stray callers still parse.
7 */
8#ifndef _LINUX_OF_GRAPH_H
9#define _LINUX_OF_GRAPH_H
10
11#include <linux/of.h>
12
13struct device_node;
14
15/*
16 * struct of_endpoint -- mainline's, and mainline keeps it in this header
17 * (include/linux/of_graph.h), which is why it is here rather than in of.h.
18 *
19 * It was a promise rather than a definition until drm_of.h:202 and :212
20 * needed it: those two lines declare `struct of_endpoint endpoint;` by
21 * value, and a local of an incomplete type is an error at the declaration --
22 * unlike the pointers everywhere else, a by-value variable has to know how
23 * big it is.
24 *
25 * All four members are carried, not only the two drm_of.h reads back
26 * (`endpoint.id` and `endpoint.port`): see the note in <linux/mm.h> on why a
27 * three-member struct is worse than a seven-member one. There are no
28 * device-tree nodes in this kernel, so of_graph_get_remote_node() below
29 * always answers 0 and drm_of_encoder_active_*() is never reached with a
30 * live endpoint to fill.
31 */
33 unsigned int port;
34 unsigned int id;
35 const struct device_node *local_node;
36 const struct device_node *remote_node;
37};
38
39static inline bool of_graph_is_present(const struct device_node *np)
40{
41 (void)np;
42 return false;
43}
44
45static inline struct device_node *
46of_graph_get_remote_node(const struct device_node *np, int port, int endpoint)
47{
48 (void)np; (void)port; (void)endpoint;
49 return 0;
50}
51
52#endif /* _LINUX_OF_GRAPH_H */
void * endpoint
Definition main.cpp:149
Definition of_graph.h:32
const struct device_node * remote_node
Definition of_graph.h:36
unsigned int id
Definition of_graph.h:34
unsigned int port
Definition of_graph.h:33
const struct device_node * local_node
Definition of_graph.h:35