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_u8_array - return a u8 array property of a device
88 * %-EINVAL if given arguments are not valid,
89 * %-ENODATA if the property does not have a value,
90 * %-EPROTO if the property is not an array of numbers,
91 * %-EOVERFLOW if the size of the property is not as expected.
92 * %-ENXIO if no suitable firmware interface is present.
102 * device_property_read_u16_array - return a u16 array property of a device
116 * %-EINVAL if given arguments are not valid,
117 * %-ENODATA if the property does not have a value,
118 * %-EPROTO if the property is not an array of numbers,
119 * %-EOVERFLOW if the size of the property is not as expected.
120 * %-ENXIO if no suitable firmware interface is present.
130 * device_property_read_u32_array - return a u32 array property of a device
144 * %-EINVAL if given arguments are not valid,
145 * %-ENODATA if the property does not have a value,
146 * %-EPROTO if the property is not an array of numbers,
147 * %-EOVERFLOW if the size of the property is not as expected.
148 * %-ENXIO if no suitable firmware interface is present.
158 * device_property_read_u64_array - return a u64 array property of a device
172 * %-EINVAL if given arguments are not valid,
173 * %-ENODATA if the property does not have a value,
174 * %-EPROTO if the property is not an array of numbers,
175 * %-EOVERFLOW if the size of the property is not as expected.
176 * %-ENXIO if no suitable firmware interface is present.
186 * device_property_read_string_array - return a string array property of device
198 * Return: number of values read on success if @val is non-NULL,
200 * %-EINVAL if given arguments are not valid,
201 * %-ENODATA if the property does not have a value,
202 * %-EPROTO or %-EILSEQ if the property is not an array of strings,
203 * %-EOVERFLOW if the size of the property is not as expected.
204 * %-ENXIO if no suitable firmware interface is present.
214 * device_property_read_string - return a string property of a device
223 * %-EINVAL if given arguments are not valid,
224 * %-ENODATA if the property does not have a value,
225 * %-EPROTO or %-EILSEQ if the property type is not a string.
226 * %-ENXIO if no suitable firmware interface is present.
236 * device_property_match_string - find a string in an array and return index
245 * %-EINVAL if given arguments are not valid,
246 * %-ENODATA if the property does not have a value,
247 * %-EPROTO if the property is not an array of strings,
248 * %-ENXIO if no suitable firmware interface is present.
265 return -EINVAL; in fwnode_property_read_int_array()
269 if (ret != -EINVAL) in fwnode_property_read_int_array()
272 return fwnode_call_int_op(fwnode->secondary, property_read_int_array, propname, in fwnode_property_read_int_array()
277 * fwnode_property_read_u8_array - return a u8 array property of firmware node
291 * %-EINVAL if given arguments are not valid,
292 * %-ENODATA if the property does not have a value,
293 * %-EPROTO if the property is not an array of numbers,
294 * %-EOVERFLOW if the size of the property is not as expected,
295 * %-ENXIO if no suitable firmware interface is present.
306 * fwnode_property_read_u16_array - return a u16 array property of firmware node
320 * %-EINVAL if given arguments are not valid,
321 * %-ENODATA if the property does not have a value,
322 * %-EPROTO if the property is not an array of numbers,
323 * %-EOVERFLOW if the size of the property is not as expected,
324 * %-ENXIO if no suitable firmware interface is present.
335 * fwnode_property_read_u32_array - return a u32 array property of firmware node
349 * %-EINVAL if given arguments are not valid,
350 * %-ENODATA if the property does not have a value,
351 * %-EPROTO if the property is not an array of numbers,
352 * %-EOVERFLOW if the size of the property is not as expected,
353 * %-ENXIO if no suitable firmware interface is present.
364 * fwnode_property_read_u64_array - return a u64 array property firmware node
378 * %-EINVAL if given arguments are not valid,
379 * %-ENODATA if the property does not have a value,
380 * %-EPROTO if the property is not an array of numbers,
381 * %-EOVERFLOW if the size of the property is not as expected,
382 * %-ENXIO if no suitable firmware interface is present.
393 * fwnode_property_read_string_array - return string array property of a node
405 * Return: number of values read on success if @val is non-NULL,
407 * %-EINVAL if given arguments are not valid,
408 * %-ENODATA if the property does not have a value,
409 * %-EPROTO or %-EILSEQ if the property is not an array of strings,
410 * %-EOVERFLOW if the size of the property is not as expected,
411 * %-ENXIO if no suitable firmware interface is present.
420 return -EINVAL; in fwnode_property_read_string_array()
424 if (ret != -EINVAL) in fwnode_property_read_string_array()
427 return fwnode_call_int_op(fwnode->secondary, property_read_string_array, propname, in fwnode_property_read_string_array()
433 * fwnode_property_read_string - return a string property of a firmware node
442 * %-EINVAL if given arguments are not valid,
443 * %-ENODATA if the property does not have a value,
444 * %-EPROTO or %-EILSEQ if the property is not a string,
445 * %-ENXIO if no suitable firmware interface is present.
457 * fwnode_property_match_string - find a string in an array and return index
466 * %-EINVAL if given arguments are not valid,
467 * %-ENODATA if the property does not have a value,
468 * %-EPROTO if the property is not an array of strings,
469 * %-ENXIO if no suitable firmware interface is present.
482 return -ENODATA; in fwnode_property_match_string()
486 return -ENOMEM; in fwnode_property_match_string()
494 ret = -ENODATA; in fwnode_property_match_string()
503 * fwnode_property_match_property_string - find a property string value in an array and return index
513 * %-ENOENT when the string value was not found in the @array,
514 * %-EINVAL if given arguments are not valid,
515 * %-ENODATA if the property does not have a value,
516 * %-EPROTO or %-EILSEQ if the property is not a string,
517 * %-ENXIO if no suitable firmware interface is present.
531 ret = -ENOENT; in fwnode_property_match_property_string()
538 * fwnode_property_get_reference_args() - Find a reference with arguments
544 * @nargs: Number of arguments. Ignored if @nargs_prop is non-NULL.
553 * @args->fwnode pointer.
556 * %-ENOENT when the index is out of bounds, the index has an empty
558 * %-EINVAL on parse error
568 return -ENOENT; in fwnode_property_get_reference_args()
575 if (IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_get_reference_args()
578 return fwnode_call_int_op(fwnode->secondary, get_reference_args, prop, nargs_prop, in fwnode_property_get_reference_args()
584 * fwnode_find_reference - Find named reference to a fwnode_handle
611 * fwnode_get_name - Return the name of a node
623 * fwnode_get_name_prefix - Return the prefix of node for printing purposes
635 * fwnode_name_eq - Return true if node name is equal
656 len = strchrnul(node_name, '@') - node_name; in fwnode_name_eq()
663 * fwnode_get_parent - Return parent firwmare node
679 * fwnode_get_next_parent - Iterate to the node's parent
704 * fwnode_count_parents - Return the number of parents a node has
722 * fwnode_get_nth_parent - Return an nth parent of a node
742 if (--depth == 0) in fwnode_get_nth_parent()
750 * fwnode_get_next_child_node - Return the next child node handle for a node
767 * fwnode_get_next_available_child_node - Return the next available child node handle for a node
795 * device_get_next_child_node - Return the next child node handle for a device
818 return fwnode_get_next_child_node(fwnode->secondary, child); in device_get_next_child_node()
823 * fwnode_get_named_child_node - Return first matching named child node handle
839 * device_get_named_child_node - Return first matching named child node handle
854 * fwnode_handle_get - Obtain a reference to a device node
872 * fwnode_device_is_available - check if a device is available for use
893 * device_get_child_node_count - return the number of child nodes for device
926 * fwnode_get_phy_mode - Get phy mode for given firmware node
929 * The function gets phy interface string from property 'phy-mode' or
930 * 'phy-connection-type', and return its index in phy_modes table, or errno in
938 err = fwnode_property_read_string(fwnode, "phy-mode", &pm); in fwnode_get_phy_mode()
941 "phy-connection-type", &pm); in fwnode_get_phy_mode()
949 return -ENODEV; in fwnode_get_phy_mode()
954 * device_get_phy_mode - Get phy mode for given device
957 * The function gets phy interface string from property 'phy-mode' or
958 * 'phy-connection-type', and return its index in phy_modes table, or errno in
968 * fwnode_iomap - Maps the memory mapped IO for a given fwnode
981 * fwnode_irq_get - Get IRQ directly from a fwnode
983 * @index: Zero-based index of the IRQ
994 return -EINVAL; in fwnode_irq_get()
1001 * fwnode_irq_get_byname - Get IRQ from a fwnode using its name
1006 * Find a match to the string @name in the 'interrupt-names' string array
1018 return -EINVAL; in fwnode_irq_get_byname()
1020 index = fwnode_property_match_string(fwnode, "interrupt-names", name); in fwnode_irq_get_byname()
1029 * fwnode_graph_get_next_endpoint - Get next endpoint firmware node
1049 * an endpoint from fwnode->secondary, then we need to use the secondary in fwnode_graph_get_next_endpoint()
1065 ep = fwnode_graph_get_next_endpoint(parent->secondary, NULL); in fwnode_graph_get_next_endpoint()
1074 * fwnode_graph_get_port_parent - Return the device fwnode of a port endpoint
1097 * fwnode_graph_get_remote_port_parent - Return fwnode of a remote device
1120 * fwnode_graph_get_remote_port - Return fwnode of a remote port
1136 * fwnode_graph_get_remote_endpoint - Return fwnode of a remote endpoint
1164 * fwnode_graph_get_endpoint_by_id - get endpoint by port and endpoint numbers
1231 * fwnode_graph_get_endpoint_count - Count endpoints on a device node
1256 * fwnode_graph_parse_endpoint - parse common endpoint node properties
1345 * fwnode_connection_find_match - Find connection from a device node
1375 * fwnode_connection_find_matches - Find connections from a device node
1402 return -EINVAL; in fwnode_connection_find_matches()
1409 matches_len -= count_graph; in fwnode_connection_find_matches()