Lines Matching full:hierarchy
330 * dtpm_unregister - Unregister a dtpm node from the hierarchy tree
344 * dtpm_register - Register a dtpm node in the hierarchy tree
350 * is the root node of the hierarchy. If the root node already exists,
415 static struct dtpm *dtpm_setup_virtual(const struct dtpm_node *hierarchy, in dtpm_setup_virtual() argument
426 ret = dtpm_register(hierarchy->name, dtpm, parent); in dtpm_setup_virtual()
429 hierarchy->name, ret); in dtpm_setup_virtual()
437 static struct dtpm *dtpm_setup_dt(const struct dtpm_node *hierarchy, in dtpm_setup_dt() argument
443 np = of_find_node_by_path(hierarchy->name); in dtpm_setup_dt()
445 pr_err("Failed to find '%s'\n", hierarchy->name); in dtpm_setup_dt()
478 static int dtpm_for_each_child(const struct dtpm_node *hierarchy, in dtpm_for_each_child() argument
484 for (i = 0; hierarchy[i].name; i++) { in dtpm_for_each_child()
486 if (hierarchy[i].parent != it) in dtpm_for_each_child()
489 dtpm = dtpm_node_callback[hierarchy[i].type](&hierarchy[i], parent); in dtpm_for_each_child()
504 * hierarchy creation, we can assume the underlying in dtpm_for_each_child()
510 pr_warn("Failed to create '%s' in the hierarchy\n", in dtpm_for_each_child()
511 hierarchy[i].name); in dtpm_for_each_child()
515 ret = dtpm_for_each_child(hierarchy, &hierarchy[i], dtpm); in dtpm_for_each_child()
524 * dtpm_create_hierarchy - Create the dtpm hierarchy
528 * description of the different node in the hierarchy. It creates the
533 * struct dtpm_node hierarchy[] = {
535 * [1] { .name = "package", .type = DTPM_NODE_VIRTUAL, .parent = &hierarchy[0] },
536 * [2] { .name = "/cpus/cpu0", .type = DTPM_NODE_DT, .parent = &hierarchy[1] },
537 * [3] { .name = "/cpus/cpu1", .type = DTPM_NODE_DT, .parent = &hierarchy[1] },
538 * [4] { .name = "/cpus/cpu2", .type = DTPM_NODE_DT, .parent = &hierarchy[1] },
539 * [5] { .name = "/cpus/cpu3", .type = DTPM_NODE_DT, .parent = &hierarchy[1] },
552 const struct dtpm_node *hierarchy; in dtpm_create_hierarchy() local
582 hierarchy = match->data; in dtpm_create_hierarchy()
583 if (!hierarchy) { in dtpm_create_hierarchy()
588 ret = dtpm_for_each_child(hierarchy, NULL, NULL); in dtpm_create_hierarchy()