History

device property: Add functions for accessing node's parents

Add two convenience functions for accessing node's parents: fwnode_count_parents() returns the number of parent nodes a given node has. fwnode_get_nth_parent() returns node's parent at a given distance from the node itself.

Sakari Ailus committed 7 years ago

Commit 87e5e951 parent a57b7fb2 files · +49 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/property.h+3−0
@@ -83,6 +83,9 @@ struct fwnode_handle *fwnode_find_reference(const struct fwnode_handle *fwnode, · 82 unmodified lines
83struct fwnode_handle *fwnode_get_parent(const struct fwnode_handle *fwnode);83struct fwnode_handle *fwnode_get_parent(const struct fwnode_handle *fwnode);
84struct fwnode_handle *fwnode_get_next_parent(84struct fwnode_handle *fwnode_get_next_parent(
85 struct fwnode_handle *fwnode);85 struct fwnode_handle *fwnode);
86unsigned int fwnode_count_parents(const struct fwnode_handle *fwn);
87struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwn,
88 unsigned int depth);
86struct fwnode_handle *fwnode_get_next_child_node(89struct fwnode_handle *fwnode_get_next_child_node(
87 const struct fwnode_handle *fwnode, struct fwnode_handle *child);90 const struct fwnode_handle *fwnode, struct fwnode_handle *child);
88struct fwnode_handle *fwnode_get_next_available_child_node(91struct fwnode_handle *fwnode_get_next_available_child_node(

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t