Lines Matching +full:domain +full:- +full:idle +full:- +full:state

1 // SPDX-License-Identifier: GPL-2.0-only
12 #define pr_fmt(fmt) "dt-idle-genpd: " fmt
29 u32 state, *state_buf; in pd_parse_state_nodes() local
32 ret = parse_state(to_of_node(states[i].fwnode), &state); in pd_parse_state_nodes()
38 ret = -ENOMEM; in pd_parse_state_nodes()
41 *state_buf = state; in pd_parse_state_nodes()
48 i--; in pd_parse_state_nodes()
49 for (; i >= 0; i--) in pd_parse_state_nodes()
61 /* Parse the domain idle states. */ in pd_parse_states()
66 /* Fill out the dt specifics for each found state. */ in pd_parse_states()
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()
107 * Parse the domain idle states and let genpd manage the state selection 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()
127 pr_err("failed to alloc PM domain %pOF\n", np); in dt_idle_pd_alloc()
137 if (of_parse_phandle_with_args(node, "power-domains", in dt_idle_pd_init_topology()
138 "#power-domain-cells", 0, &parent)) in dt_idle_pd_init_topology()
158 if (of_parse_phandle_with_args(node, "power-domains", in dt_idle_pd_remove_topology()
159 "#power-domain-cells", 0, &parent)) in dt_idle_pd_remove_topology()