Lines Matching refs:device_node
48 struct device_node { struct
56 struct device_node *parent; argument
57 struct device_node *child; argument
58 struct device_node *sibling; argument
72 struct device_node *np; argument
81 const struct device_node *parent;
91 struct device_node *node;
95 struct device_node *dn;
113 static inline void of_node_init(struct device_node *node) in of_node_init()
128 extern struct device_node *of_node_get(struct device_node *node);
129 extern void of_node_put(struct device_node *node);
132 static inline struct device_node *of_node_get(struct device_node *node) in of_node_get()
136 static inline void of_node_put(struct device_node *node) { } in of_node_put()
138 DEFINE_FREE(device_node, struct device_node *, if (_T) of_node_put(_T))
141 extern struct device_node *of_root;
142 extern struct device_node *of_chosen;
143 extern struct device_node *of_aliases;
144 extern struct device_node *of_stdout;
173 struct device_node, fwnode) : \
185 static inline bool of_node_is_root(const struct device_node *node) in of_node_is_root()
190 static inline int of_node_check_flag(const struct device_node *n, unsigned long flag) in of_node_check_flag()
195 static inline int of_node_test_and_set_flag(struct device_node *n, in of_node_test_and_set_flag()
201 static inline void of_node_set_flag(struct device_node *n, unsigned long flag) in of_node_set_flag()
206 static inline void of_node_clear_flag(struct device_node *n, unsigned long flag) in of_node_clear_flag()
228 extern struct device_node *__of_find_all_nodes(struct device_node *prev);
229 extern struct device_node *of_find_all_nodes(struct device_node *prev);
258 extern bool of_node_name_eq(const struct device_node *np, const char *name);
259 extern bool of_node_name_prefix(const struct device_node *np, const char *prefix);
261 static inline const char *of_node_full_name(const struct device_node *np) in of_node_full_name()
269 extern struct device_node *of_find_node_by_name(struct device_node *from,
271 extern struct device_node *of_find_node_by_type(struct device_node *from,
273 extern struct device_node *of_find_compatible_node(struct device_node *from,
275 extern struct device_node *of_find_matching_node_and_match(
276 struct device_node *from,
280 extern struct device_node *of_find_node_opts_by_path(const char *path,
282 static inline struct device_node *of_find_node_by_path(const char *path) in of_find_node_by_path()
287 extern struct device_node *of_find_node_by_phandle(phandle handle);
288 extern struct device_node *of_get_parent(const struct device_node *node);
289 extern struct device_node *of_get_next_parent(struct device_node *node);
290 extern struct device_node *of_get_next_child(const struct device_node *node,
291 struct device_node *prev);
292 extern struct device_node *of_get_next_child_with_prefix(const struct device_node *node,
293 struct device_node *prev,
295 extern struct device_node *of_get_next_available_child(
296 const struct device_node *node, struct device_node *prev);
297 extern struct device_node *of_get_next_reserved_child(
298 const struct device_node *node, struct device_node *prev);
300 extern struct device_node *of_get_compatible_child(const struct device_node *parent,
302 extern struct device_node *of_get_child_by_name(const struct device_node *node,
304 extern struct device_node *of_get_available_child_by_name(const struct device_node *node,
308 extern struct device_node *of_find_next_cache_node(const struct device_node *);
310 extern struct device_node *of_find_node_with_property(
311 struct device_node *from, const char *prop_name);
313 extern struct property *of_find_property(const struct device_node *np,
316 extern bool of_property_read_bool(const struct device_node *np, const char *propname);
317 extern int of_property_count_elems_of_size(const struct device_node *np,
319 extern int of_property_read_u16_index(const struct device_node *np,
322 extern int of_property_read_u32_index(const struct device_node *np,
325 extern int of_property_read_u64_index(const struct device_node *np,
328 extern int of_property_read_variable_u8_array(const struct device_node *np,
331 extern int of_property_read_variable_u16_array(const struct device_node *np,
334 extern int of_property_read_variable_u32_array(const struct device_node *np,
339 extern int of_property_read_u64(const struct device_node *np,
341 extern int of_property_read_variable_u64_array(const struct device_node *np,
347 extern int of_property_read_string(const struct device_node *np,
350 extern int of_property_match_string(const struct device_node *np,
353 extern int of_property_read_string_helper(const struct device_node *np,
356 extern int of_device_is_compatible(const struct device_node *device,
358 extern int of_device_compatible_match(const struct device_node *device,
360 extern bool of_device_is_available(const struct device_node *device);
361 extern bool of_device_is_big_endian(const struct device_node *device);
362 extern const void *of_get_property(const struct device_node *node,
365 extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);
366 extern struct device_node *of_cpu_device_node_get(int cpu);
367 extern int of_cpu_node_to_id(struct device_node *np);
368 extern struct device_node *of_get_next_cpu_node(struct device_node *prev);
369 extern struct device_node *of_get_cpu_state_node(const struct device_node *cpu_node,
371 extern u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread);
373 extern int of_n_addr_cells(struct device_node *np);
374 extern int of_n_size_cells(struct device_node *np);
376 const struct of_device_id *matches, const struct device_node *node);
378 extern int of_alias_from_compatible(const struct device_node *node, char *alias,
381 extern int __of_parse_phandle_with_args(const struct device_node *np,
384 extern int of_parse_phandle_with_args_map(const struct device_node *np,
387 extern int of_count_phandle_with_args(const struct device_node *np,
391 extern ssize_t of_modalias(const struct device_node *np, char *str, ssize_t len);
392 extern int of_request_module(const struct device_node *np);
396 const struct device_node *np,
406 extern int of_alias_get_id(const struct device_node *np, const char *stem);
424 extern int of_add_property(struct device_node *np, struct property *prop);
425 extern int of_remove_property(struct device_node *np, struct property *prop);
426 extern int of_update_property(struct device_node *np, struct property *newprop);
435 extern int of_attach_node(struct device_node *);
436 extern int of_detach_node(struct device_node *);
457 bool of_console_check(const struct device_node *dn, char *name, int index);
459 int of_map_id(const struct device_node *np, u32 id,
461 struct device_node **target, u32 *id_out);
463 phys_addr_t of_dma_get_max_cpu_address(struct device_node *np);
481 static inline struct device_node *to_of_node(const struct fwnode_handle *fwnode) in to_of_node()
486 static inline bool of_node_name_eq(const struct device_node *np, const char *name) in of_node_name_eq()
491 static inline bool of_node_name_prefix(const struct device_node *np, const char *prefix) in of_node_name_prefix()
496 static inline const char* of_node_full_name(const struct device_node *np) in of_node_full_name()
501 static inline struct device_node *of_find_node_by_name(struct device_node *from, in of_find_node_by_name()
507 static inline struct device_node *of_find_node_by_type(struct device_node *from, in of_find_node_by_type()
513 static inline struct device_node *of_find_matching_node_and_match( in of_find_matching_node_and_match()
514 struct device_node *from, in of_find_matching_node_and_match()
521 static inline struct device_node *of_find_node_by_path(const char *path) in of_find_node_by_path()
526 static inline struct device_node *of_find_node_opts_by_path(const char *path, in of_find_node_opts_by_path()
532 static inline struct device_node *of_find_node_by_phandle(phandle handle) in of_find_node_by_phandle()
537 static inline struct device_node *of_get_parent(const struct device_node *node) in of_get_parent()
542 static inline struct device_node *of_get_next_parent(struct device_node *node) in of_get_next_parent()
547 static inline struct device_node *of_get_next_child( in of_get_next_child()
548 const struct device_node *node, struct device_node *prev) in of_get_next_child()
553 static inline struct device_node *of_get_next_available_child( in of_get_next_available_child()
554 const struct device_node *node, struct device_node *prev) in of_get_next_available_child()
559 static inline struct device_node *of_get_next_reserved_child( in of_get_next_reserved_child()
560 const struct device_node *node, struct device_node *prev) in of_get_next_reserved_child()
565 static inline struct device_node *of_find_node_with_property( in of_find_node_with_property()
566 struct device_node *from, const char *prop_name) in of_find_node_with_property()
573 static inline struct device_node *of_get_compatible_child(const struct device_node *parent, in of_get_compatible_child()
579 static inline struct device_node *of_get_child_by_name( in of_get_child_by_name()
580 const struct device_node *node, in of_get_child_by_name()
586 static inline struct device_node *of_get_available_child_by_name( in of_get_available_child_by_name()
587 const struct device_node *node, in of_get_available_child_by_name()
593 static inline int of_device_is_compatible(const struct device_node *device, in of_device_is_compatible()
599 static inline int of_device_compatible_match(const struct device_node *device, in of_device_compatible_match()
605 static inline bool of_device_is_available(const struct device_node *device) in of_device_is_available()
610 static inline bool of_device_is_big_endian(const struct device_node *device) in of_device_is_big_endian()
615 static inline struct property *of_find_property(const struct device_node *np, in of_find_property()
622 static inline struct device_node *of_find_compatible_node( in of_find_compatible_node()
623 struct device_node *from, in of_find_compatible_node()
630 static inline bool of_property_read_bool(const struct device_node *np, in of_property_read_bool()
636 static inline int of_property_count_elems_of_size(const struct device_node *np, in of_property_count_elems_of_size()
642 static inline int of_property_read_u16_index(const struct device_node *np, in of_property_read_u16_index()
648 static inline int of_property_read_u32_index(const struct device_node *np, in of_property_read_u32_index()
654 static inline int of_property_read_u64_index(const struct device_node *np, in of_property_read_u64_index()
660 static inline const void *of_get_property(const struct device_node *node, in of_get_property()
667 static inline struct device_node *of_get_cpu_node(int cpu, in of_get_cpu_node()
673 static inline struct device_node *of_cpu_device_node_get(int cpu) in of_cpu_device_node_get()
678 static inline int of_cpu_node_to_id(struct device_node *np) in of_cpu_node_to_id()
683 static inline struct device_node *of_get_next_cpu_node(struct device_node *prev) in of_get_next_cpu_node()
688 static inline struct device_node *of_get_cpu_state_node(struct device_node *cpu_node, in of_get_cpu_state_node()
694 static inline int of_n_addr_cells(struct device_node *np) in of_n_addr_cells()
699 static inline int of_n_size_cells(struct device_node *np) in of_n_size_cells()
704 static inline int of_property_read_variable_u8_array(const struct device_node *np, in of_property_read_variable_u8_array()
711 static inline int of_property_read_variable_u16_array(const struct device_node *np, in of_property_read_variable_u16_array()
718 static inline int of_property_read_variable_u32_array(const struct device_node *np, in of_property_read_variable_u32_array()
727 static inline int of_property_read_u64(const struct device_node *np, in of_property_read_u64()
733 static inline int of_property_read_variable_u64_array(const struct device_node *np, in of_property_read_variable_u64_array()
742 static inline int of_property_read_string(const struct device_node *np, in of_property_read_string()
749 static inline int of_property_match_string(const struct device_node *np, in of_property_match_string()
756 static inline int of_property_read_string_helper(const struct device_node *np, in of_property_read_string_helper()
763 static inline int __of_parse_phandle_with_args(const struct device_node *np, in __of_parse_phandle_with_args()
773 static inline int of_parse_phandle_with_args_map(const struct device_node *np, in of_parse_phandle_with_args_map()
782 static inline int of_count_phandle_with_args(const struct device_node *np, in of_count_phandle_with_args()
789 static inline ssize_t of_modalias(const struct device_node *np, char *str, in of_modalias()
795 static inline int of_request_module(const struct device_node *np) in of_request_module()
801 const struct device_node *np, in of_phandle_iterator_init()
821 static inline int of_alias_get_id(struct device_node *np, const char *stem) in of_alias_get_id()
836 static inline int of_add_property(struct device_node *np, struct property *prop) in of_add_property()
841 static inline int of_remove_property(struct device_node *np, struct property *prop) in of_remove_property()
851 static inline bool of_console_check(const struct device_node *dn, const char *name, int index) in of_console_check()
868 static inline int of_node_check_flag(struct device_node *n, unsigned long flag) in of_node_check_flag()
873 static inline int of_node_test_and_set_flag(struct device_node *n, in of_node_test_and_set_flag()
879 static inline void of_node_set_flag(struct device_node *n, unsigned long flag) in of_node_set_flag()
883 static inline void of_node_clear_flag(struct device_node *n, unsigned long flag) in of_node_clear_flag()
901 static inline int of_map_id(const struct device_node *np, u32 id, in of_map_id()
903 struct device_node **target, u32 *id_out) in of_map_id()
908 static inline phys_addr_t of_dma_get_max_cpu_address(struct device_node *np) in of_dma_get_max_cpu_address()
933 extern int of_node_to_nid(struct device_node *np);
935 static inline int of_node_to_nid(struct device_node *device) in of_node_to_nid()
950 static inline struct device_node *of_find_matching_node( in of_find_matching_node()
951 struct device_node *from, in of_find_matching_node()
957 static inline const char *of_node_get_device_type(const struct device_node *np) in of_node_get_device_type()
962 static inline bool of_node_is_type(const struct device_node *np, const char *type) in of_node_is_type()
979 static inline struct device_node *of_parse_phandle(const struct device_node *np, in of_parse_phandle()
1024 static inline int of_parse_phandle_with_args(const struct device_node *np, in of_parse_phandle_with_args()
1070 static inline int of_parse_phandle_with_fixed_args(const struct device_node *np, in of_parse_phandle_with_fixed_args()
1095 static inline int of_parse_phandle_with_optional_args(const struct device_node *np, in of_parse_phandle_with_optional_args()
1134 static inline int of_property_count_u8_elems(const struct device_node *np, in of_property_count_u8_elems()
1153 static inline int of_property_count_u16_elems(const struct device_node *np, in of_property_count_u16_elems()
1172 static inline int of_property_count_u32_elems(const struct device_node *np, in of_property_count_u32_elems()
1191 static inline int of_property_count_u64_elems(const struct device_node *np, in of_property_count_u64_elems()
1210 static inline int of_property_read_string_array(const struct device_node *np, in of_property_read_string_array()
1230 static inline int of_property_count_strings(const struct device_node *np, in of_property_count_strings()
1255 static inline int of_property_read_string_index(const struct device_node *np, in of_property_read_string_index()
1272 static inline bool of_property_present(const struct device_node *np, const char *propname) in of_property_present()
1299 static inline int of_property_read_u8_array(const struct device_node *np, in of_property_read_u8_array()
1331 static inline int of_property_read_u16_array(const struct device_node *np, in of_property_read_u16_array()
1361 static inline int of_property_read_u32_array(const struct device_node *np, in of_property_read_u32_array()
1391 static inline int of_property_read_u64_array(const struct device_node *np, in of_property_read_u64_array()
1403 static inline int of_property_read_u8(const struct device_node *np, in of_property_read_u8()
1410 static inline int of_property_read_u16(const struct device_node *np, in of_property_read_u16()
1417 static inline int of_property_read_u32(const struct device_node *np, in of_property_read_u32()
1424 static inline int of_property_read_s32(const struct device_node *np, in of_property_read_s32()
1471 for (struct device_node *child __free(device_node) = \
1477 for (struct device_node *child __free(device_node) = \
1490 for (struct device_node *child __free(device_node) = \
1503 static inline int of_get_child_count(const struct device_node *np) in of_get_child_count()
1505 struct device_node *child; in of_get_child_count()
1514 static inline int of_get_available_child_count(const struct device_node *np) in of_get_available_child_count()
1516 struct device_node *child; in of_get_available_child_count()
1543 typedef int (*of_init_fn_2)(struct device_node *, struct device_node *);
1544 typedef int (*of_init_fn_1_ret)(struct device_node *);
1545 typedef void (*of_init_fn_1)(struct device_node *);
1571 struct device_node *np;
1610 unsigned long action, struct device_node *np,
1614 struct device_node *np) in of_changeset_attach_node()
1620 struct device_node *np) in of_changeset_detach_node()
1626 struct device_node *np, struct property *prop) in of_changeset_add_property()
1632 struct device_node *np, struct property *prop) in of_changeset_remove_property()
1638 struct device_node *np, struct property *prop) in of_changeset_update_property()
1643 struct device_node *of_changeset_create_node(struct of_changeset *ocs,
1644 struct device_node *parent,
1647 struct device_node *np,
1650 struct device_node *np,
1654 struct device_node *np,
1658 struct device_node *np, in of_changeset_add_prop_u32()
1666 struct device_node *np,
1669 int of_changeset_add_prop_bool(struct of_changeset *ocs, struct device_node *np,
1699 static inline bool of_device_is_system_power_controller(const struct device_node *np) in of_device_is_system_power_controller()
1745 struct device_node *overlay;
1746 struct device_node *target;
1752 int *ovcs_id, const struct device_node *target_base);
1762 int *ovcs_id, const struct device_node *target_base) in of_overlay_fdt_apply()