Lines Matching +full:- +full:eproto

1 // SPDX-License-Identifier: GPL-2.0
3 * property.c - Unified device property interface.
23 return IS_ENABLED(CONFIG_OF) && dev->of_node ? in __dev_fwnode()
24 of_fwnode_handle(dev->of_node) : dev->fwnode; in __dev_fwnode()
30 return IS_ENABLED(CONFIG_OF) && dev->of_node ? in __dev_fwnode_const()
31 of_fwnode_handle(dev->of_node) : dev->fwnode; in __dev_fwnode_const()
36 * device_property_present - check if a property of a device is present
51 * fwnode_property_present - check if a property of a firmware node is present
69 return fwnode_call_bool_op(fwnode->secondary, property_present, propname); in fwnode_property_present()
74 * device_property_read_bool - Return the value for a boolean property of a device
89 * fwnode_property_read_bool - Return the value for a boolean property of a firmware node
107 return fwnode_call_bool_op(fwnode->secondary, property_read_bool, propname); in fwnode_property_read_bool()
112 * device_property_read_u8_array - return a u8 array property of a device
126 * %-EINVAL if given arguments are not valid,
127 * %-ENODATA if the property does not have a value,
128 * %-EPROTO if the property is not an array of numbers,
129 * %-EOVERFLOW if the size of the property is not as expected.
130 * %-ENXIO if no suitable firmware interface is present.
140 * device_property_read_u16_array - return a u16 array property of a device
154 * %-EINVAL if given arguments are not valid,
155 * %-ENODATA if the property does not have a value,
156 * %-EPROTO if the property is not an array of numbers,
157 * %-EOVERFLOW if the size of the property is not as expected.
158 * %-ENXIO if no suitable firmware interface is present.
168 * device_property_read_u32_array - return a u32 array property of a device
182 * %-EINVAL if given arguments are not valid,
183 * %-ENODATA if the property does not have a value,
184 * %-EPROTO if the property is not an array of numbers,
185 * %-EOVERFLOW if the size of the property is not as expected.
186 * %-ENXIO if no suitable firmware interface is present.
196 * device_property_read_u64_array - return a u64 array property of a device
210 * %-EINVAL if given arguments are not valid,
211 * %-ENODATA if the property does not have a value,
212 * %-EPROTO if the property is not an array of numbers,
213 * %-EOVERFLOW if the size of the property is not as expected.
214 * %-ENXIO if no suitable firmware interface is present.
224 * device_property_read_string_array - return a string array property of device
236 * Return: number of values read on success if @val is non-NULL,
238 * %-EINVAL if given arguments are not valid,
239 * %-ENODATA if the property does not have a value,
240 * %-EPROTO or %-EILSEQ if the property is not an array of strings,
241 * %-EOVERFLOW if the size of the property is not as expected.
242 * %-ENXIO if no suitable firmware interface is present.
252 * device_property_read_string - return a string property of a device
261 * %-EINVAL if given arguments are not valid,
262 * %-ENODATA if the property does not have a value,
263 * %-EPROTO or %-EILSEQ if the property type is not a string.
264 * %-ENXIO if no suitable firmware interface is present.
274 * device_property_match_string - find a string in an array and return index
283 * %-EINVAL if given arguments are not valid,
284 * %-ENODATA if the property does not have a value,
285 * %-EPROTO if the property is not an array of strings,
286 * %-ENXIO if no suitable firmware interface is present.
303 return -EINVAL; in fwnode_property_read_int_array()
307 if (ret != -EINVAL) in fwnode_property_read_int_array()
310 return fwnode_call_int_op(fwnode->secondary, property_read_int_array, propname, in fwnode_property_read_int_array()
315 * fwnode_property_read_u8_array - return a u8 array property of firmware node
329 * %-EINVAL if given arguments are not valid,
330 * %-ENODATA if the property does not have a value,
331 * %-EPROTO if the property is not an array of numbers,
332 * %-EOVERFLOW if the size of the property is not as expected,
333 * %-ENXIO if no suitable firmware interface is present.
344 * fwnode_property_read_u16_array - return a u16 array property of firmware node
358 * %-EINVAL if given arguments are not valid,
359 * %-ENODATA if the property does not have a value,
360 * %-EPROTO if the property is not an array of numbers,
361 * %-EOVERFLOW if the size of the property is not as expected,
362 * %-ENXIO if no suitable firmware interface is present.
373 * fwnode_property_read_u32_array - return a u32 array property of firmware node
387 * %-EINVAL if given arguments are not valid,
388 * %-ENODATA if the property does not have a value,
389 * %-EPROTO if the property is not an array of numbers,
390 * %-EOVERFLOW if the size of the property is not as expected,
391 * %-ENXIO if no suitable firmware interface is present.
402 * fwnode_property_read_u64_array - return a u64 array property firmware node
416 * %-EINVAL if given arguments are not valid,
417 * %-ENODATA if the property does not have a value,
418 * %-EPROTO if the property is not an array of numbers,
419 * %-EOVERFLOW if the size of the property is not as expected,
420 * %-ENXIO if no suitable firmware interface is present.
431 * fwnode_property_read_string_array - return string array property of a node
443 * Return: number of values read on success if @val is non-NULL,
445 * %-EINVAL if given arguments are not valid,
446 * %-ENODATA if the property does not have a value,
447 * %-EPROTO or %-EILSEQ if the property is not an array of strings,
448 * %-EOVERFLOW if the size of the property is not as expected,
449 * %-ENXIO if no suitable firmware interface is present.
458 return -EINVAL; in fwnode_property_read_string_array()
462 if (ret != -EINVAL) in fwnode_property_read_string_array()
465 return fwnode_call_int_op(fwnode->secondary, property_read_string_array, propname, in fwnode_property_read_string_array()
471 * fwnode_property_read_string - return a string property of a firmware node
480 * %-EINVAL if given arguments are not valid,
481 * %-ENODATA if the property does not have a value,
482 * %-EPROTO or %-EILSEQ if the property is not a string,
483 * %-ENXIO if no suitable firmware interface is present.
495 * fwnode_property_match_string - find a string in an array and return index
504 * %-EINVAL if given arguments are not valid,
505 * %-ENODATA if the property does not have a value,
506 * %-EPROTO if the property is not an array of strings,
507 * %-ENXIO if no suitable firmware interface is present.
520 return -ENODATA; in fwnode_property_match_string()
524 return -ENOMEM; in fwnode_property_match_string()
532 ret = -ENODATA; in fwnode_property_match_string()
541 * fwnode_property_match_property_string - find a property string value in an array and return index
551 * %-ENOENT when the string value was not found in the @array,
552 * %-EINVAL if given arguments are not valid,
553 * %-ENODATA if the property does not have a value,
554 * %-EPROTO or %-EILSEQ if the property is not a string,
555 * %-ENXIO if no suitable firmware interface is present.
569 ret = -ENOENT; in fwnode_property_match_property_string()
576 * fwnode_property_get_reference_args() - Find a reference with arguments
582 * @nargs: Number of arguments. Ignored if @nargs_prop is non-NULL.
591 * @args->fwnode pointer.
594 * %-ENOENT when the index is out of bounds, the index has an empty
596 * %-EINVAL on parse error
606 return -ENOENT; in fwnode_property_get_reference_args()
613 if (IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_get_reference_args()
616 return fwnode_call_int_op(fwnode->secondary, get_reference_args, prop, nargs_prop, in fwnode_property_get_reference_args()
622 * fwnode_find_reference - Find named reference to a fwnode_handle
649 * fwnode_get_name - Return the name of a node
661 * fwnode_get_name_prefix - Return the prefix of node for printing purposes
673 * fwnode_name_eq - Return true if node name is equal
694 len = strchrnul(node_name, '@') - node_name; in fwnode_name_eq()
701 * fwnode_get_parent - Return parent firwmare node
717 * fwnode_get_next_parent - Iterate to the node's parent
742 * fwnode_count_parents - Return the number of parents a node has
760 * fwnode_get_nth_parent - Return an nth parent of a node
780 if (--depth == 0) in fwnode_get_nth_parent()
788 * fwnode_get_next_child_node - Return the next child node handle for a node
805 * fwnode_get_next_available_child_node - Return the next available child node handle for a node
833 * device_get_next_child_node - Return the next child node handle for a device
856 return fwnode_get_next_child_node(fwnode->secondary, child); in device_get_next_child_node()
861 * fwnode_get_named_child_node - Return first matching named child node handle
877 * device_get_named_child_node - Return first matching named child node handle
892 * fwnode_handle_get - Obtain a reference to a device node
910 * fwnode_device_is_available - check if a device is available for use
931 * device_get_child_node_count - return the number of child nodes for device
964 * fwnode_get_phy_mode - Get phy mode for given firmware node
967 * The function gets phy interface string from property 'phy-mode' or
968 * 'phy-connection-type', and return its index in phy_modes table, or errno in
976 err = fwnode_property_read_string(fwnode, "phy-mode", &pm); in fwnode_get_phy_mode()
979 "phy-connection-type", &pm); in fwnode_get_phy_mode()
987 return -ENODEV; in fwnode_get_phy_mode()
992 * device_get_phy_mode - Get phy mode for given device
995 * The function gets phy interface string from property 'phy-mode' or
996 * 'phy-connection-type', and return its index in phy_modes table, or errno in
1006 * fwnode_iomap - Maps the memory mapped IO for a given fwnode
1019 * fwnode_irq_get - Get IRQ directly from a fwnode
1021 * @index: Zero-based index of the IRQ
1032 return -EINVAL; in fwnode_irq_get()
1039 * fwnode_irq_get_byname - Get IRQ from a fwnode using its name
1044 * Find a match to the string @name in the 'interrupt-names' string array
1056 return -EINVAL; in fwnode_irq_get_byname()
1058 index = fwnode_property_match_string(fwnode, "interrupt-names", name); in fwnode_irq_get_byname()
1067 * fwnode_graph_get_next_endpoint - Get next endpoint firmware node
1087 * an endpoint from fwnode->secondary, then we need to use the secondary in fwnode_graph_get_next_endpoint()
1103 ep = fwnode_graph_get_next_endpoint(parent->secondary, NULL); in fwnode_graph_get_next_endpoint()
1112 * fwnode_graph_get_port_parent - Return the device fwnode of a port endpoint
1135 * fwnode_graph_get_remote_port_parent - Return fwnode of a remote device
1158 * fwnode_graph_get_remote_port - Return fwnode of a remote port
1174 * fwnode_graph_get_remote_endpoint - Return fwnode of a remote endpoint
1202 * fwnode_graph_get_endpoint_by_id - get endpoint by port and endpoint numbers
1269 * fwnode_graph_get_endpoint_count - Count endpoints on a device node
1294 * fwnode_graph_parse_endpoint - parse common endpoint node properties
1383 * fwnode_connection_find_match - Find connection from a device node
1413 * fwnode_connection_find_matches - Find connections from a device node
1440 return -EINVAL; in fwnode_connection_find_matches()
1447 matches_len -= count_graph; in fwnode_connection_find_matches()