Lines Matching +full:- +full:eproto

1 // SPDX-License-Identifier: GPL-2.0
3 * property.c - Unified device property interface.
22 return IS_ENABLED(CONFIG_OF) && dev->of_node ? in dev_fwnode()
23 of_fwnode_handle(dev->of_node) : dev->fwnode; in dev_fwnode()
28 * device_property_present - check if a property of a device is present
41 * fwnode_property_present - check if a property of a firmware node is present
57 return fwnode_call_bool_op(fwnode->secondary, property_present, propname); in fwnode_property_present()
62 * device_property_read_u8_array - return a u8 array property of a device
76 * %-EINVAL if given arguments are not valid,
77 * %-ENODATA if the property does not have a value,
78 * %-EPROTO if the property is not an array of numbers,
79 * %-EOVERFLOW if the size of the property is not as expected.
80 * %-ENXIO if no suitable firmware interface is present.
90 * device_property_read_u16_array - return a u16 array property of a device
104 * %-EINVAL if given arguments are not valid,
105 * %-ENODATA if the property does not have a value,
106 * %-EPROTO if the property is not an array of numbers,
107 * %-EOVERFLOW if the size of the property is not as expected.
108 * %-ENXIO if no suitable firmware interface is present.
118 * device_property_read_u32_array - return a u32 array property of a device
132 * %-EINVAL if given arguments are not valid,
133 * %-ENODATA if the property does not have a value,
134 * %-EPROTO if the property is not an array of numbers,
135 * %-EOVERFLOW if the size of the property is not as expected.
136 * %-ENXIO if no suitable firmware interface is present.
146 * device_property_read_u64_array - return a u64 array property of a device
160 * %-EINVAL if given arguments are not valid,
161 * %-ENODATA if the property does not have a value,
162 * %-EPROTO if the property is not an array of numbers,
163 * %-EOVERFLOW if the size of the property is not as expected.
164 * %-ENXIO if no suitable firmware interface is present.
174 * device_property_read_string_array - return a string array property of device
186 * Return: number of values read on success if @val is non-NULL,
188 * %-EINVAL if given arguments are not valid,
189 * %-ENODATA if the property does not have a value,
190 * %-EPROTO or %-EILSEQ if the property is not an array of strings,
191 * %-EOVERFLOW if the size of the property is not as expected.
192 * %-ENXIO if no suitable firmware interface is present.
202 * device_property_read_string - return a string property of a device
211 * %-EINVAL if given arguments are not valid,
212 * %-ENODATA if the property does not have a value,
213 * %-EPROTO or %-EILSEQ if the property type is not a string.
214 * %-ENXIO if no suitable firmware interface is present.
224 * device_property_match_string - find a string in an array and return index
233 * %-EINVAL if given arguments are not valid,
234 * %-ENODATA if the property does not have a value,
235 * %-EPROTO if the property is not an array of strings,
236 * %-ENXIO if no suitable firmware interface is present.
253 return -EINVAL; in fwnode_property_read_int_array()
257 if (ret != -EINVAL) in fwnode_property_read_int_array()
260 return fwnode_call_int_op(fwnode->secondary, property_read_int_array, propname, in fwnode_property_read_int_array()
265 * fwnode_property_read_u8_array - return a u8 array property of firmware node
279 * %-EINVAL if given arguments are not valid,
280 * %-ENODATA if the property does not have a value,
281 * %-EPROTO if the property is not an array of numbers,
282 * %-EOVERFLOW if the size of the property is not as expected,
283 * %-ENXIO if no suitable firmware interface is present.
294 * fwnode_property_read_u16_array - return a u16 array property of firmware node
308 * %-EINVAL if given arguments are not valid,
309 * %-ENODATA if the property does not have a value,
310 * %-EPROTO if the property is not an array of numbers,
311 * %-EOVERFLOW if the size of the property is not as expected,
312 * %-ENXIO if no suitable firmware interface is present.
323 * fwnode_property_read_u32_array - return a u32 array property of firmware node
337 * %-EINVAL if given arguments are not valid,
338 * %-ENODATA if the property does not have a value,
339 * %-EPROTO if the property is not an array of numbers,
340 * %-EOVERFLOW if the size of the property is not as expected,
341 * %-ENXIO if no suitable firmware interface is present.
352 * fwnode_property_read_u64_array - return a u64 array property firmware node
366 * %-EINVAL if given arguments are not valid,
367 * %-ENODATA if the property does not have a value,
368 * %-EPROTO if the property is not an array of numbers,
369 * %-EOVERFLOW if the size of the property is not as expected,
370 * %-ENXIO if no suitable firmware interface is present.
381 * fwnode_property_read_string_array - return string array property of a node
393 * Return: number of values read on success if @val is non-NULL,
395 * %-EINVAL if given arguments are not valid,
396 * %-ENODATA if the property does not have a value,
397 * %-EPROTO or %-EILSEQ if the property is not an array of strings,
398 * %-EOVERFLOW if the size of the property is not as expected,
399 * %-ENXIO if no suitable firmware interface is present.
408 return -EINVAL; in fwnode_property_read_string_array()
412 if (ret != -EINVAL) in fwnode_property_read_string_array()
415 return fwnode_call_int_op(fwnode->secondary, property_read_string_array, propname, in fwnode_property_read_string_array()
421 * fwnode_property_read_string - return a string property of a firmware node
430 * %-EINVAL if given arguments are not valid,
431 * %-ENODATA if the property does not have a value,
432 * %-EPROTO or %-EILSEQ if the property is not a string,
433 * %-ENXIO if no suitable firmware interface is present.
445 * fwnode_property_match_string - find a string in an array and return index
454 * %-EINVAL if given arguments are not valid,
455 * %-ENODATA if the property does not have a value,
456 * %-EPROTO if the property is not an array of strings,
457 * %-ENXIO if no suitable firmware interface is present.
470 return -ENODATA; in fwnode_property_match_string()
474 return -ENOMEM; in fwnode_property_match_string()
482 ret = -ENODATA; in fwnode_property_match_string()
490 * fwnode_property_get_reference_args() - Find a reference with arguments
496 * @nargs: Number of arguments. Ignored if @nargs_prop is non-NULL.
504 * args->fwnode pointer.
507 * %-ENOENT when the index is out of bounds, the index has an empty
509 * %-EINVAL on parse error
519 return -ENOENT; in fwnode_property_get_reference_args()
526 if (IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_get_reference_args()
529 return fwnode_call_int_op(fwnode->secondary, get_reference_args, prop, nargs_prop, in fwnode_property_get_reference_args()
535 * fwnode_find_reference - Find named reference to a fwnode_handle
559 * fwnode_get_name - Return the name of a node
571 * fwnode_get_name_prefix - Return the prefix of node for printing purposes
583 * fwnode_get_parent - Return parent firwmare node
596 * fwnode_get_next_parent - Iterate to the node's parent
617 * fwnode_get_next_parent_dev - Find device of closest ancestor fwnode
643 * fwnode_count_parents - Return the number of parents a node has
661 * fwnode_get_nth_parent - Return an nth parent of a node
681 if (--depth == 0) in fwnode_get_nth_parent()
689 * fwnode_is_ancestor_of - Test if @ancestor is ancestor of @child
717 * fwnode_get_next_child_node - Return the next child node handle for a node
730 * fwnode_get_next_available_child_node - Return the next
755 * device_get_next_child_node - Return the next child node handle for a device
774 return fwnode_get_next_child_node(fwnode->secondary, child); in device_get_next_child_node()
779 * fwnode_get_named_child_node - Return first matching named child node handle
792 * device_get_named_child_node - Return first matching named child node handle
804 * fwnode_handle_get - Obtain a reference to a device node
819 * fwnode_handle_put - Drop reference to a device node
833 * fwnode_device_is_available - check if a device is available for use
852 * device_get_child_node_count - return the number of child nodes for device
883 * fwnode_get_phy_mode - Get phy mode for given firmware node
886 * The function gets phy interface string from property 'phy-mode' or
887 * 'phy-connection-type', and return its index in phy_modes table, or errno in
895 err = fwnode_property_read_string(fwnode, "phy-mode", &pm); in fwnode_get_phy_mode()
898 "phy-connection-type", &pm); in fwnode_get_phy_mode()
906 return -ENODEV; in fwnode_get_phy_mode()
911 * device_get_phy_mode - Get phy mode for given device
914 * The function gets phy interface string from property 'phy-mode' or
915 * 'phy-connection-type', and return its index in phy_modes table, or errno in
925 * fwnode_iomap - Maps the memory mapped IO for a given fwnode
938 * fwnode_irq_get - Get IRQ directly from a fwnode
940 * @index: Zero-based index of the IRQ
952 * fwnode_irq_get_byname - Get IRQ from a fwnode using its name
957 * Find a match to the string @name in the 'interrupt-names' string array
970 return -EINVAL; in fwnode_irq_get_byname()
972 index = fwnode_property_match_string(fwnode, "interrupt-names", name); in fwnode_irq_get_byname()
981 * fwnode_graph_get_next_endpoint - Get next endpoint firmware node
997 * an endpoint from fwnode->secondary, then we need to use the secondary in fwnode_graph_get_next_endpoint()
1011 return fwnode_graph_get_next_endpoint(parent->secondary, NULL); in fwnode_graph_get_next_endpoint()
1016 * fwnode_graph_get_port_parent - Return the device fwnode of a port endpoint
1036 * fwnode_graph_get_remote_port_parent - Return fwnode of a remote device
1056 * fwnode_graph_get_remote_port - Return fwnode of a remote port
1069 * fwnode_graph_get_remote_endpoint - Return fwnode of a remote endpoint
1094 * fwnode_graph_get_endpoint_by_id - get endpoint by port and endpoint numbers
1161 * fwnode_graph_get_endpoint_count - Count endpoints on a device node
1186 * fwnode_graph_parse_endpoint - parse common endpoint node properties
1275 * fwnode_connection_find_match - Find connection from a device node
1305 * fwnode_connection_find_matches - Find connections from a device node
1331 return -EINVAL; in fwnode_connection_find_matches()
1338 matches_len -= count_graph; in fwnode_connection_find_matches()