Lines Matching defs:device_node
47 struct device_node {
55 struct device_node *parent;
56 struct device_node *child;
57 struct device_node *sibling;
71 struct device_node *np;
80 const struct device_node *parent;
90 struct device_node *node;
94 struct device_node *dn;
106 * On return the device_node refcount is set to one. Use of_node_put()
112 static inline void of_node_init(struct device_node *node)
127 extern struct device_node *of_node_get(struct device_node *node);
128 extern void of_node_put(struct device_node *node);
131 static inline struct device_node *of_node_get(struct device_node *node)
135 static inline void of_node_put(struct device_node *node) { }
139 extern struct device_node *of_root;
140 extern struct device_node *of_chosen;
141 extern struct device_node *of_aliases;
142 extern struct device_node *of_stdout;
145 * struct device_node flag descriptions
171 struct device_node, fwnode) : \
188 static inline bool of_node_is_root(const struct device_node *node)
193 static inline int of_node_check_flag(const struct device_node *n, unsigned long flag)
198 static inline int of_node_test_and_set_flag(struct device_node *n,
204 static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
209 static inline void of_node_clear_flag(struct device_node *n, unsigned long flag)
231 extern struct device_node *__of_find_all_nodes(struct device_node *prev);
232 extern struct device_node *of_find_all_nodes(struct device_node *prev);
261 extern bool of_node_name_eq(const struct device_node *np, const char *name);
262 extern bool of_node_name_prefix(const struct device_node *np, const char *prefix);
264 static inline const char *of_node_full_name(const struct device_node *np)
272 extern struct device_node *of_find_node_by_name(struct device_node *from,
274 extern struct device_node *of_find_node_by_type(struct device_node *from,
276 extern struct device_node *of_find_compatible_node(struct device_node *from,
278 extern struct device_node *of_find_matching_node_and_match(
279 struct device_node *from,
283 extern struct device_node *of_find_node_opts_by_path(const char *path,
285 static inline struct device_node *of_find_node_by_path(const char *path)
290 extern struct device_node *of_find_node_by_phandle(phandle handle);
291 extern struct device_node *of_get_parent(const struct device_node *node);
292 extern struct device_node *of_get_next_parent(struct device_node *node);
293 extern struct device_node *of_get_next_child(const struct device_node *node,
294 struct device_node *prev);
295 extern struct device_node *of_get_next_available_child(
296 const struct device_node *node, struct device_node *prev);
298 extern struct device_node *of_get_compatible_child(const struct device_node *parent,
300 extern struct device_node *of_get_child_by_name(const struct device_node *node,
304 extern struct device_node *of_find_next_cache_node(const struct device_node *);
306 extern struct device_node *of_find_node_with_property(
307 struct device_node *from, const char *prop_name);
309 extern struct property *of_find_property(const struct device_node *np,
312 extern int of_property_count_elems_of_size(const struct device_node *np,
314 extern int of_property_read_u32_index(const struct device_node *np,
317 extern int of_property_read_u64_index(const struct device_node *np,
320 extern int of_property_read_variable_u8_array(const struct device_node *np,
323 extern int of_property_read_variable_u16_array(const struct device_node *np,
326 extern int of_property_read_variable_u32_array(const struct device_node *np,
331 extern int of_property_read_u64(const struct device_node *np,
333 extern int of_property_read_variable_u64_array(const struct device_node *np,
339 extern int of_property_read_string(const struct device_node *np,
342 extern int of_property_match_string(const struct device_node *np,
345 extern int of_property_read_string_helper(const struct device_node *np,
348 extern int of_device_is_compatible(const struct device_node *device,
350 extern int of_device_compatible_match(const struct device_node *device,
352 extern bool of_device_is_available(const struct device_node *device);
353 extern bool of_device_is_big_endian(const struct device_node *device);
354 extern const void *of_get_property(const struct device_node *node,
357 extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);
358 extern struct device_node *of_cpu_device_node_get(int cpu);
359 extern int of_cpu_node_to_id(struct device_node *np);
360 extern struct device_node *of_get_next_cpu_node(struct device_node *prev);
361 extern struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
363 extern u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread);
368 extern int of_n_addr_cells(struct device_node *np);
369 extern int of_n_size_cells(struct device_node *np);
371 const struct of_device_id *matches, const struct device_node *node);
373 extern int of_alias_from_compatible(const struct device_node *node, char *alias,
376 extern int __of_parse_phandle_with_args(const struct device_node *np,
379 extern int of_parse_phandle_with_args_map(const struct device_node *np,
382 extern int of_count_phandle_with_args(const struct device_node *np,
386 extern ssize_t of_modalias(const struct device_node *np, char *str, ssize_t len);
387 extern int of_request_module(const struct device_node *np);
391 const struct device_node *np,
402 extern int of_alias_get_id(struct device_node *np, const char *stem);
407 extern int of_add_property(struct device_node *np, struct property *prop);
408 extern int of_remove_property(struct device_node *np, struct property *prop);
409 extern int of_update_property(struct device_node *np, struct property *newprop);
418 extern int of_attach_node(struct device_node *);
419 extern int of_detach_node(struct device_node *);
442 bool of_console_check(struct device_node *dn, char *name, int index);
444 int of_map_id(struct device_node *np, u32 id,
446 struct device_node **target, u32 *id_out);
448 phys_addr_t of_dma_get_max_cpu_address(struct device_node *np);
466 static inline struct device_node *to_of_node(const struct fwnode_handle *fwnode)
471 static inline bool of_node_name_eq(const struct device_node *np, const char *name)
476 static inline bool of_node_name_prefix(const struct device_node *np, const char *prefix)
481 static inline const char* of_node_full_name(const struct device_node *np)
486 static inline struct device_node *of_find_node_by_name(struct device_node *from,
492 static inline struct device_node *of_find_node_by_type(struct device_node *from,
498 static inline struct device_node *of_find_matching_node_and_match(
499 struct device_node *from,
506 static inline struct device_node *of_find_node_by_path(const char *path)
511 static inline struct device_node *of_find_node_opts_by_path(const char *path,
517 static inline struct device_node *of_find_node_by_phandle(phandle handle)
522 static inline struct device_node *of_get_parent(const struct device_node *node)
527 static inline struct device_node *of_get_next_parent(struct device_node *node)
532 static inline struct device_node *of_get_next_child(
533 const struct device_node *node, struct device_node *prev)
538 static inline struct device_node *of_get_next_available_child(
539 const struct device_node *node, struct device_node *prev)
544 static inline struct device_node *of_find_node_with_property(
545 struct device_node *from, const char *prop_name)
557 static inline struct device_node *of_get_compatible_child(const struct device_node *parent,
563 static inline struct device_node *of_get_child_by_name(
564 const struct device_node *node,
570 static inline int of_device_is_compatible(const struct device_node *device,
576 static inline int of_device_compatible_match(const struct device_node *device,
582 static inline bool of_device_is_available(const struct device_node *device)
587 static inline bool of_device_is_big_endian(const struct device_node *device)
592 static inline struct property *of_find_property(const struct device_node *np,
599 static inline struct device_node *of_find_compatible_node(
600 struct device_node *from,
607 static inline int of_property_count_elems_of_size(const struct device_node *np,
613 static inline int of_property_read_u32_index(const struct device_node *np,
619 static inline int of_property_read_u64_index(const struct device_node *np,
625 static inline const void *of_get_property(const struct device_node *node,
632 static inline struct device_node *of_get_cpu_node(int cpu,
638 static inline struct device_node *of_cpu_device_node_get(int cpu)
643 static inline int of_cpu_node_to_id(struct device_node *np)
648 static inline struct device_node *of_get_next_cpu_node(struct device_node *prev)
653 static inline struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
659 static inline int of_n_addr_cells(struct device_node *np)
664 static inline int of_n_size_cells(struct device_node *np)
669 static inline int of_property_read_variable_u8_array(const struct device_node *np,
676 static inline int of_property_read_variable_u16_array(const struct device_node *np,
683 static inline int of_property_read_variable_u32_array(const struct device_node *np,
692 static inline int of_property_read_u64(const struct device_node *np,
698 static inline int of_property_read_variable_u64_array(const struct device_node *np,
707 static inline int of_property_read_string(const struct device_node *np,
714 static inline int of_property_match_string(const struct device_node *np,
721 static inline int of_property_read_string_helper(const struct device_node *np,
728 static inline int __of_parse_phandle_with_args(const struct device_node *np,
738 static inline int of_parse_phandle_with_args_map(const struct device_node *np,
747 static inline int of_count_phandle_with_args(const struct device_node *np,
754 static inline ssize_t of_modalias(const struct device_node *np, char *str,
760 static inline int of_request_module(const struct device_node *np)
766 const struct device_node *np,
786 static inline int of_alias_get_id(struct device_node *np, const char *stem)
801 static inline int of_add_property(struct device_node *np, struct property *prop)
806 static inline int of_remove_property(struct device_node *np, struct property *prop)
811 static inline bool of_console_check(const struct device_node *dn, const char *name, int index)
828 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
833 static inline int of_node_test_and_set_flag(struct device_node *n,
839 static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
843 static inline void of_node_clear_flag(struct device_node *n, unsigned long flag)
861 static inline int of_map_id(struct device_node *np, u32 id,
863 struct device_node **target, u32 *id_out)
868 static inline phys_addr_t of_dma_get_max_cpu_address(struct device_node *np)
896 extern int of_node_to_nid(struct device_node *np);
898 static inline int of_node_to_nid(struct device_node *device)
913 static inline struct device_node *of_find_matching_node(
914 struct device_node *from,
920 static inline const char *of_node_get_device_type(const struct device_node *np)
925 static inline bool of_node_is_type(const struct device_node *np, const char *type)
933 * of_parse_phandle - Resolve a phandle property to a device_node pointer
939 * Return: The device_node pointer with refcount incremented. Use
942 static inline struct device_node *of_parse_phandle(const struct device_node *np,
984 * To get a device_node of the ``node2`` node you may call this:
987 static inline int of_parse_phandle_with_args(const struct device_node *np,
1030 * To get a device_node of the ``node2`` node you may call this:
1033 static inline int of_parse_phandle_with_fixed_args(const struct device_node *np,
1058 static inline int of_parse_phandle_with_optional_args(const struct device_node *np,
1081 static inline int of_property_count_u8_elems(const struct device_node *np,
1100 static inline int of_property_count_u16_elems(const struct device_node *np,
1119 static inline int of_property_count_u32_elems(const struct device_node *np,
1138 static inline int of_property_count_u64_elems(const struct device_node *np,
1157 static inline int of_property_read_string_array(const struct device_node *np,
1177 static inline int of_property_count_strings(const struct device_node *np,
1202 static inline int of_property_read_string_index(const struct device_node *np,
1220 static inline bool of_property_read_bool(const struct device_node *np,
1237 static inline bool of_property_present(const struct device_node *np, const char *propname)
1262 static inline int of_property_read_u8_array(const struct device_node *np,
1294 static inline int of_property_read_u16_array(const struct device_node *np,
1324 static inline int of_property_read_u32_array(const struct device_node *np,
1354 static inline int of_property_read_u64_array(const struct device_node *np,
1366 static inline int of_property_read_u8(const struct device_node *np,
1373 static inline int of_property_read_u16(const struct device_node *np,
1380 static inline int of_property_read_u32(const struct device_node *np,
1387 static inline int of_property_read_s32(const struct device_node *np,
1443 static inline int of_get_child_count(const struct device_node *np)
1445 struct device_node *child;
1454 static inline int of_get_available_child_count(const struct device_node *np)
1456 struct device_node *child;
1483 typedef int (*of_init_fn_2)(struct device_node *, struct device_node *);
1484 typedef int (*of_init_fn_1_ret)(struct device_node *);
1485 typedef void (*of_init_fn_1)(struct device_node *);
1511 struct device_node *np;
1550 unsigned long action, struct device_node *np,
1554 struct device_node *np)
1560 struct device_node *np)
1566 struct device_node *np, struct property *prop)
1572 struct device_node *np, struct property *prop)
1578 struct device_node *np, struct property *prop)
1583 struct device_node *of_changeset_create_node(struct of_changeset *ocs,
1584 struct device_node *parent,
1587 struct device_node *np,
1590 struct device_node *np,
1594 struct device_node *np,
1598 struct device_node *np,
1627 * of_device_is_system_power_controller - Tells if system-power-controller is found for device_node
1628 * @np: Pointer to the given device_node
1632 static inline bool of_device_is_system_power_controller(const struct device_node *np)
1663 struct device_node *overlay;
1664 struct device_node *target;
1670 int *ovcs_id, struct device_node *target_base);
1680 int *ovcs_id, struct device_node *target_base)