mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
ACPI / property: Add fwnode_get_next_child_node()
The ACPI _DSD hierarchical data extension makes it possible to have hierarchies deeper than one level in similar way than DT allows. These "subsubnodes" have not been accessible because device property implementation only provides device_get_next_child_node() that is limited to direct descendants of a device. We need this ability in order support things like remote endpoints currently supported in DT with of_graph_* APIs. Modify acpi_get_next_subnode() to accept fwnode handle instead and update callers accordingly. Also add a new function fwnode_get_next_child_node() that works directly with fwnodes and modify device_get_next_child_node() to call it directly. While there add a macro fwnode_for_each_child_node() analogous to the current device_for_each_child_node() but it works with fwnodes instead of devices. Link: http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.pdf Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
afaf26fd84
commit
34055190b1
4 changed files with 58 additions and 23 deletions
|
@ -71,6 +71,12 @@ int fwnode_property_match_string(struct fwnode_handle *fwnode,
|
|||
const char *propname, const char *string);
|
||||
|
||||
struct fwnode_handle *fwnode_get_parent(struct fwnode_handle *fwnode);
|
||||
struct fwnode_handle *fwnode_get_next_child_node(struct fwnode_handle *fwnode,
|
||||
struct fwnode_handle *child);
|
||||
|
||||
#define fwnode_for_each_child_node(fwnode, child) \
|
||||
for (child = fwnode_get_next_child_node(fwnode, NULL); child; \
|
||||
child = fwnode_get_next_child_node(fwnode, child))
|
||||
|
||||
struct fwnode_handle *device_get_next_child_node(struct device *dev,
|
||||
struct fwnode_handle *child);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue