Lines Matching defs:states
245 genpd->states[genpd->state_idx].idle_time += delta;
562 timed = timed && genpd->gd && !genpd->states[state_idx].fwnode;
577 if (elapsed_ns <= genpd->states[state_idx].power_on_latency_ns)
580 genpd->states[state_idx].power_on_latency_ns = elapsed_ns;
613 timed = timed && genpd->gd && !genpd->states[state_idx].fwnode;
628 if (elapsed_ns <= genpd->states[state_idx].power_off_latency_ns)
631 genpd->states[state_idx].power_off_latency_ns = elapsed_ns;
696 * The children must be in their deepest (powered-off) states to allow
735 genpd->states[genpd->state_idx].rejected++;
741 genpd->states[genpd->state_idx].usage++;
1962 static void genpd_free_default_power_state(struct genpd_power_state *states,
1965 kfree(states);
1976 genpd->states = state;
2005 /* Use only one "off" state if there were no states declared */
2027 genpd->free_states(genpd->states, genpd->state_count);
2099 /* Multiple states but no governor doesn't make sense. */
2101 pr_warn("%s: no governor for states\n", genpd->name);
2955 struct genpd_power_state *states)
2962 ret = of_count_phandle_with_args(dn, "domain-idle-states", NULL);
2967 of_for_each_phandle(&it, ret, dn, "domain-idle-states", NULL, 0) {
2975 if (states) {
2976 ret = genpd_parse_state(&states[i], np);
2991 * of_genpd_parse_idle_states: Return array of idle states for the genpd.
2994 * @states: The pointer to which the state array will be saved.
2997 * Returns the device states parsed from the OF node. The memory for the states
2999 * free the memory after use. If any or zero compatible domain idle states is
3003 struct genpd_power_state **states, int *n)
3013 *states = NULL;
3028 *states = st;
3254 idle_time += genpd->states[i].idle_time;
3266 genpd->states[i].usage, genpd->states[i].rejected);
3309 total += genpd->states[i].idle_time;