Lines Matching full: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()
311 extern struct property *of_find_property(const struct device_node *np,
314 extern bool of_property_read_bool(const struct device_node *np, const char *propname);
315 extern int of_property_count_elems_of_size(const struct device_node *np,
317 extern int of_property_read_u32_index(const struct device_node *np,
320 extern int of_property_read_u64_index(const struct device_node *np,
323 extern int of_property_read_variable_u8_array(const struct device_node *np,
326 extern int of_property_read_variable_u16_array(const struct device_node *np,
329 extern int of_property_read_variable_u32_array(const struct device_node *np,
334 extern int of_property_read_u64(const struct device_node *np,
336 extern int of_property_read_variable_u64_array(const struct device_node *np,
342 extern int of_property_read_string(const struct device_node *np,
345 extern int of_property_match_string(const struct device_node *np,
348 extern int of_property_read_string_helper(const struct device_node *np,
362 extern int of_cpu_node_to_id(struct device_node *np);
368 extern int of_n_addr_cells(struct device_node *np);
369 extern int of_n_size_cells(struct device_node *np);
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,
401 extern int of_alias_get_id(const struct device_node *np, const char *stem);
419 extern int of_add_property(struct device_node *np, struct property *prop);
420 extern int of_remove_property(struct device_node *np, struct property *prop);
421 extern int of_update_property(struct device_node *np, struct property *newprop);
438 * of_property_for_each_u32(np, "propname", u)
447 * of_property_for_each_string(np, "propname", prop, s)
454 int of_map_id(const struct device_node *np, u32 id,
458 phys_addr_t of_dma_get_max_cpu_address(struct device_node *np);
481 static inline bool of_node_name_eq(const struct device_node *np, const char *name) in of_node_name_eq() argument
486 static inline bool of_node_name_prefix(const struct device_node *np, const char *prefix) in of_node_name_prefix() argument
491 static inline const char* of_node_full_name(const struct device_node *np) in of_node_full_name() argument
603 static inline struct property *of_find_property(const struct device_node *np, in of_find_property() argument
618 static inline bool of_property_read_bool(const struct device_node *np, in of_property_read_bool() argument
624 static inline int of_property_count_elems_of_size(const struct device_node *np, in of_property_count_elems_of_size() argument
630 static inline int of_property_read_u32_index(const struct device_node *np, in of_property_read_u32_index() argument
636 static inline int of_property_read_u64_index(const struct device_node *np, in of_property_read_u64_index() argument
660 static inline int of_cpu_node_to_id(struct device_node *np) in of_cpu_node_to_id() argument
676 static inline int of_n_addr_cells(struct device_node *np) in of_n_addr_cells() argument
681 static inline int of_n_size_cells(struct device_node *np) in of_n_size_cells() argument
686 static inline int of_property_read_variable_u8_array(const struct device_node *np, in of_property_read_variable_u8_array() argument
693 static inline int of_property_read_variable_u16_array(const struct device_node *np, in of_property_read_variable_u16_array() argument
700 static inline int of_property_read_variable_u32_array(const struct device_node *np, in of_property_read_variable_u32_array() argument
709 static inline int of_property_read_u64(const struct device_node *np, in of_property_read_u64() argument
715 static inline int of_property_read_variable_u64_array(const struct device_node *np, in of_property_read_variable_u64_array() argument
724 static inline int of_property_read_string(const struct device_node *np, in of_property_read_string() argument
731 static inline int of_property_match_string(const struct device_node *np, in of_property_match_string() argument
738 static inline int of_property_read_string_helper(const struct device_node *np, in of_property_read_string_helper() argument
745 static inline int __of_parse_phandle_with_args(const struct device_node *np, in __of_parse_phandle_with_args() argument
755 static inline int of_parse_phandle_with_args_map(const struct device_node *np, in of_parse_phandle_with_args_map() argument
764 static inline int of_count_phandle_with_args(const struct device_node *np, in of_count_phandle_with_args() argument
771 static inline ssize_t of_modalias(const struct device_node *np, char *str, in of_modalias() argument
777 static inline int of_request_module(const struct device_node *np) in of_request_module() argument
783 const struct device_node *np, in of_phandle_iterator_init() argument
803 static inline int of_alias_get_id(struct device_node *np, const char *stem) in of_alias_get_id() argument
818 static inline int of_add_property(struct device_node *np, struct property *prop) in of_add_property() argument
823 static inline int of_remove_property(struct device_node *np, struct property *prop) in of_remove_property() argument
883 static inline int of_map_id(const struct device_node *np, u32 id, in of_map_id() argument
890 static inline phys_addr_t of_dma_get_max_cpu_address(struct device_node *np) in of_dma_get_max_cpu_address() argument
921 extern int of_node_to_nid(struct device_node *np);
945 static inline const char *of_node_get_device_type(const struct device_node *np) in of_node_get_device_type() argument
947 return of_get_property(np, "device_type", NULL); in of_node_get_device_type()
950 static inline bool of_node_is_type(const struct device_node *np, const char *type) in of_node_is_type() argument
952 const char *match = of_node_get_device_type(np); in of_node_is_type()
954 return np && match && type && !strcmp(match, type); in of_node_is_type()
959 * @np: Pointer to device node holding phandle property
967 static inline struct device_node *of_parse_phandle(const struct device_node *np, in of_parse_phandle() argument
973 if (__of_parse_phandle_with_args(np, phandle_name, NULL, 0, in of_parse_phandle()
977 return args.np; in of_parse_phandle()
982 * @np: pointer to a device tree node containing a list
992 * Caller is responsible to call of_node_put() on the returned out_args->np
1012 static inline int of_parse_phandle_with_args(const struct device_node *np, in of_parse_phandle_with_args() argument
1024 return __of_parse_phandle_with_args(np, list_name, cells_name, in of_parse_phandle_with_args()
1030 * @np: pointer to a device tree node containing a list
1040 * Caller is responsible to call of_node_put() on the returned out_args->np
1058 static inline int of_parse_phandle_with_fixed_args(const struct device_node *np, in of_parse_phandle_with_fixed_args() argument
1064 return __of_parse_phandle_with_args(np, list_name, NULL, cell_count, in of_parse_phandle_with_fixed_args()
1070 * @np: pointer to a device tree node containing a list
1083 static inline int of_parse_phandle_with_optional_args(const struct device_node *np, in of_parse_phandle_with_optional_args() argument
1089 return __of_parse_phandle_with_args(np, list_name, cells_name, in of_parse_phandle_with_optional_args()
1104 return a1->np == a2->np && in of_phandle_args_equal()
1112 * @np: device node from which the property value is to be read.
1122 static inline int of_property_count_u8_elems(const struct device_node *np, in of_property_count_u8_elems() argument
1125 return of_property_count_elems_of_size(np, propname, sizeof(u8)); in of_property_count_u8_elems()
1131 * @np: device node from which the property value is to be read.
1141 static inline int of_property_count_u16_elems(const struct device_node *np, in of_property_count_u16_elems() argument
1144 return of_property_count_elems_of_size(np, propname, sizeof(u16)); in of_property_count_u16_elems()
1150 * @np: device node from which the property value is to be read.
1160 static inline int of_property_count_u32_elems(const struct device_node *np, in of_property_count_u32_elems() argument
1163 return of_property_count_elems_of_size(np, propname, sizeof(u32)); in of_property_count_u32_elems()
1169 * @np: device node from which the property value is to be read.
1179 static inline int of_property_count_u64_elems(const struct device_node *np, in of_property_count_u64_elems() argument
1182 return of_property_count_elems_of_size(np, propname, sizeof(u64)); in of_property_count_u64_elems()
1188 * @np: device node from which the property value is to be read.
1198 static inline int of_property_read_string_array(const struct device_node *np, in of_property_read_string_array() argument
1202 return of_property_read_string_helper(np, propname, out_strs, sz, 0); in of_property_read_string_array()
1208 * @np: device node from which the property value is to be read.
1218 static inline int of_property_count_strings(const struct device_node *np, in of_property_count_strings() argument
1221 return of_property_read_string_helper(np, propname, NULL, 0, 0); in of_property_count_strings()
1227 * @np: device node from which the property value is to be read.
1243 static inline int of_property_read_string_index(const struct device_node *np, in of_property_read_string_index() argument
1247 int rc = of_property_read_string_helper(np, propname, output, 1, index); in of_property_read_string_index()
1253 * @np: device node to search for the property.
1260 static inline bool of_property_present(const struct device_node *np, const char *propname) in of_property_present() argument
1262 struct property *prop = of_find_property(np, propname, NULL); in of_property_present()
1270 * @np: device node from which the property value is to be read.
1287 static inline int of_property_read_u8_array(const struct device_node *np, in of_property_read_u8_array() argument
1291 int ret = of_property_read_variable_u8_array(np, propname, out_values, in of_property_read_u8_array()
1302 * @np: device node from which the property value is to be read.
1319 static inline int of_property_read_u16_array(const struct device_node *np, in of_property_read_u16_array() argument
1323 int ret = of_property_read_variable_u16_array(np, propname, out_values, in of_property_read_u16_array()
1335 * @np: device node from which the property value is to be read.
1349 static inline int of_property_read_u32_array(const struct device_node *np, in of_property_read_u32_array() argument
1353 int ret = of_property_read_variable_u32_array(np, propname, out_values, in of_property_read_u32_array()
1365 * @np: device node from which the property value is to be read.
1379 static inline int of_property_read_u64_array(const struct device_node *np, in of_property_read_u64_array() argument
1383 int ret = of_property_read_variable_u64_array(np, propname, out_values, in of_property_read_u64_array()
1391 static inline int of_property_read_u8(const struct device_node *np, in of_property_read_u8() argument
1395 return of_property_read_u8_array(np, propname, out_value, 1); in of_property_read_u8()
1398 static inline int of_property_read_u16(const struct device_node *np, in of_property_read_u16() argument
1402 return of_property_read_u16_array(np, propname, out_value, 1); in of_property_read_u16()
1405 static inline int of_property_read_u32(const struct device_node *np, in of_property_read_u32() argument
1409 return of_property_read_u32_array(np, propname, out_value, 1); in of_property_read_u32()
1412 static inline int of_property_read_s32(const struct device_node *np, in of_property_read_s32() argument
1416 return of_property_read_u32(np, propname, (u32*) out_value); in of_property_read_s32()
1419 #define of_for_each_phandle(it, err, np, ln, cn, cc) \ argument
1420 for (of_phandle_iterator_init((it), (np), (ln), (cn), (cc)), \
1425 #define of_property_for_each_u32(np, propname, u) \ argument
1427 {of_find_property(np, propname, NULL), \
1432 #define of_property_for_each_string(np, propname, prop, s) \ argument
1433 for (prop = of_find_property(np, propname, NULL), \
1491 static inline int of_get_child_count(const struct device_node *np) in of_get_child_count() argument
1496 for_each_child_of_node(np, child) in of_get_child_count()
1502 static inline int of_get_available_child_count(const struct device_node *np) in of_get_available_child_count() argument
1507 for_each_available_child_of_node(np, child) in of_get_available_child_count()
1547 * @np: pointer to the device node affected
1559 struct device_node *np; member
1598 unsigned long action, struct device_node *np,
1602 struct device_node *np) in of_changeset_attach_node() argument
1604 return of_changeset_action(ocs, OF_RECONFIG_ATTACH_NODE, np, NULL); in of_changeset_attach_node()
1608 struct device_node *np) in of_changeset_detach_node() argument
1610 return of_changeset_action(ocs, OF_RECONFIG_DETACH_NODE, np, NULL); in of_changeset_detach_node()
1614 struct device_node *np, struct property *prop) in of_changeset_add_property() argument
1616 return of_changeset_action(ocs, OF_RECONFIG_ADD_PROPERTY, np, prop); in of_changeset_add_property()
1620 struct device_node *np, struct property *prop) in of_changeset_remove_property() argument
1622 return of_changeset_action(ocs, OF_RECONFIG_REMOVE_PROPERTY, np, prop); in of_changeset_remove_property()
1626 struct device_node *np, struct property *prop) in of_changeset_update_property() argument
1628 return of_changeset_action(ocs, OF_RECONFIG_UPDATE_PROPERTY, np, prop); in of_changeset_update_property()
1635 struct device_node *np,
1638 struct device_node *np,
1642 struct device_node *np,
1646 struct device_node *np, in of_changeset_add_prop_u32() argument
1650 return of_changeset_add_prop_u32_array(ocs, np, prop_name, &val, 1); in of_changeset_add_prop_u32()
1654 struct device_node *np,
1657 int of_changeset_add_prop_bool(struct of_changeset *ocs, struct device_node *np,
1683 * @np: Pointer to the given device_node
1687 static inline bool of_device_is_system_power_controller(const struct device_node *np) in of_device_is_system_power_controller() argument
1689 return of_property_read_bool(np, "system-power-controller"); in of_device_is_system_power_controller()