Lines Matching +full:child +full:- +full:node
1 // SPDX-License-Identifier: GPL-2.0-only
12 #define pr_fmt(fmt) "dt-idle-genpd: " fmt
38 ret = -ENOMEM; in pd_parse_state_nodes()
48 i--; in pd_parse_state_nodes()
49 for (; i >= 0; i--) in pd_parse_state_nodes()
86 pd_free_states(pd->states, pd->state_count); in dt_idle_pd_free()
87 kfree(pd->name); in dt_idle_pd_free()
102 pd->name = kasprintf(GFP_KERNEL, "%pOF", np); in dt_idle_pd_alloc()
103 if (!pd->name) in dt_idle_pd_alloc()
108 * for those being compatible with "domain-idle-state". in dt_idle_pd_alloc()
114 pd->free_states = pd_free_states; in dt_idle_pd_alloc()
115 pd->name = kbasename(pd->name); in dt_idle_pd_alloc()
116 pd->states = states; in dt_idle_pd_alloc()
117 pd->state_count = state_count; in dt_idle_pd_alloc()
119 pr_debug("alloc PM domain %s\n", pd->name); in dt_idle_pd_alloc()
123 kfree(pd->name); in dt_idle_pd_alloc()
133 struct device_node *node; in dt_idle_pd_init_topology() local
134 struct of_phandle_args child, parent; in dt_idle_pd_init_topology() local
137 for_each_child_of_node(np, node) { in dt_idle_pd_init_topology()
138 if (of_parse_phandle_with_args(node, "power-domains", in dt_idle_pd_init_topology()
139 "#power-domain-cells", 0, &parent)) in dt_idle_pd_init_topology()
142 child.np = node; in dt_idle_pd_init_topology()
143 child.args_count = 0; in dt_idle_pd_init_topology()
144 ret = of_genpd_add_subdomain(&parent, &child); in dt_idle_pd_init_topology()
147 of_node_put(node); in dt_idle_pd_init_topology()
157 struct device_node *node; in dt_idle_pd_remove_topology() local
158 struct of_phandle_args child, parent; in dt_idle_pd_remove_topology() local
161 for_each_child_of_node(np, node) { in dt_idle_pd_remove_topology()
162 if (of_parse_phandle_with_args(node, "power-domains", in dt_idle_pd_remove_topology()
163 "#power-domain-cells", 0, &parent)) in dt_idle_pd_remove_topology()
166 child.np = node; in dt_idle_pd_remove_topology()
167 child.args_count = 0; in dt_idle_pd_remove_topology()
168 ret = of_genpd_remove_subdomain(&parent, &child); in dt_idle_pd_remove_topology()
171 of_node_put(node); in dt_idle_pd_remove_topology()