/** * struct of_endpoint - the OF graph endpoint data structure * @port: identifier (value of reg property) of a port this endpoint belongs to * @id: identifier (value of reg property) of this endpoint * @local_node: pointer to device_node of this endpoint
*/ struct of_endpoint { unsignedint port; unsignedint id; conststruct device_node *local_node;
};
/** * for_each_endpoint_of_node - iterate over every endpoint in a device node * @parent: parent device node containing ports and endpoints * @child: loop variable pointing to the current endpoint node * * When breaking out of the loop, of_node_put(child) has to be called manually.
*/ #define for_each_endpoint_of_node(parent, child) \ for (child = of_graph_get_next_endpoint(parent, NULL); child != NULL; \
child = of_graph_get_next_endpoint(parent, child))
/** * for_each_of_graph_port - iterate over every port in a device or ports node * @parent: parent device or ports node containing port * @child: loop variable pointing to the current port node * * When breaking out of the loop, and continue to use the @child, you need to * use return_ptr(@child) or no_free_ptr(@child) not to call __free() for it.
*/ #define for_each_of_graph_port(parent, child) \ for (struct device_node *child __free(device_node) = of_graph_get_next_port(parent, NULL);\
child != NULL; child = of_graph_get_next_port(parent, child))
/** * for_each_of_graph_port_endpoint - iterate over every endpoint in a port node * @parent: parent port node * @child: loop variable pointing to the current endpoint node * * When breaking out of the loop, and continue to use the @child, you need to * use return_ptr(@child) or no_free_ptr(@child) not to call __free() for it.
*/ #define for_each_of_graph_port_endpoint(parent, child) \ for (struct device_node *child __free(device_node) = of_graph_get_next_port_endpoint(parent, NULL);\
child != NULL; child = of_graph_get_next_port_endpoint(parent, child))
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.