mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 06:52:07 +00:00
ACPI / property: Add possiblity to retrieve parent firmware node
Sometimes it is useful to be able to navigate firmware node hierarchy upwards toward parent nodes. ACPI device nodes are pretty much already supported because ACPICA provides acpi_get_parent(). ACPI data nodes, however, are all below the same parent ACPI device. Their hierarchy is created by "linking" each other using references in the value field. Add parent pointer to the parent data node while we create them so it is easy to navigate the hierarchy backwards. We use this parent pointer in a new function acpi_node_get_parent() that is able to extract parent of both ACPI firmware node types. 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
c02ed2e75e
commit
dfa672fbc0
3 changed files with 65 additions and 15 deletions
|
@ -999,6 +999,7 @@ int acpi_dev_prop_read(struct acpi_device *adev, const char *propname,
|
|||
|
||||
struct fwnode_handle *acpi_get_next_subnode(struct device *dev,
|
||||
struct fwnode_handle *subnode);
|
||||
struct fwnode_handle *acpi_node_get_parent(struct fwnode_handle *fwnode);
|
||||
|
||||
struct acpi_probe_entry;
|
||||
typedef bool (*acpi_probe_entry_validate_subtbl)(struct acpi_subtable_header *,
|
||||
|
@ -1121,6 +1122,12 @@ static inline struct fwnode_handle *acpi_get_next_subnode(struct device *dev,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct fwnode_handle *
|
||||
acpi_node_get_parent(struct fwnode_handle *fwnode)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#define ACPI_DECLARE_PROBE_ENTRY(table, name, table_id, subtable, valid, data, fn) \
|
||||
static const void * __acpi_table_##name[] \
|
||||
__attribute__((unused)) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue