Lines Matching defs:genpd
123 static void update_domain_next_wakeup(struct generic_pm_domain *genpd, ktime_t now)
130 if (!(genpd->flags & GENPD_FLAG_MIN_RESIDENCY))
141 list_for_each_entry(pdd, &genpd->dev_list, list_node) {
148 list_for_each_entry(link, &genpd->parent_links, parent_node) {
157 genpd->gd->next_wakeup = domain_wakeup;
160 static bool next_wakeup_allows_state(struct generic_pm_domain *genpd,
163 ktime_t domain_wakeup = genpd->gd->next_wakeup;
166 min_sleep_ns = genpd->states[state].power_off_latency_ns +
167 genpd->states[state].residency_ns;
177 struct generic_pm_domain *genpd = pd_to_genpd(pd);
183 off_on_time_ns = genpd->states[state].power_off_latency_ns +
184 genpd->states[state].power_on_latency_ns;
192 list_for_each_entry(link, &genpd->parent_links, parent_node) {
215 list_for_each_entry(pdd, &genpd->dev_list, list_node) {
253 genpd->gd->max_off_time_ns = min_off_time_ns -
254 genpd->states[state].power_on_latency_ns;
267 struct generic_pm_domain *genpd = pd_to_genpd(pd);
268 struct genpd_governor_data *gd = genpd->gd;
269 int state_idx = genpd->state_count - 1;
278 update_domain_next_wakeup(genpd, now);
279 if ((genpd->flags & GENPD_FLAG_MIN_RESIDENCY) && (gd->next_wakeup != KTIME_MAX)) {
282 if (next_wakeup_allows_state(genpd, state_idx, now)) {
297 genpd->state_idx = gd->cached_power_down_state_idx;
307 list_for_each_entry(link, &genpd->child_links, child_node) {
331 genpd->state_idx = state_idx;
332 gd->cached_power_down_state_idx = genpd->state_idx;
344 struct generic_pm_domain *genpd = pd_to_genpd(pd);
355 if (!(genpd->flags & GENPD_FLAG_CPU_DOMAIN))
360 * and its subdomains. Note, we only need the genpd->cpus, as it already
364 for_each_cpu_and(cpu, genpd->cpus, cpu_online_mask) {
379 genpd->gd->next_hrtimer = domain_wakeup;
386 i = genpd->state_idx;
388 if (idle_duration_ns >= (genpd->states[i].residency_ns +
389 genpd->states[i].power_off_latency_ns)) {
390 genpd->state_idx = i;