Lines Matching +full:num +full:- +full:strings

1 /* SPDX-License-Identifier: GPL-2.0+ */
8 * Copyright (C) 1996-2005 Paul Mackerras.
103 * of_node_init - initialize a devicetree node
109 * whether to free the memory will be done by node->release(), which is
115 kobject_init(&node->kobj, &of_node_ktype); in of_node_init()
117 fwnode_init(&node->fwnode, &of_fwnode_ops); in of_node_init()
121 #define of_node_kobj(n) (&(n)->kobj)
130 /* Dummy ref counting routines - to be implemented later */
155 #define OF_BAD_ADDR ((u64)-1)
162 return !IS_ERR_OR_NULL(fwnode) && fwnode->ops == &of_fwnode_ops; in is_of_node()
180 &__of_fwnode_handle_node->fwnode : NULL; \
190 return node && (node->parent == NULL); in of_node_is_root()
195 return test_bit(flag, &n->_flags); in of_node_check_flag()
201 return test_and_set_bit(flag, &n->_flags); in of_node_test_and_set_flag()
206 set_bit(flag, &n->_flags); in of_node_set_flag()
211 clear_bit(flag, &n->_flags); in of_node_clear_flag()
217 return test_bit(flag, &p->_flags); in of_property_check_flag()
222 set_bit(flag, &p->_flags); in of_property_set_flag()
227 clear_bit(flag, &p->_flags); in of_property_clear_flag()
242 for (; size--; cell++) in of_read_number()
258 #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
259 #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
266 return np ? np->full_name : "<no-node>"; in of_node_full_name()
366 for (pp = dn->properties; pp != NULL; pp = pp->next)
483 return "<no-node>"; in of_node_full_name()
610 return -ENOSYS; in of_property_count_elems_of_size()
616 return -ENOSYS; in of_property_read_u32_index()
622 return -ENOSYS; in of_property_read_u64_index()
645 return -ENODEV; in of_cpu_node_to_id()
673 return -ENOSYS; in of_property_read_variable_u8_array()
680 return -ENOSYS; in of_property_read_variable_u16_array()
689 return -ENOSYS; in of_property_read_variable_u32_array()
695 return -ENOSYS; in of_property_read_u64()
704 return -ENOSYS; in of_property_read_variable_u64_array()
711 return -ENOSYS; in of_property_read_string()
718 return -ENOSYS; in of_property_match_string()
725 return -ENOSYS; in of_property_read_string_helper()
735 return -ENOSYS; in __of_parse_phandle_with_args()
744 return -ENOSYS; in of_parse_phandle_with_args_map()
751 return -ENOSYS; in of_count_phandle_with_args()
757 return -ENODEV; in of_modalias()
762 return -ENODEV; in of_request_module()
771 return -ENOSYS; in of_phandle_iterator_init()
776 return -ENOSYS; in of_phandle_iterator_next()
788 return -ENOSYS; in of_alias_get_id()
793 return -ENOSYS; in of_alias_get_highest_id()
865 return -EINVAL; in of_map_id()
891 return p1->length == p2->length && in of_prop_val_eq()
892 !memcmp(p1->value, p2->value, (size_t)p1->length); in of_prop_val_eq()
909 return -ENOSYS; in of_numa_init()
933 * of_parse_phandle - Resolve a phandle property to a device_node pointer
956 * of_parse_phandle_with_args() - Find a node pointed by phandle in a list
967 * Caller is responsible to call of_node_put() on the returned out_args->np
973 * #list-cells = <2>;
977 * #list-cells = <1>;
985 * of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args);
993 int cell_count = -1; in of_parse_phandle_with_args()
1004 * of_parse_phandle_with_fixed_args() - Find a node pointed by phandle in a list
1015 * Caller is responsible to call of_node_put() on the returned out_args->np
1044 * of_parse_phandle_with_optional_args() - Find a node pointed by phandle in a list
1055 * before and thus doesn't have a '#*-cells' property but is now migrated to
1069 * of_property_count_u8_elems - Count the number of u8 elements in a property
1077 * Return: The number of elements on sucess, -EINVAL if the property does
1078 * not exist or its length does not match a multiple of u8 and -ENODATA if the
1088 * of_property_count_u16_elems - Count the number of u16 elements in a property
1096 * Return: The number of elements on sucess, -EINVAL if the property does
1097 * not exist or its length does not match a multiple of u16 and -ENODATA if the
1107 * of_property_count_u32_elems - Count the number of u32 elements in a property
1115 * Return: The number of elements on sucess, -EINVAL if the property does
1116 * not exist or its length does not match a multiple of u32 and -ENODATA if the
1126 * of_property_count_u64_elems - Count the number of u64 elements in a property
1134 * Return: The number of elements on sucess, -EINVAL if the property does
1135 * not exist or its length does not match a multiple of u64 and -ENODATA if the
1145 * of_property_read_string_array() - Read an array of strings from a multiple
1146 * strings property.
1155 * Return: If @out_strs is NULL, the number of strings in the property is returned.
1165 * of_property_count_strings() - Find and return the number of strings from a
1166 * multiple strings property.
1173 * Return: The number of strings on success, -EINVAL if the property does not
1174 * exist, -ENODATA if property does not have a value, and -EILSEQ if the string
1175 * is not null-terminated within the length of the property data.
1184 * of_property_read_string_index() - Find and read a string from a multiple
1185 * strings property.
1188 * @index: index of the string in the list of strings
1193 * terminated string value (pointer to data, not a copy) in the list of strings
1196 * Return: 0 on success, -EINVAL if the property does not exist, -ENODATA if
1197 * property does not have a value, and -EILSEQ if the string is not
1198 * null-terminated within the length of the property data.
1211 * of_property_read_bool - Find a property
1215 * Search for a boolean property in a device node. Usage on non-boolean
1229 * of_property_present - Test if a property is present in a node
1243 * of_property_read_u8_array - Find and read an array of u8 from a property.
1250 * Search for a property in a device node and read 8-bit value(s) from
1256 * Return: 0 on success, -EINVAL if the property does not exist,
1257 * -ENODATA if property does not have a value, and -EOVERFLOW if the
1275 * of_property_read_u16_array - Find and read an array of u16 from a property.
1282 * Search for a property in a device node and read 16-bit value(s) from
1288 * Return: 0 on success, -EINVAL if the property does not exist,
1289 * -ENODATA if property does not have a value, and -EOVERFLOW if the
1307 * of_property_read_u32_array - Find and read an array of 32 bit integers
1315 * Search for a property in a device node and read 32-bit value(s) from
1318 * Return: 0 on success, -EINVAL if the property does not exist,
1319 * -ENODATA if property does not have a value, and -EOVERFLOW if the
1337 * of_property_read_u64_array - Find and read an array of 64 bit integers
1345 * Search for a property in a device node and read 64-bit value(s) from
1348 * Return: 0 on success, -EINVAL if the property does not exist,
1349 * -ENODATA if property does not have a value, and -EOVERFLOW if the
1446 int num = 0; in of_get_child_count() local
1449 num++; in of_get_child_count()
1451 return num; in of_get_child_count()
1457 int num = 0; in of_get_available_child_count() local
1460 num++; in of_get_available_child_count()
1462 return num; in of_get_available_child_count()
1495 * struct of_changeset_entry - Holds a changeset entry
1517 * struct of_changeset - changeset tracker structure
1522 * live tree. In case of an error, changes are rolled-back.
1608 return -EINVAL; in of_reconfig_notifier_register()
1612 return -EINVAL; in of_reconfig_notifier_unregister()
1617 return -EINVAL; in of_reconfig_notify()
1622 return -EINVAL; in of_reconfig_get_state_change()
1627 * of_device_is_system_power_controller - Tells if system-power-controller is found for device_node
1634 return of_property_read_bool(np, "system-power-controller"); in of_device_is_system_power_controller()
1653 "pre-apply", in of_overlay_action_name()
1654 "post-apply", in of_overlay_action_name()
1655 "pre-remove", in of_overlay_action_name()
1656 "post-remove", in of_overlay_action_name()
1682 return -ENOTSUPP; in of_overlay_fdt_apply()
1687 return -ENOTSUPP; in of_overlay_remove()
1692 return -ENOTSUPP; in of_overlay_remove_all()