Lines Matching defs:device_node

48 struct device_node {
56 struct device_node *parent;
57 struct device_node *child;
58 struct device_node *sibling;
72 struct device_node *np;
81 const struct device_node *parent;
91 struct device_node *node;
95 struct device_node *dn;
107 * On return the device_node refcount is set to one. Use of_node_put()
113 static inline void of_node_init(struct device_node *node)
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)
136 static inline void of_node_put(struct device_node *node) { }
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;
147 * struct device_node flag descriptions
173 struct device_node, fwnode) : \
185 static inline bool of_node_is_root(const struct device_node *node)
190 static inline int of_node_check_flag(const struct device_node *n, unsigned long flag)
195 static inline int of_node_test_and_set_flag(struct device_node *n,
201 static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
206 static inline void of_node_clear_flag(struct device_node *n, unsigned long 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)
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)
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_available_child(
293 const struct device_node *node, struct device_node *prev);
294 extern struct device_node *of_get_next_reserved_child(
295 const struct device_node *node, struct device_node *prev);
297 extern struct device_node *of_get_compatible_child(const struct device_node *parent,
299 extern struct device_node *of_get_child_by_name(const struct device_node *node,
303 extern struct device_node *of_find_next_cache_node(const struct device_node *);
305 extern struct device_node *of_find_node_with_property(
306 struct device_node *from, const char *prop_name);
308 extern struct property *of_find_property(const struct device_node *np,
311 extern int of_property_count_elems_of_size(const struct device_node *np,
313 extern int of_property_read_u32_index(const struct device_node *np,
316 extern int of_property_read_u64_index(const struct device_node *np,
319 extern int of_property_read_variable_u8_array(const struct device_node *np,
322 extern int of_property_read_variable_u16_array(const struct device_node *np,
325 extern int of_property_read_variable_u32_array(const struct device_node *np,
330 extern int of_property_read_u64(const struct device_node *np,
332 extern int of_property_read_variable_u64_array(const struct device_node *np,
338 extern int of_property_read_string(const struct device_node *np,
341 extern int of_property_match_string(const struct device_node *np,
344 extern int of_property_read_string_helper(const struct device_node *np,
347 extern int of_device_is_compatible(const struct device_node *device,
349 extern int of_device_compatible_match(const struct device_node *device,
351 extern bool of_device_is_available(const struct device_node *device);
352 extern bool of_device_is_big_endian(const struct device_node *device);
353 extern const void *of_get_property(const struct device_node *node,
356 extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);
357 extern struct device_node *of_cpu_device_node_get(int cpu);
358 extern int of_cpu_node_to_id(struct device_node *np);
359 extern struct device_node *of_get_next_cpu_node(struct device_node *prev);
360 extern struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
362 extern u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread);
364 extern int of_n_addr_cells(struct device_node *np);
365 extern int of_n_size_cells(struct device_node *np);
367 const struct of_device_id *matches, const struct device_node *node);
369 extern int of_alias_from_compatible(const struct device_node *node, char *alias,
372 extern int __of_parse_phandle_with_args(const struct device_node *np,
375 extern int of_parse_phandle_with_args_map(const struct device_node *np,
378 extern int of_count_phandle_with_args(const struct device_node *np,
382 extern ssize_t of_modalias(const struct device_node *np, char *str, ssize_t len);
383 extern int of_request_module(const struct device_node *np);
387 const struct device_node *np,
398 extern int of_alias_get_id(struct device_node *np, const char *stem);
416 extern int of_add_property(struct device_node *np, struct property *prop);
417 extern int of_remove_property(struct device_node *np, struct property *prop);
418 extern int of_update_property(struct device_node *np, struct property *newprop);
427 extern int of_attach_node(struct device_node *);
428 extern int of_detach_node(struct device_node *);
451 bool of_console_check(struct device_node *dn, char *name, int index);
453 int of_map_id(struct device_node *np, u32 id,
455 struct device_node **target, u32 *id_out);
457 phys_addr_t of_dma_get_max_cpu_address(struct device_node *np);
475 static inline struct device_node *to_of_node(const struct fwnode_handle *fwnode)
480 static inline bool of_node_name_eq(const struct device_node *np, const char *name)
485 static inline bool of_node_name_prefix(const struct device_node *np, const char *prefix)
490 static inline const char* of_node_full_name(const struct device_node *np)
495 static inline struct device_node *of_find_node_by_name(struct device_node *from,
501 static inline struct device_node *of_find_node_by_type(struct device_node *from,
507 static inline struct device_node *of_find_matching_node_and_match(
508 struct device_node *from,
515 static inline struct device_node *of_find_node_by_path(const char *path)
520 static inline struct device_node *of_find_node_opts_by_path(const char *path,
526 static inline struct device_node *of_find_node_by_phandle(phandle handle)
531 static inline struct device_node *of_get_parent(const struct device_node *node)
536 static inline struct device_node *of_get_next_parent(struct device_node *node)
541 static inline struct device_node *of_get_next_child(
542 const struct device_node *node, struct device_node *prev)
547 static inline struct device_node *of_get_next_available_child(
548 const struct device_node *node, struct device_node *prev)
553 static inline struct device_node *of_get_next_reserved_child(
554 const struct device_node *node, struct device_node *prev)
559 static inline struct device_node *of_find_node_with_property(
560 struct device_node *from, const char *prop_name)
567 static inline struct device_node *of_get_compatible_child(const struct device_node *parent,
573 static inline struct device_node *of_get_child_by_name(
574 const struct device_node *node,
580 static inline int of_device_is_compatible(const struct device_node *device,
586 static inline int of_device_compatible_match(const struct device_node *device,
592 static inline bool of_device_is_available(const struct device_node *device)
597 static inline bool of_device_is_big_endian(const struct device_node *device)
602 static inline struct property *of_find_property(const struct device_node *np,
609 static inline struct device_node *of_find_compatible_node(
610 struct device_node *from,
617 static inline int of_property_count_elems_of_size(const struct device_node *np,
623 static inline int of_property_read_u32_index(const struct device_node *np,
629 static inline int of_property_read_u64_index(const struct device_node *np,
635 static inline const void *of_get_property(const struct device_node *node,
642 static inline struct device_node *of_get_cpu_node(int cpu,
648 static inline struct device_node *of_cpu_device_node_get(int cpu)
653 static inline int of_cpu_node_to_id(struct device_node *np)
658 static inline struct device_node *of_get_next_cpu_node(struct device_node *prev)
663 static inline struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
669 static inline int of_n_addr_cells(struct device_node *np)
674 static inline int of_n_size_cells(struct device_node *np)
679 static inline int of_property_read_variable_u8_array(const struct device_node *np,
686 static inline int of_property_read_variable_u16_array(const struct device_node *np,
693 static inline int of_property_read_variable_u32_array(const struct device_node *np,
702 static inline int of_property_read_u64(const struct device_node *np,
708 static inline int of_property_read_variable_u64_array(const struct device_node *np,
717 static inline int of_property_read_string(const struct device_node *np,
724 static inline int of_property_match_string(const struct device_node *np,
731 static inline int of_property_read_string_helper(const struct device_node *np,
738 static inline int __of_parse_phandle_with_args(const struct device_node *np,
748 static inline int of_parse_phandle_with_args_map(const struct device_node *np,
757 static inline int of_count_phandle_with_args(const struct device_node *np,
764 static inline ssize_t of_modalias(const struct device_node *np, char *str,
770 static inline int of_request_module(const struct device_node *np)
776 const struct device_node *np,
796 static inline int of_alias_get_id(struct device_node *np, const char *stem)
811 static inline int of_add_property(struct device_node *np, struct property *prop)
816 static inline int of_remove_property(struct device_node *np, struct property *prop)
826 static inline bool of_console_check(const struct device_node *dn, const char *name, int index)
843 static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
848 static inline int of_node_test_and_set_flag(struct device_node *n,
854 static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
858 static inline void of_node_clear_flag(struct device_node *n, unsigned long flag)
876 static inline int of_map_id(struct device_node *np, u32 id,
878 struct device_node **target, u32 *id_out)
883 static inline phys_addr_t of_dma_get_max_cpu_address(struct device_node *np)
914 extern int of_node_to_nid(struct device_node *np);
916 static inline int of_node_to_nid(struct device_node *device)
931 static inline struct device_node *of_find_matching_node(
932 struct device_node *from,
938 static inline const char *of_node_get_device_type(const struct device_node *np)
943 static inline bool of_node_is_type(const struct device_node *np, const char *type)
951 * of_parse_phandle - Resolve a phandle property to a device_node pointer
957 * Return: The device_node pointer with refcount incremented. Use
960 static inline struct device_node *of_parse_phandle(const struct device_node *np,
1002 * To get a device_node of the ``node2`` node you may call this:
1005 static inline int of_parse_phandle_with_args(const struct device_node *np,
1048 * To get a device_node of the ``node2`` node you may call this:
1051 static inline int of_parse_phandle_with_fixed_args(const struct device_node *np,
1076 static inline int of_parse_phandle_with_optional_args(const struct device_node *np,
1115 static inline int of_property_count_u8_elems(const struct device_node *np,
1134 static inline int of_property_count_u16_elems(const struct device_node *np,
1153 static inline int of_property_count_u32_elems(const struct device_node *np,
1172 static inline int of_property_count_u64_elems(const struct device_node *np,
1191 static inline int of_property_read_string_array(const struct device_node *np,
1211 static inline int of_property_count_strings(const struct device_node *np,
1236 static inline int of_property_read_string_index(const struct device_node *np,
1254 static inline bool of_property_read_bool(const struct device_node *np,
1271 static inline bool of_property_present(const struct device_node *np, const char *propname)
1296 static inline int of_property_read_u8_array(const struct device_node *np,
1328 static inline int of_property_read_u16_array(const struct device_node *np,
1358 static inline int of_property_read_u32_array(const struct device_node *np,
1388 static inline int of_property_read_u64_array(const struct device_node *np,
1400 static inline int of_property_read_u8(const struct device_node *np,
1407 static inline int of_property_read_u16(const struct device_node *np,
1414 static inline int of_property_read_u32(const struct device_node *np,
1421 static inline int of_property_read_s32(const struct device_node *np,
1467 for (struct device_node *child __free(device_node) = \
1480 for (struct device_node *child __free(device_node) = \
1493 static inline int of_get_child_count(const struct device_node *np)
1495 struct device_node *child;
1504 static inline int of_get_available_child_count(const struct device_node *np)
1506 struct device_node *child;
1533 typedef int (*of_init_fn_2)(struct device_node *, struct device_node *);
1534 typedef int (*of_init_fn_1_ret)(struct device_node *);
1535 typedef void (*of_init_fn_1)(struct device_node *);
1561 struct device_node *np;
1600 unsigned long action, struct device_node *np,
1604 struct device_node *np)
1610 struct device_node *np)
1616 struct device_node *np, struct property *prop)
1622 struct device_node *np, struct property *prop)
1628 struct device_node *np, struct property *prop)
1633 struct device_node *of_changeset_create_node(struct of_changeset *ocs,
1634 struct device_node *parent,
1637 struct device_node *np,
1640 struct device_node *np,
1644 struct device_node *np,
1648 struct device_node *np,
1677 * of_device_is_system_power_controller - Tells if system-power-controller is found for device_node
1678 * @np: Pointer to the given device_node
1682 static inline bool of_device_is_system_power_controller(const struct device_node *np)
1728 struct device_node *overlay;
1729 struct device_node *target;
1735 int *ovcs_id, struct device_node *target_base);
1745 int *ovcs_id, struct device_node *target_base)