Lines Matching refs:np
72 struct device_node *np; member
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() argument
263 return np ? np->full_name : "<no-node>"; in of_node_full_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,
358 extern int of_cpu_node_to_id(struct device_node *np);
364 extern int of_n_addr_cells(struct device_node *np);
365 extern int of_n_size_cells(struct device_node *np);
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);
451 int of_map_id(struct device_node *np, u32 id,
455 phys_addr_t of_dma_get_max_cpu_address(struct device_node *np);
478 static inline bool of_node_name_eq(const struct device_node *np, const char *name) in of_node_name_eq() argument
483 static inline bool of_node_name_prefix(const struct device_node *np, const char *prefix) in of_node_name_prefix() argument
488 static inline const char* of_node_full_name(const struct device_node *np) in of_node_full_name() argument
600 static inline struct property *of_find_property(const struct device_node *np, in of_find_property() argument
615 static inline int of_property_count_elems_of_size(const struct device_node *np, in of_property_count_elems_of_size() argument
621 static inline int of_property_read_u32_index(const struct device_node *np, in of_property_read_u32_index() argument
627 static inline int of_property_read_u64_index(const struct device_node *np, in of_property_read_u64_index() argument
651 static inline int of_cpu_node_to_id(struct device_node *np) in of_cpu_node_to_id() argument
667 static inline int of_n_addr_cells(struct device_node *np) in of_n_addr_cells() argument
672 static inline int of_n_size_cells(struct device_node *np) in of_n_size_cells() argument
677 static inline int of_property_read_variable_u8_array(const struct device_node *np, in of_property_read_variable_u8_array() argument
684 static inline int of_property_read_variable_u16_array(const struct device_node *np, in of_property_read_variable_u16_array() argument
691 static inline int of_property_read_variable_u32_array(const struct device_node *np, in of_property_read_variable_u32_array() argument
700 static inline int of_property_read_u64(const struct device_node *np, in of_property_read_u64() argument
706 static inline int of_property_read_variable_u64_array(const struct device_node *np, in of_property_read_variable_u64_array() argument
715 static inline int of_property_read_string(const struct device_node *np, in of_property_read_string() argument
722 static inline int of_property_match_string(const struct device_node *np, in of_property_match_string() argument
729 static inline int of_property_read_string_helper(const struct device_node *np, in of_property_read_string_helper() argument
736 static inline int __of_parse_phandle_with_args(const struct device_node *np, in __of_parse_phandle_with_args() argument
746 static inline int of_parse_phandle_with_args_map(const struct device_node *np, in of_parse_phandle_with_args_map() argument
755 static inline int of_count_phandle_with_args(const struct device_node *np, in of_count_phandle_with_args() argument
762 static inline ssize_t of_modalias(const struct device_node *np, char *str, in of_modalias() argument
768 static inline int of_request_module(const struct device_node *np) in of_request_module() argument
774 const struct device_node *np, in of_phandle_iterator_init() argument
794 static inline int of_alias_get_id(struct device_node *np, const char *stem) in of_alias_get_id() argument
809 static inline int of_add_property(struct device_node *np, struct property *prop) in of_add_property() argument
814 static inline int of_remove_property(struct device_node *np, struct property *prop) in of_remove_property() argument
874 static inline int of_map_id(struct device_node *np, u32 id, in of_map_id() argument
881 static inline phys_addr_t of_dma_get_max_cpu_address(struct device_node *np) in of_dma_get_max_cpu_address() argument
912 extern int of_node_to_nid(struct device_node *np);
936 static inline const char *of_node_get_device_type(const struct device_node *np) in of_node_get_device_type() argument
938 return of_get_property(np, "device_type", NULL); in of_node_get_device_type()
941 static inline bool of_node_is_type(const struct device_node *np, const char *type) in of_node_is_type() argument
943 const char *match = of_node_get_device_type(np); in of_node_is_type()
945 return np && match && type && !strcmp(match, type); in of_node_is_type()
958 static inline struct device_node *of_parse_phandle(const struct device_node *np, in of_parse_phandle() argument
964 if (__of_parse_phandle_with_args(np, phandle_name, NULL, 0, in of_parse_phandle()
968 return args.np; in of_parse_phandle()
1003 static inline int of_parse_phandle_with_args(const struct device_node *np, in of_parse_phandle_with_args() argument
1015 return __of_parse_phandle_with_args(np, list_name, cells_name, in of_parse_phandle_with_args()
1049 static inline int of_parse_phandle_with_fixed_args(const struct device_node *np, in of_parse_phandle_with_fixed_args() argument
1055 return __of_parse_phandle_with_args(np, list_name, NULL, cell_count, in of_parse_phandle_with_fixed_args()
1074 static inline int of_parse_phandle_with_optional_args(const struct device_node *np, in of_parse_phandle_with_optional_args() argument
1080 return __of_parse_phandle_with_args(np, list_name, cells_name, in of_parse_phandle_with_optional_args()
1095 return a1->np == a2->np && in of_phandle_args_equal()
1113 static inline int of_property_count_u8_elems(const struct device_node *np, in of_property_count_u8_elems() argument
1116 return of_property_count_elems_of_size(np, propname, sizeof(u8)); in of_property_count_u8_elems()
1132 static inline int of_property_count_u16_elems(const struct device_node *np, in of_property_count_u16_elems() argument
1135 return of_property_count_elems_of_size(np, propname, sizeof(u16)); in of_property_count_u16_elems()
1151 static inline int of_property_count_u32_elems(const struct device_node *np, in of_property_count_u32_elems() argument
1154 return of_property_count_elems_of_size(np, propname, sizeof(u32)); in of_property_count_u32_elems()
1170 static inline int of_property_count_u64_elems(const struct device_node *np, in of_property_count_u64_elems() argument
1173 return of_property_count_elems_of_size(np, propname, sizeof(u64)); in of_property_count_u64_elems()
1189 static inline int of_property_read_string_array(const struct device_node *np, in of_property_read_string_array() argument
1193 return of_property_read_string_helper(np, propname, out_strs, sz, 0); in of_property_read_string_array()
1209 static inline int of_property_count_strings(const struct device_node *np, in of_property_count_strings() argument
1212 return of_property_read_string_helper(np, propname, NULL, 0, 0); in of_property_count_strings()
1234 static inline int of_property_read_string_index(const struct device_node *np, in of_property_read_string_index() argument
1238 int rc = of_property_read_string_helper(np, propname, output, 1, index); in of_property_read_string_index()
1252 static inline bool of_property_read_bool(const struct device_node *np, in of_property_read_bool() argument
1255 struct property *prop = of_find_property(np, propname, NULL); in of_property_read_bool()
1269 static inline bool of_property_present(const struct device_node *np, const char *propname) in of_property_present() argument
1271 return of_property_read_bool(np, propname); in of_property_present()
1294 static inline int of_property_read_u8_array(const struct device_node *np, in of_property_read_u8_array() argument
1298 int ret = of_property_read_variable_u8_array(np, propname, out_values, in of_property_read_u8_array()
1326 static inline int of_property_read_u16_array(const struct device_node *np, in of_property_read_u16_array() argument
1330 int ret = of_property_read_variable_u16_array(np, propname, out_values, in of_property_read_u16_array()
1356 static inline int of_property_read_u32_array(const struct device_node *np, in of_property_read_u32_array() argument
1360 int ret = of_property_read_variable_u32_array(np, propname, out_values, in of_property_read_u32_array()
1386 static inline int of_property_read_u64_array(const struct device_node *np, in of_property_read_u64_array() argument
1390 int ret = of_property_read_variable_u64_array(np, propname, out_values, in of_property_read_u64_array()
1398 static inline int of_property_read_u8(const struct device_node *np, in of_property_read_u8() argument
1402 return of_property_read_u8_array(np, propname, out_value, 1); in of_property_read_u8()
1405 static inline int of_property_read_u16(const struct device_node *np, in of_property_read_u16() argument
1409 return of_property_read_u16_array(np, propname, out_value, 1); in of_property_read_u16()
1412 static inline int of_property_read_u32(const struct device_node *np, in of_property_read_u32() argument
1416 return of_property_read_u32_array(np, propname, out_value, 1); in of_property_read_u32()
1419 static inline int of_property_read_s32(const struct device_node *np, in of_property_read_s32() argument
1423 return of_property_read_u32(np, propname, (u32*) out_value); in of_property_read_s32()
1426 #define of_for_each_phandle(it, err, np, ln, cn, cc) \ argument
1427 for (of_phandle_iterator_init((it), (np), (ln), (cn), (cc)), \
1432 #define of_property_for_each_u32(np, propname, u) \ argument
1434 {of_find_property(np, propname, NULL), \
1439 #define of_property_for_each_string(np, propname, prop, s) \ argument
1440 for (prop = of_find_property(np, propname, NULL), \
1492 static inline int of_get_child_count(const struct device_node *np) in of_get_child_count() argument
1497 for_each_child_of_node(np, child) in of_get_child_count()
1503 static inline int of_get_available_child_count(const struct device_node *np) in of_get_available_child_count() argument
1508 for_each_available_child_of_node(np, child) in of_get_available_child_count()
1560 struct device_node *np; member
1599 unsigned long action, struct device_node *np,
1603 struct device_node *np) in of_changeset_attach_node() argument
1605 return of_changeset_action(ocs, OF_RECONFIG_ATTACH_NODE, np, NULL); in of_changeset_attach_node()
1609 struct device_node *np) in of_changeset_detach_node() argument
1611 return of_changeset_action(ocs, OF_RECONFIG_DETACH_NODE, np, NULL); in of_changeset_detach_node()
1615 struct device_node *np, struct property *prop) in of_changeset_add_property() argument
1617 return of_changeset_action(ocs, OF_RECONFIG_ADD_PROPERTY, np, prop); in of_changeset_add_property()
1621 struct device_node *np, struct property *prop) in of_changeset_remove_property() argument
1623 return of_changeset_action(ocs, OF_RECONFIG_REMOVE_PROPERTY, np, prop); in of_changeset_remove_property()
1627 struct device_node *np, struct property *prop) in of_changeset_update_property() argument
1629 return of_changeset_action(ocs, OF_RECONFIG_UPDATE_PROPERTY, np, prop); in of_changeset_update_property()
1636 struct device_node *np,
1639 struct device_node *np,
1643 struct device_node *np,
1647 struct device_node *np, in of_changeset_add_prop_u32() argument
1651 return of_changeset_add_prop_u32_array(ocs, np, prop_name, &val, 1); in of_changeset_add_prop_u32()
1654 int of_changeset_add_prop_bool(struct of_changeset *ocs, struct device_node *np,
1684 static inline bool of_device_is_system_power_controller(const struct device_node *np) in of_device_is_system_power_controller() argument
1686 return of_property_read_bool(np, "system-power-controller"); in of_device_is_system_power_controller()