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

1 /* SPDX-License-Identifier: GPL-2.0+ */
8 * Copyright (C) 1996-2005 Paul Mackerras.
104 * of_node_init - initialize a devicetree node
110 * whether to free the memory will be done by node->release(), which is
116 kobject_init(&node->kobj, &of_node_ktype); in of_node_init()
118 fwnode_init(&node->fwnode, &of_fwnode_ops); in of_node_init()
122 #define of_node_kobj(n) (&(n)->kobj)
131 /* Dummy ref counting routines - to be implemented later */
157 #define OF_BAD_ADDR ((u64)-1)
164 return !IS_ERR_OR_NULL(fwnode) && fwnode->ops == &of_fwnode_ops; in is_of_node()
182 &__of_fwnode_handle_node->fwnode : NULL; \
187 return node && (node->parent == NULL); in of_node_is_root()
192 return test_bit(flag, &n->_flags); in of_node_check_flag()
198 return test_and_set_bit(flag, &n->_flags); in of_node_test_and_set_flag()
203 set_bit(flag, &n->_flags); in of_node_set_flag()
208 clear_bit(flag, &n->_flags); in of_node_clear_flag()
214 return test_bit(flag, &p->_flags); in of_property_check_flag()
219 set_bit(flag, &p->_flags); in of_property_set_flag()
224 clear_bit(flag, &p->_flags); in of_property_clear_flag()
239 for (; size--; cell++) in of_read_number()
255 #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
256 #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
263 return np ? np->full_name : "<no-node>"; in of_node_full_name()
412 * of_machine_is_compatible - Test root of device tree for a given compatible value
498 return "<no-node>"; in of_node_full_name()
639 return -ENOSYS; in of_property_count_elems_of_size()
645 return -ENOSYS; in of_property_read_u16_index()
651 return -ENOSYS; in of_property_read_u32_index()
657 return -ENOSYS; in of_property_read_u64_index()
680 return -ENODEV; in of_cpu_node_to_id()
708 return -ENOSYS; in of_property_read_variable_u8_array()
715 return -ENOSYS; in of_property_read_variable_u16_array()
724 return -ENOSYS; in of_property_read_variable_u32_array()
730 return -ENOSYS; in of_property_read_u64()
739 return -ENOSYS; in of_property_read_variable_u64_array()
746 return -ENOSYS; in of_property_read_string()
753 return -ENOSYS; in of_property_match_string()
760 return -ENOSYS; in of_property_read_string_helper()
770 return -ENOSYS; in __of_parse_phandle_with_args()
779 return -ENOSYS; in of_parse_phandle_with_args_map()
786 return -ENOSYS; in of_count_phandle_with_args()
792 return -ENODEV; in of_modalias()
797 return -ENODEV; in of_request_module()
806 return -ENOSYS; in of_phandle_iterator_init()
811 return -ENOSYS; in of_phandle_iterator_next()
823 return -ENOSYS; in of_alias_get_id()
828 return -ENOSYS; in of_alias_get_highest_id()
905 return -EINVAL; in of_map_id()
930 for (pp = dn->properties; pp != NULL; pp = pp->next)
946 return -ENOSYS; in of_numa_init()
970 * of_parse_phandle - Resolve a phandle property to a device_node pointer
993 * of_parse_phandle_with_args() - Find a node pointed by phandle in a list
1004 * Caller is responsible to call of_node_put() on the returned out_args->np
1010 * #list-cells = <2>;
1014 * #list-cells = <1>;
1022 * of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args);
1030 int cell_count = -1; in of_parse_phandle_with_args()
1041 * of_parse_phandle_with_fixed_args() - Find a node pointed by phandle in a list
1052 * Caller is responsible to call of_node_put() on the returned out_args->np
1081 * of_parse_phandle_with_optional_args() - Find a node pointed by phandle in a list
1092 * before and thus doesn't have a '#*-cells' property but is now migrated to
1106 * of_phandle_args_equal() - Compare two of_phandle_args
1116 return a1->np == a2->np && in of_phandle_args_equal()
1117 a1->args_count == a2->args_count && in of_phandle_args_equal()
1118 !memcmp(a1->args, a2->args, sizeof(a1->args[0]) * a1->args_count); in of_phandle_args_equal()
1122 * of_property_count_u8_elems - Count the number of u8 elements in a property
1130 * Return: The number of elements on sucess, -EINVAL if the property does
1131 * not exist or its length does not match a multiple of u8 and -ENODATA if the
1141 * of_property_count_u16_elems - Count the number of u16 elements in a property
1149 * Return: The number of elements on sucess, -EINVAL if the property does
1150 * not exist or its length does not match a multiple of u16 and -ENODATA if the
1160 * of_property_count_u32_elems - Count the number of u32 elements in a property
1168 * Return: The number of elements on sucess, -EINVAL if the property does
1169 * not exist or its length does not match a multiple of u32 and -ENODATA if the
1179 * of_property_count_u64_elems - Count the number of u64 elements in a property
1187 * Return: The number of elements on sucess, -EINVAL if the property does
1188 * not exist or its length does not match a multiple of u64 and -ENODATA if the
1198 * of_property_read_string_array() - Read an array of strings from a multiple
1199 * strings property.
1208 * Return: If @out_strs is NULL, the number of strings in the property is returned.
1218 * of_property_count_strings() - Find and return the number of strings from a
1219 * multiple strings property.
1226 * Return: The number of strings on success, -EINVAL if the property does not
1227 * exist, -ENODATA if property does not have a value, and -EILSEQ if the string
1228 * is not null-terminated within the length of the property data.
1237 * of_property_read_string_index() - Find and read a string from a multiple
1238 * strings property.
1241 * @index: index of the string in the list of strings
1246 * terminated string value (pointer to data, not a copy) in the list of strings
1249 * Return: 0 on success, -EINVAL if the property does not exist, -ENODATA if
1250 * property does not have a value, and -EILSEQ if the string is not
1251 * null-terminated within the length of the property data.
1264 * of_property_present - Test if a property is present in a node
1280 * of_property_read_u8_array - Find and read an array of u8 from a property.
1287 * Search for a property in a device node and read 8-bit value(s) from
1293 * Return: 0 on success, -EINVAL if the property does not exist,
1294 * -ENODATA if property does not have a value, and -EOVERFLOW if the
1312 * of_property_read_u16_array - Find and read an array of u16 from a property.
1319 * Search for a property in a device node and read 16-bit value(s) from
1325 * Return: 0 on success, -EINVAL if the property does not exist,
1326 * -ENODATA if property does not have a value, and -EOVERFLOW if the
1344 * of_property_read_u32_array - Find and read an array of 32 bit integers
1352 * Search for a property in a device node and read 32-bit value(s) from
1355 * Return: 0 on success, -EINVAL if the property does not exist,
1356 * -ENODATA if property does not have a value, and -EOVERFLOW if the
1374 * of_property_read_u64_array - Find and read an array of 64 bit integers
1382 * Search for a property in a device node and read 64-bit value(s) from
1385 * Return: 0 on success, -EINVAL if the property does not exist,
1386 * -ENODATA if property does not have a value, and -EOVERFLOW if the
1506 int num = 0; in of_get_child_count() local
1509 num++; in of_get_child_count()
1511 return num; in of_get_child_count()
1517 int num = 0; in of_get_available_child_count() local
1520 num++; in of_get_available_child_count()
1522 return num; in of_get_available_child_count()
1555 * struct of_changeset_entry - Holds a changeset entry
1577 * struct of_changeset - changeset tracker structure
1582 * live tree. In case of an error, changes are rolled-back.
1675 return -EINVAL; in of_reconfig_notifier_register()
1679 return -EINVAL; in of_reconfig_notifier_unregister()
1684 return -EINVAL; in of_reconfig_notify()
1689 return -EINVAL; in of_reconfig_get_state_change()
1694 * of_device_is_system_power_controller - Tells if system-power-controller is found for device_node
1701 return of_property_read_bool(np, "system-power-controller"); in of_device_is_system_power_controller()
1705 * of_have_populated_dt() - Has DT been populated by bootloader
1735 "pre-apply", in of_overlay_action_name()
1736 "post-apply", in of_overlay_action_name()
1737 "pre-remove", in of_overlay_action_name()
1738 "post-remove", in of_overlay_action_name()
1764 return -ENOTSUPP; in of_overlay_fdt_apply()
1769 return -ENOTSUPP; in of_overlay_remove()
1774 return -ENOTSUPP; in of_overlay_remove_all()