Lines Matching defs: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,
426 ret = dtpm_register(hierarchy->name, dtpm, parent);
429 hierarchy->name, ret);
437 static struct dtpm *dtpm_setup_dt(const struct dtpm_node *hierarchy,
443 np = of_find_node_by_path(hierarchy->name);
445 pr_err("Failed to find '%s'\n", hierarchy->name);
478 static int dtpm_for_each_child(const struct dtpm_node *hierarchy,
484 for (i = 0; hierarchy[i].name; i++) {
486 if (hierarchy[i].parent != it)
489 dtpm = dtpm_node_callback[hierarchy[i].type](&hierarchy[i], parent);
504 * hierarchy creation, we can assume the underlying
510 pr_warn("Failed to create '%s' in the hierarchy\n",
511 hierarchy[i].name);
515 ret = dtpm_for_each_child(hierarchy, &hierarchy[i], dtpm);
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;
582 hierarchy = match->data;
583 if (!hierarchy) {
588 ret = dtpm_for_each_child(hierarchy, NULL, NULL);