From 3e3119d3088f41106f3581d39e7694a50ca3fc02 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Fri, 21 Jul 2017 15:11:49 +0300 Subject: device property: Introduce fwnode_property_get_reference_args The new fwnode_property_get_reference_args() interface amends the fwnode property API with the functionality of both of_parse_phandle_with_args() and __acpi_node_get_property_reference(). The semantics is slightly different: the cells property is ignored on ACPI as the number of arguments can be explicitly obtained from the firmware interface. Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki --- include/linux/property.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/linux/property.h') diff --git a/include/linux/property.h b/include/linux/property.h index edff3f89e755..6bebee13c5e0 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -73,6 +73,10 @@ int fwnode_property_read_string(const struct fwnode_handle *fwnode, const char *propname, const char **val); int fwnode_property_match_string(const struct fwnode_handle *fwnode, const char *propname, const char *string); +int fwnode_property_get_reference_args(const struct fwnode_handle *fwnode, + const char *prop, const char *nargs_prop, + unsigned int nargs, unsigned int index, + struct fwnode_reference_args *args); struct fwnode_handle *fwnode_get_parent(const struct fwnode_handle *fwnode); struct fwnode_handle *fwnode_get_next_parent( -- cgit v1.2.3-59-g8ed1b