Lines Matching refs:np
75 struct device_node *np; member
256 extern bool of_node_name_eq(const struct device_node *np, const char *name);
257 extern bool of_node_name_prefix(const struct device_node *np, const char *prefix);
259 static inline const char *of_node_full_name(const struct device_node *np) in of_node_full_name() argument
261 return np ? np->full_name : "<no-node>"; in of_node_full_name()
304 extern struct property *of_find_property(const struct device_node *np,
307 extern int of_property_count_elems_of_size(const struct device_node *np,
309 extern int of_property_read_u32_index(const struct device_node *np,
312 extern int of_property_read_u64_index(const struct device_node *np,
315 extern int of_property_read_variable_u8_array(const struct device_node *np,
318 extern int of_property_read_variable_u16_array(const struct device_node *np,
321 extern int of_property_read_variable_u32_array(const struct device_node *np,
326 extern int of_property_read_u64(const struct device_node *np,
328 extern int of_property_read_variable_u64_array(const struct device_node *np,
334 extern int of_property_read_string(const struct device_node *np,
337 extern int of_property_match_string(const struct device_node *np,
340 extern int of_property_read_string_helper(const struct device_node *np,
360 extern int of_n_addr_cells(struct device_node *np);
361 extern int of_n_size_cells(struct device_node *np);
366 extern struct device_node *of_parse_phandle(const struct device_node *np,
369 extern int of_parse_phandle_with_args(const struct device_node *np,
372 extern int of_parse_phandle_with_args_map(const struct device_node *np,
375 extern int of_parse_phandle_with_fixed_args(const struct device_node *np,
378 extern int of_count_phandle_with_args(const struct device_node *np,
383 const struct device_node *np,
394 extern int of_alias_get_id(struct device_node *np, const char *stem);
402 extern int of_add_property(struct device_node *np, struct property *prop);
403 extern int of_remove_property(struct device_node *np, struct property *prop);
404 extern int of_update_property(struct device_node *np, struct property *newprop);
436 static inline int of_property_read_u8_array(const struct device_node *np, in of_property_read_u8_array() argument
440 int ret = of_property_read_variable_u8_array(np, propname, out_values, in of_property_read_u8_array()
466 static inline int of_property_read_u16_array(const struct device_node *np, in of_property_read_u16_array() argument
470 int ret = of_property_read_variable_u16_array(np, propname, out_values, in of_property_read_u16_array()
494 static inline int of_property_read_u32_array(const struct device_node *np, in of_property_read_u32_array() argument
498 int ret = of_property_read_variable_u32_array(np, propname, out_values, in of_property_read_u32_array()
522 static inline int of_property_read_u64_array(const struct device_node *np, in of_property_read_u64_array() argument
526 int ret = of_property_read_variable_u64_array(np, propname, out_values, in of_property_read_u64_array()
555 extern int of_cpu_node_to_id(struct device_node *np);
557 int of_map_id(struct device_node *np, u32 id,
561 phys_addr_t of_dma_get_max_cpu_address(struct device_node *np);
579 static inline bool of_node_name_eq(const struct device_node *np, const char *name) in of_node_name_eq() argument
584 static inline bool of_node_name_prefix(const struct device_node *np, const char *prefix) in of_node_name_prefix() argument
589 static inline const char* of_node_full_name(const struct device_node *np) in of_node_full_name() argument
700 static inline struct property *of_find_property(const struct device_node *np, in of_find_property() argument
715 static inline int of_property_count_elems_of_size(const struct device_node *np, in of_property_count_elems_of_size() argument
721 static inline int of_property_read_u8_array(const struct device_node *np, in of_property_read_u8_array() argument
727 static inline int of_property_read_u16_array(const struct device_node *np, in of_property_read_u16_array() argument
733 static inline int of_property_read_u32_array(const struct device_node *np, in of_property_read_u32_array() argument
740 static inline int of_property_read_u64_array(const struct device_node *np, in of_property_read_u64_array() argument
747 static inline int of_property_read_u32_index(const struct device_node *np, in of_property_read_u32_index() argument
753 static inline int of_property_read_u64_index(const struct device_node *np, in of_property_read_u64_index() argument
783 static inline int of_n_addr_cells(struct device_node *np) in of_n_addr_cells() argument
788 static inline int of_n_size_cells(struct device_node *np) in of_n_size_cells() argument
793 static inline int of_property_read_variable_u8_array(const struct device_node *np, in of_property_read_variable_u8_array() argument
800 static inline int of_property_read_variable_u16_array(const struct device_node *np, in of_property_read_variable_u16_array() argument
807 static inline int of_property_read_variable_u32_array(const struct device_node *np, in of_property_read_variable_u32_array() argument
816 static inline int of_property_read_u64(const struct device_node *np, in of_property_read_u64() argument
822 static inline int of_property_read_variable_u64_array(const struct device_node *np, in of_property_read_variable_u64_array() argument
831 static inline int of_property_read_string(const struct device_node *np, in of_property_read_string() argument
838 static inline int of_property_match_string(const struct device_node *np, in of_property_match_string() argument
845 static inline int of_property_read_string_helper(const struct device_node *np, in of_property_read_string_helper() argument
852 static inline struct device_node *of_parse_phandle(const struct device_node *np, in of_parse_phandle() argument
859 static inline int of_parse_phandle_with_args(const struct device_node *np, in of_parse_phandle_with_args() argument
868 static inline int of_parse_phandle_with_args_map(const struct device_node *np, in of_parse_phandle_with_args_map() argument
877 static inline int of_parse_phandle_with_fixed_args(const struct device_node *np, in of_parse_phandle_with_fixed_args() argument
884 static inline int of_count_phandle_with_args(struct device_node *np, in of_count_phandle_with_args() argument
892 const struct device_node *np, in of_phandle_iterator_init() argument
912 static inline int of_alias_get_id(struct device_node *np, const char *stem) in of_alias_get_id() argument
934 static inline int of_add_property(struct device_node *np, struct property *prop) in of_add_property() argument
939 static inline int of_remove_property(struct device_node *np, struct property *prop) in of_remove_property() argument
993 static inline int of_cpu_node_to_id(struct device_node *np) in of_cpu_node_to_id() argument
998 static inline int of_map_id(struct device_node *np, u32 id, in of_map_id() argument
1005 static inline phys_addr_t of_dma_get_max_cpu_address(struct device_node *np) in of_dma_get_max_cpu_address() argument
1028 extern int of_node_to_nid(struct device_node *np);
1052 static inline const char *of_node_get_device_type(const struct device_node *np) in of_node_get_device_type() argument
1054 return of_get_property(np, "device_type", NULL); in of_node_get_device_type()
1057 static inline bool of_node_is_type(const struct device_node *np, const char *type) in of_node_is_type() argument
1059 const char *match = of_node_get_device_type(np); in of_node_is_type()
1061 return np && match && type && !strcmp(match, type); in of_node_is_type()
1075 static inline int of_property_count_u8_elems(const struct device_node *np, in of_property_count_u8_elems() argument
1078 return of_property_count_elems_of_size(np, propname, sizeof(u8)); in of_property_count_u8_elems()
1092 static inline int of_property_count_u16_elems(const struct device_node *np, in of_property_count_u16_elems() argument
1095 return of_property_count_elems_of_size(np, propname, sizeof(u16)); in of_property_count_u16_elems()
1109 static inline int of_property_count_u32_elems(const struct device_node *np, in of_property_count_u32_elems() argument
1112 return of_property_count_elems_of_size(np, propname, sizeof(u32)); in of_property_count_u32_elems()
1126 static inline int of_property_count_u64_elems(const struct device_node *np, in of_property_count_u64_elems() argument
1129 return of_property_count_elems_of_size(np, propname, sizeof(u64)); in of_property_count_u64_elems()
1145 static inline int of_property_read_string_array(const struct device_node *np, in of_property_read_string_array() argument
1149 return of_property_read_string_helper(np, propname, out_strs, sz, 0); in of_property_read_string_array()
1164 static inline int of_property_count_strings(const struct device_node *np, in of_property_count_strings() argument
1167 return of_property_read_string_helper(np, propname, NULL, 0, 0); in of_property_count_strings()
1188 static inline int of_property_read_string_index(const struct device_node *np, in of_property_read_string_index() argument
1192 int rc = of_property_read_string_helper(np, propname, output, 1, index); in of_property_read_string_index()
1204 static inline bool of_property_read_bool(const struct device_node *np, in of_property_read_bool() argument
1207 struct property *prop = of_find_property(np, propname, NULL); in of_property_read_bool()
1212 static inline int of_property_read_u8(const struct device_node *np, in of_property_read_u8() argument
1216 return of_property_read_u8_array(np, propname, out_value, 1); in of_property_read_u8()
1219 static inline int of_property_read_u16(const struct device_node *np, in of_property_read_u16() argument
1223 return of_property_read_u16_array(np, propname, out_value, 1); in of_property_read_u16()
1226 static inline int of_property_read_u32(const struct device_node *np, in of_property_read_u32() argument
1230 return of_property_read_u32_array(np, propname, out_value, 1); in of_property_read_u32()
1233 static inline int of_property_read_s32(const struct device_node *np, in of_property_read_s32() argument
1237 return of_property_read_u32(np, propname, (u32*) out_value); in of_property_read_s32()
1240 #define of_for_each_phandle(it, err, np, ln, cn, cc) \ argument
1241 for (of_phandle_iterator_init((it), (np), (ln), (cn), (cc)), \
1246 #define of_property_for_each_u32(np, propname, prop, p, u) \ argument
1247 for (prop = of_find_property(np, propname, NULL), \
1252 #define of_property_for_each_string(np, propname, prop, s) \ argument
1253 for (prop = of_find_property(np, propname, NULL), \
1289 static inline int of_get_child_count(const struct device_node *np) in of_get_child_count() argument
1294 for_each_child_of_node(np, child) in of_get_child_count()
1300 static inline int of_get_available_child_count(const struct device_node *np) in of_get_available_child_count() argument
1305 for_each_available_child_of_node(np, child) in of_get_available_child_count()
1354 struct device_node *np; member
1391 unsigned long action, struct device_node *np,
1395 struct device_node *np) in of_changeset_attach_node() argument
1397 return of_changeset_action(ocs, OF_RECONFIG_ATTACH_NODE, np, NULL); in of_changeset_attach_node()
1401 struct device_node *np) in of_changeset_detach_node() argument
1403 return of_changeset_action(ocs, OF_RECONFIG_DETACH_NODE, np, NULL); in of_changeset_detach_node()
1407 struct device_node *np, struct property *prop) in of_changeset_add_property() argument
1409 return of_changeset_action(ocs, OF_RECONFIG_ADD_PROPERTY, np, prop); in of_changeset_add_property()
1413 struct device_node *np, struct property *prop) in of_changeset_remove_property() argument
1415 return of_changeset_action(ocs, OF_RECONFIG_REMOVE_PROPERTY, np, prop); in of_changeset_remove_property()
1419 struct device_node *np, struct property *prop) in of_changeset_update_property() argument
1421 return of_changeset_action(ocs, OF_RECONFIG_UPDATE_PROPERTY, np, prop); in of_changeset_update_property()
1450 static inline bool of_device_is_system_power_controller(const struct device_node *np) in of_device_is_system_power_controller() argument
1452 return of_property_read_bool(np, "system-power-controller"); in of_device_is_system_power_controller()