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. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
a57b7fb783
commit
87e5e95db3
@@ -83,6 +83,9 @@ struct fwnode_handle *fwnode_find_reference(const struct fwnode_handle *fwnode,
|
||||
struct fwnode_handle *fwnode_get_parent(const struct fwnode_handle *fwnode);
|
||||
struct fwnode_handle *fwnode_get_next_parent(
|
||||
struct fwnode_handle *fwnode);
|
||||
unsigned int fwnode_count_parents(const struct fwnode_handle *fwn);
|
||||
struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwn,
|
||||
unsigned int depth);
|
||||
struct fwnode_handle *fwnode_get_next_child_node(
|
||||
const struct fwnode_handle *fwnode, struct fwnode_handle *child);
|
||||
struct fwnode_handle *fwnode_get_next_available_child_node(
|
||||
|
Reference in New Issue
Block a user