Lines Matching +full:a +full:- +full:child +full:- +full:node +full:- +full:property

1 // SPDX-License-Identifier: GPL-2.0+
3 * drivers/of/property.c - Procedures for accessing and interpreting
7 * file contains the OF property as well as the OF graph interface
11 * Copyright (C) 1996-2005 Paul Mackerras.
34 * of_graph_is_present() - check graph's presence
35 * @node: pointer to device_node containing graph port
37 * Return: True if @node has a port or ports (with a port) sub-node,
40 bool of_graph_is_present(const struct device_node *node) in of_graph_is_present() argument
44 ports = of_get_child_by_name(node, "ports"); in of_graph_is_present()
46 node = ports; in of_graph_is_present()
48 port = of_get_child_by_name(node, "port"); in of_graph_is_present()
57 * of_property_count_elems_of_size - Count the number of elements in a property
59 * @np: device node from which the property value is to be read.
60 * @propname: name of the property to be searched.
63 * Search for a property in a device node and count the number of elements of
66 * Return: The number of elements on sucess, -EINVAL if the property does not
67 * exist or its length does not match a multiple of elem_size and -ENODATA if
68 * the property does not have a value.
73 struct property *prop = of_find_property(np, propname, NULL); in of_property_count_elems_of_size()
76 return -EINVAL; in of_property_count_elems_of_size()
77 if (!prop->value) in of_property_count_elems_of_size()
78 return -ENODATA; in of_property_count_elems_of_size()
80 if (prop->length % elem_size != 0) { in of_property_count_elems_of_size()
81 pr_err("size of %s in node %pOF is not a multiple of %d\n", in of_property_count_elems_of_size()
83 return -EINVAL; in of_property_count_elems_of_size()
86 return prop->length / elem_size; in of_property_count_elems_of_size()
93 * @np: device node from which the property value is to be read.
94 * @propname: name of the property to be searched.
95 * @min: minimum allowed length of property value
96 * @max: maximum allowed length of property value (0 means unlimited)
99 * Search for a property in a device node and valid the requested size.
101 * Return: The property value on success, -EINVAL if the property does not
102 * exist, -ENODATA if property does not have a value, and -EOVERFLOW if the
103 * property data is too small or too large.
109 struct property *prop = of_find_property(np, propname, NULL); in of_find_property_value_of_size()
112 return ERR_PTR(-EINVAL); in of_find_property_value_of_size()
113 if (!prop->value) in of_find_property_value_of_size()
114 return ERR_PTR(-ENODATA); in of_find_property_value_of_size()
115 if (prop->length < min) in of_find_property_value_of_size()
116 return ERR_PTR(-EOVERFLOW); in of_find_property_value_of_size()
117 if (max && prop->length > max) in of_find_property_value_of_size()
118 return ERR_PTR(-EOVERFLOW); in of_find_property_value_of_size()
121 *len = prop->length; in of_find_property_value_of_size()
123 return prop->value; in of_find_property_value_of_size()
127 * of_property_read_u32_index - Find and read a u32 from a multi-value property.
129 * @np: device node from which the property value is to be read.
130 * @propname: name of the property to be searched.
134 * Search for a property in a device node and read nth 32-bit value from
137 * Return: 0 on success, -EINVAL if the property does not exist,
138 * -ENODATA if property does not have a value, and -EOVERFLOW if the
139 * property data isn't large enough.
141 * The out_value is modified only if a valid u32 value can be decoded.
161 * of_property_read_u64_index - Find and read a u64 from a multi-value property.
163 * @np: device node from which the property value is to be read.
164 * @propname: name of the property to be searched.
168 * Search for a property in a device node and read nth 64-bit value from
171 * Return: 0 on success, -EINVAL if the property does not exist,
172 * -ENODATA if property does not have a value, and -EOVERFLOW if the
173 * property data isn't large enough.
175 * The out_value is modified only if a valid u64 value can be decoded.
194 * of_property_read_variable_u8_array - Find and read an array of u8 from a
195 * property, with bounds on the minimum and maximum array size.
197 * @np: device node from which the property value is to be read.
198 * @propname: name of the property to be searched.
205 * Search for a property in a device node and read 8-bit value(s) from
209 * ``property = /bits/ 8 <0x50 0x60 0x70>;``
211 * Return: The number of elements read on success, -EINVAL if the property
212 * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW
213 * if the property data is smaller than sz_min or longer than sz_max.
215 * The out_values is modified only if a valid u8 value can be decoded.
236 while (count--) in of_property_read_variable_u8_array()
244 * of_property_read_variable_u16_array - Find and read an array of u16 from a
245 * property, with bounds on the minimum and maximum array size.
247 * @np: device node from which the property value is to be read.
248 * @propname: name of the property to be searched.
255 * Search for a property in a device node and read 16-bit value(s) from
259 * ``property = /bits/ 16 <0x5000 0x6000 0x7000>;``
261 * Return: The number of elements read on success, -EINVAL if the property
262 * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW
263 * if the property data is smaller than sz_min or longer than sz_max.
265 * The out_values is modified only if a valid u16 value can be decoded.
286 while (count--) in of_property_read_variable_u16_array()
294 * of_property_read_variable_u32_array - Find and read an array of 32 bit
295 * integers from a property, with bounds on the minimum and maximum array size.
297 * @np: device node from which the property value is to be read.
298 * @propname: name of the property to be searched.
305 * Search for a property in a device node and read 32-bit value(s) from
308 * Return: The number of elements read on success, -EINVAL if the property
309 * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW
310 * if the property data is smaller than sz_min or longer than sz_max.
312 * The out_values is modified only if a valid u32 value can be decoded.
333 while (count--) in of_property_read_variable_u32_array()
341 * of_property_read_u64 - Find and read a 64 bit integer from a property
342 * @np: device node from which the property value is to be read.
343 * @propname: name of the property to be searched.
346 * Search for a property in a device node and read a 64-bit value from
349 * Return: 0 on success, -EINVAL if the property does not exist,
350 * -ENODATA if property does not have a value, and -EOVERFLOW if the
351 * property data isn't large enough.
353 * The out_value is modified only if a valid u64 value can be decoded.
372 * of_property_read_variable_u64_array - Find and read an array of 64 bit
373 * integers from a property, with bounds on the minimum and maximum array size.
375 * @np: device node from which the property value is to be read.
376 * @propname: name of the property to be searched.
383 * Search for a property in a device node and read 64-bit value(s) from
386 * Return: The number of elements read on success, -EINVAL if the property
387 * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW
388 * if the property data is smaller than sz_min or longer than sz_max.
390 * The out_values is modified only if a valid u64 value can be decoded.
411 while (count--) { in of_property_read_variable_u64_array()
421 * of_property_read_string - Find and read a string from a property
422 * @np: device node from which the property value is to be read.
423 * @propname: name of the property to be searched.
427 * Search for a property in a device tree node and retrieve a null
428 * terminated string value (pointer to data, not a copy).
430 * Return: 0 on success, -EINVAL if the property does not exist, -ENODATA if
431 * property does not have a value, and -EILSEQ if the string is not
432 * null-terminated within the length of the property data.
434 * The out_string pointer is modified only if a valid string can be decoded.
439 const struct property *prop = of_find_property(np, propname, NULL); in of_property_read_string()
441 return -EINVAL; in of_property_read_string()
442 if (!prop->value) in of_property_read_string()
443 return -ENODATA; in of_property_read_string()
444 if (strnlen(prop->value, prop->length) >= prop->length) in of_property_read_string()
445 return -EILSEQ; in of_property_read_string()
446 *out_string = prop->value; in of_property_read_string()
452 * of_property_match_string() - Find string in a list and return index
453 * @np: pointer to node containing string list property
454 * @propname: string list property name
457 * This function searches a string list property and returns the index
458 * of a specific string value.
463 const struct property *prop = of_find_property(np, propname, NULL); in of_property_match_string()
469 return -EINVAL; in of_property_match_string()
470 if (!prop->value) in of_property_match_string()
471 return -ENODATA; in of_property_match_string()
473 p = prop->value; in of_property_match_string()
474 end = p + prop->length; in of_property_match_string()
477 l = strnlen(p, end - p) + 1; in of_property_match_string()
479 return -EILSEQ; in of_property_match_string()
484 return -ENODATA; in of_property_match_string()
489 * of_property_read_string_helper() - Utility helper for parsing string properties
490 * @np: device node from which the property value is to be read.
491 * @propname: name of the property to be searched.
496 * Don't call this function directly. It is a utility helper for the
503 const struct property *prop = of_find_property(np, propname, NULL); in of_property_read_string_helper()
508 return -EINVAL; in of_property_read_string_helper()
509 if (!prop->value) in of_property_read_string_helper()
510 return -ENODATA; in of_property_read_string_helper()
511 p = prop->value; in of_property_read_string_helper()
512 end = p + prop->length; in of_property_read_string_helper()
515 l = strnlen(p, end - p) + 1; in of_property_read_string_helper()
517 return -EILSEQ; in of_property_read_string_helper()
521 i -= skip; in of_property_read_string_helper()
522 return i <= 0 ? -ENODATA : i; in of_property_read_string_helper()
526 const __be32 *of_prop_next_u32(struct property *prop, const __be32 *cur, in of_prop_next_u32()
535 curv = prop->value; in of_prop_next_u32()
540 if (curv >= prop->value + prop->length) in of_prop_next_u32()
549 const char *of_prop_next_string(struct property *prop, const char *cur) in of_prop_next_string()
557 return prop->value; in of_prop_next_string()
560 if (curv >= prop->value + prop->length) in of_prop_next_string()
568 * of_graph_parse_endpoint() - parse common endpoint node properties
569 * @node: pointer to endpoint device_node
572 * The caller should hold a reference to @node.
574 int of_graph_parse_endpoint(const struct device_node *node, in of_graph_parse_endpoint() argument
577 struct device_node *port_node = of_get_parent(node); in of_graph_parse_endpoint()
579 WARN_ONCE(!port_node, "%s(): endpoint %pOF has no parent node\n", in of_graph_parse_endpoint()
580 __func__, node); in of_graph_parse_endpoint()
584 endpoint->local_node = node; in of_graph_parse_endpoint()
589 of_property_read_u32(port_node, "reg", &endpoint->port); in of_graph_parse_endpoint()
590 of_property_read_u32(node, "reg", &endpoint->id); in of_graph_parse_endpoint()
599 * of_graph_get_port_by_id() - get the port matching a given id
600 * @parent: pointer to the parent device node
603 * Return: A 'port' node pointer with refcount incremented. The caller
608 struct device_node *node, *port; in of_graph_get_port_by_id() local
610 node = of_get_child_by_name(parent, "ports"); in of_graph_get_port_by_id()
611 if (node) in of_graph_get_port_by_id()
612 parent = node; in of_graph_get_port_by_id()
624 of_node_put(node); in of_graph_get_port_by_id()
631 * of_graph_get_next_endpoint() - get next endpoint node
632 * @parent: pointer to the parent device node
633 * @prev: previous endpoint node, or NULL to get first
635 * Return: An 'endpoint' node pointer with refcount incremented. Refcount
636 * of the passed @prev node is decremented.
648 * Start by locating the port node. If no previous endpoint is specified in of_graph_get_next_endpoint()
649 * search for the first port node, otherwise get the previous endpoint in of_graph_get_next_endpoint()
650 * parent port node. in of_graph_get_next_endpoint()
653 struct device_node *node; in of_graph_get_next_endpoint() local
655 node = of_get_child_by_name(parent, "ports"); in of_graph_get_next_endpoint()
656 if (node) in of_graph_get_next_endpoint()
657 parent = node; in of_graph_get_next_endpoint()
660 of_node_put(node); in of_graph_get_next_endpoint()
663 pr_err("graph: no port node found in %pOF\n", parent); in of_graph_get_next_endpoint()
668 if (WARN_ONCE(!port, "%s(): endpoint %pOF has no parent node\n", in of_graph_get_next_endpoint()
675 * Now that we have a port node, get the next endpoint by in of_graph_get_next_endpoint()
676 * getting the next child. If the previous endpoint is NULL this in of_graph_get_next_endpoint()
677 * will return the first child. in of_graph_get_next_endpoint()
698 * of_graph_get_endpoint_by_regs() - get endpoint node of specific identifiers
699 * @parent: pointer to the parent device node
700 * @port_reg: identifier (value of reg property) of the parent port node
701 * @reg: identifier (value of reg property) of the endpoint node
703 * Return: An 'endpoint' node pointer which is identified by reg and at the same
704 * is the child of a port node identified by port_reg. reg and port_reg are
705 * ignored when they are -1. Use of_node_put() on the pointer when done.
711 struct device_node *node = NULL; in of_graph_get_endpoint_by_regs() local
713 for_each_endpoint_of_node(parent, node) { in of_graph_get_endpoint_by_regs()
714 of_graph_parse_endpoint(node, &endpoint); in of_graph_get_endpoint_by_regs()
715 if (((port_reg == -1) || (endpoint.port == port_reg)) && in of_graph_get_endpoint_by_regs()
716 ((reg == -1) || (endpoint.id == reg))) in of_graph_get_endpoint_by_regs()
717 return node; in of_graph_get_endpoint_by_regs()
725 * of_graph_get_remote_endpoint() - get remote endpoint node
726 * @node: pointer to a local endpoint device_node
728 * Return: Remote endpoint node associated with remote endpoint node linked
729 * to @node. Use of_node_put() on it when done.
731 struct device_node *of_graph_get_remote_endpoint(const struct device_node *node) in of_graph_get_remote_endpoint() argument
733 /* Get remote endpoint node. */ in of_graph_get_remote_endpoint()
734 return of_parse_phandle(node, "remote-endpoint", 0); in of_graph_get_remote_endpoint()
739 * of_graph_get_port_parent() - get port's parent node
740 * @node: pointer to a local endpoint device_node
742 * Return: device node associated with endpoint node linked
743 * to @node. Use of_node_put() on it when done.
745 struct device_node *of_graph_get_port_parent(struct device_node *node) in of_graph_get_port_parent() argument
749 if (!node) in of_graph_get_port_parent()
753 * Preserve usecount for passed in node as of_get_next_parent() in of_graph_get_port_parent()
756 of_node_get(node); in of_graph_get_port_parent()
758 /* Walk 3 levels up only if there is 'ports' node. */ in of_graph_get_port_parent()
759 for (depth = 3; depth && node; depth--) { in of_graph_get_port_parent()
760 node = of_get_next_parent(node); in of_graph_get_port_parent()
761 if (depth == 2 && !of_node_name_eq(node, "ports")) in of_graph_get_port_parent()
764 return node; in of_graph_get_port_parent()
769 * of_graph_get_remote_port_parent() - get remote port's parent node
770 * @node: pointer to a local endpoint device_node
772 * Return: Remote device node associated with remote endpoint node linked
773 * to @node. Use of_node_put() on it when done.
776 const struct device_node *node) in of_graph_get_remote_port_parent() argument
780 /* Get remote endpoint node. */ in of_graph_get_remote_port_parent()
781 np = of_graph_get_remote_endpoint(node); in of_graph_get_remote_port_parent()
792 * of_graph_get_remote_port() - get remote port node
793 * @node: pointer to a local endpoint device_node
795 * Return: Remote port node associated with remote endpoint node linked
796 * to @node. Use of_node_put() on it when done.
798 struct device_node *of_graph_get_remote_port(const struct device_node *node) in of_graph_get_remote_port() argument
802 /* Get remote endpoint node. */ in of_graph_get_remote_port()
803 np = of_graph_get_remote_endpoint(node); in of_graph_get_remote_port()
823 * of_graph_get_remote_node() - get remote parent device_node for given port/endpoint
824 * @node: pointer to parent device_node containing graph port/endpoint
825 * @port: identifier (value of reg property) of the parent port node
826 * @endpoint: identifier (value of reg property) of the endpoint node
828 * Return: Remote device node associated with remote endpoint node linked
829 * to @node. Use of_node_put() on it when done.
831 struct device_node *of_graph_get_remote_node(const struct device_node *node, in of_graph_get_remote_node() argument
836 endpoint_node = of_graph_get_endpoint_by_regs(node, port, endpoint); in of_graph_get_remote_node()
838 pr_debug("no valid endpoint (%d, %d) for node %pOF\n", in of_graph_get_remote_node()
839 port, endpoint, node); in of_graph_get_remote_node()
846 pr_debug("no valid remote node\n"); in of_graph_get_remote_node()
851 pr_debug("not available for remote node\n"); in of_graph_get_remote_node()
886 const struct device_node *node = to_of_node(fwnode); in of_fwnode_property_read_int_array() local
889 return of_property_count_elems_of_size(node, propname, in of_fwnode_property_read_int_array()
894 return of_property_read_u8_array(node, propname, val, nval); in of_fwnode_property_read_int_array()
896 return of_property_read_u16_array(node, propname, val, nval); in of_fwnode_property_read_int_array()
898 return of_property_read_u32_array(node, propname, val, nval); in of_fwnode_property_read_int_array()
900 return of_property_read_u64_array(node, propname, val, nval); in of_fwnode_property_read_int_array()
903 return -ENXIO; in of_fwnode_property_read_int_array()
911 const struct device_node *node = to_of_node(fwnode); in of_fwnode_property_read_string_array() local
914 of_property_read_string_array(node, propname, val, nval) : in of_fwnode_property_read_string_array()
915 of_property_count_strings(node, propname); in of_fwnode_property_read_string_array()
920 return kbasename(to_of_node(fwnode)->full_name); in of_fwnode_get_name()
926 if (!to_of_node(fwnode)->parent) in of_fwnode_get_name_prefix()
940 struct fwnode_handle *child) in of_fwnode_get_next_child_node() argument
943 to_of_node(child))); in of_fwnode_get_next_child_node()
950 const struct device_node *node = to_of_node(fwnode); in of_fwnode_get_named_child_node() local
951 struct device_node *child; in of_fwnode_get_named_child_node() local
953 for_each_available_child_of_node(node, child) in of_fwnode_get_named_child_node()
954 if (of_node_name_eq(child, childname)) in of_fwnode_get_named_child_node()
955 return of_fwnode_handle(child); in of_fwnode_get_named_child_node()
981 args->nargs = of_args.args_count; in of_fwnode_get_reference_args()
982 args->fwnode = of_fwnode_handle(of_args.np); in of_fwnode_get_reference_args()
985 args->args[i] = i < of_args.args_count ? of_args.args[i] : 0; in of_fwnode_get_reference_args()
1015 /* Is this the "ports" node? If not, it's the port parent. */ in of_fwnode_graph_get_port_parent()
1025 const struct device_node *node = to_of_node(fwnode); in of_fwnode_graph_parse_endpoint() local
1026 struct device_node *port_node = of_get_parent(node); in of_fwnode_graph_parse_endpoint()
1028 endpoint->local_fwnode = fwnode; in of_fwnode_graph_parse_endpoint()
1030 of_property_read_u32(port_node, "reg", &endpoint->port); in of_fwnode_graph_parse_endpoint()
1031 of_property_read_u32(node, "reg", &endpoint->id); in of_fwnode_graph_parse_endpoint()
1046 struct device_node *child) in of_is_ancestor_of() argument
1048 of_node_get(child); in of_is_ancestor_of()
1049 while (child) { in of_is_ancestor_of()
1050 if (child == test_ancestor) { in of_is_ancestor_of()
1051 of_node_put(child); in of_is_ancestor_of()
1054 child = of_get_next_parent(child); in of_is_ancestor_of()
1079 * of_link_to_phandle - Add fwnode link to supplier from supplier phandle
1080 * @con_np: consumer device tree node
1081 * @sup_np: supplier device tree node
1083 * Given a phandle to a supplier device tree node (@sup_np), this function
1084 * finds the device that owns the supplier device tree node and creates a
1086 * doesn't create device links for invalid scenarios such as trying to create a
1087 * link with a parent device as the consumer of its child device. In such
1091 * - 0 if fwnode link successfully created to supplier
1092 * - -EINVAL if the supplier link is invalid and should not be created
1093 * - -ENODEV if struct device will never be create for supplier
1102 * Find the device node that contains the supplier phandle. It may be in of_link_to_phandle()
1107 pr_debug("Not linking %pOFP to %pOFP - No device\n", in of_link_to_phandle()
1109 return -ENODEV; in of_link_to_phandle()
1113 * Don't allow linking a device node as a consumer of one of its in of_link_to_phandle()
1114 * descendant nodes. By definition, a child node can't be a functional in of_link_to_phandle()
1115 * dependency for the parent node. in of_link_to_phandle()
1118 pr_debug("Not linking %pOFP to %pOFP - is descendant\n", in of_link_to_phandle()
1121 return -EINVAL; in of_link_to_phandle()
1128 sup_dev = get_dev_from_fwnode(&sup_np->fwnode); in of_link_to_phandle()
1131 sup_np->fwnode.flags & FWNODE_FLAG_NOT_DEVICE)) { in of_link_to_phandle()
1132 pr_debug("Not linking %pOFP to %pOFP - No struct device\n", in of_link_to_phandle()
1135 return -ENODEV; in of_link_to_phandle()
1146 * parse_prop_cells - Property parsing function for suppliers
1148 * @np: Pointer to device tree node containing a list
1149 * @prop_name: Name of property to be parsed. Expected to hold phandle values
1150 * @index: For properties holding a list of phandles, this is the index
1152 * @list_name: Property name that is known to contain list of phandle(s) to
1154 * @cells_name: property name that specifies phandles' arguments count
1156 * This is a helper function to parse properties that have a known fixed name
1157 * and are a list of phandles and phandle arguments.
1160 * - phandle node pointer with refcount incremented. Caller must of_node_put()
1162 * - NULL if no phandle found at index
1195 return -1; in strcmp_suffix()
1196 return strcmp(str + len - suffix_len, suffix); in strcmp_suffix()
1200 * parse_suffix_prop_cells - Suffix property parsing function for suppliers
1202 * @np: Pointer to device tree node containing a list
1203 * @prop_name: Name of property to be parsed. Expected to hold phandle values
1204 * @index: For properties holding a list of phandles, this is the index
1206 * @suffix: Property suffix that is known to contain list of phandle(s) to
1208 * @cells_name: property name that specifies phandles' arguments count
1210 * This is a helper function to parse properties that have a known fixed suffix
1211 * and are a list of phandles and phandle arguments.
1214 * - phandle node pointer with refcount incremented. Caller must of_node_put()
1216 * - NULL if no phandle found at index
1243 * struct supplier_bindings - Property parsing functions for suppliers
1246 * parse_prop() finds the node corresponding to a supplier phandle
1247 * @parse_prop.np: Pointer to device node holding supplier phandle property
1248 * @parse_prop.prop_name: Name of property holding a phandle value
1249 * @parse_prop.index: For properties holding a list of phandles, this is the
1251 * @optional: Describes whether a supplier is mandatory or not
1252 * @node_not_dev: The consumer node containing the property is never a device.
1256 * - phandle node pointer with refcount incremented. Caller must of_node_put()
1258 * - NULL if no phandle found at index
1267 DEFINE_SIMPLE_PROP(clocks, "clocks", "#clock-cells")
1268 DEFINE_SIMPLE_PROP(interconnects, "interconnects", "#interconnect-cells")
1269 DEFINE_SIMPLE_PROP(iommus, "iommus", "#iommu-cells")
1270 DEFINE_SIMPLE_PROP(mboxes, "mboxes", "#mbox-cells")
1271 DEFINE_SIMPLE_PROP(io_channels, "io-channel", "#io-channel-cells")
1272 DEFINE_SIMPLE_PROP(interrupt_parent, "interrupt-parent", NULL)
1273 DEFINE_SIMPLE_PROP(dmas, "dmas", "#dma-cells")
1274 DEFINE_SIMPLE_PROP(power_domains, "power-domains", "#power-domain-cells")
1275 DEFINE_SIMPLE_PROP(hwlocks, "hwlocks", "#hwlock-cells")
1277 DEFINE_SIMPLE_PROP(nvmem_cells, "nvmem-cells", NULL)
1278 DEFINE_SIMPLE_PROP(phys, "phys", "#phy-cells")
1279 DEFINE_SIMPLE_PROP(wakeup_parent, "wakeup-parent", NULL)
1280 DEFINE_SIMPLE_PROP(pinctrl0, "pinctrl-0", NULL)
1281 DEFINE_SIMPLE_PROP(pinctrl1, "pinctrl-1", NULL)
1282 DEFINE_SIMPLE_PROP(pinctrl2, "pinctrl-2", NULL)
1283 DEFINE_SIMPLE_PROP(pinctrl3, "pinctrl-3", NULL)
1284 DEFINE_SIMPLE_PROP(pinctrl4, "pinctrl-4", NULL)
1285 DEFINE_SIMPLE_PROP(pinctrl5, "pinctrl-5", NULL)
1286 DEFINE_SIMPLE_PROP(pinctrl6, "pinctrl-6", NULL)
1287 DEFINE_SIMPLE_PROP(pinctrl7, "pinctrl-7", NULL)
1288 DEFINE_SIMPLE_PROP(pinctrl8, "pinctrl-8", NULL)
1289 DEFINE_SIMPLE_PROP(remote_endpoint, "remote-endpoint", NULL)
1290 DEFINE_SIMPLE_PROP(pwms, "pwms", "#pwm-cells")
1291 DEFINE_SIMPLE_PROP(resets, "resets", "#reset-cells")
1294 DEFINE_SUFFIX_PROP(regulators, "-supply", NULL)
1295 DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells")
1300 if (!strcmp_suffix(prop_name, ",nr-gpios")) in parse_gpios()
1303 return parse_suffix_prop_cells(np, prop_name, index, "-gpios", in parse_gpios()
1304 "#gpio-cells"); in parse_gpios()
1310 if (strcmp(prop_name, "iommu-map")) in parse_iommu_maps()
1325 * Ignore node with gpio-hog property since its gpios are all provided in parse_gpio_compat()
1328 if (of_find_property(np, "gpio-hog", NULL)) in parse_gpio_compat()
1331 if (of_parse_phandle_with_args(np, prop_name, "#gpio-cells", index, in parse_gpio_compat()
1347 strcmp(prop_name, "interrupts-extended")) in parse_interrupts()
1391 * of_link_property - Create device links to suppliers listed in a property
1392 * @con_np: The consumer device tree node which contains the property
1393 * @prop_name: Name of property to be parsed
1395 * This function checks if the property @prop_name that is present in the
1396 * @con_np device tree node is one of the known common device tree bindings
1401 * consumer device tree node @con_np to all the suppliers device tree nodes
1404 * Any failed attempt to create a fwnode link will NOT result in an immediate
1406 * device tree nodes even when attempts to create a link to one or more
1417 while (!matched && s->parse_prop) { in of_link_property()
1418 if (s->optional && !fw_devlink_is_strict()) { in of_link_property()
1423 while ((phandle = s->parse_prop(con_np, prop_name, i))) { in of_link_property()
1426 con_dev_np = s->node_not_dev in of_link_property()
1442 struct property *p; in of_fwnode_add_links()
1449 return -EINVAL; in of_fwnode_add_links()
1452 of_link_property(con_np, p->name); in of_fwnode_add_links()