return pd_to_genpd(dev->pm_domain);
}
-static int genpd_stop_dev(struct generic_pm_domain *genpd, struct device *dev)
+static int genpd_stop_dev(struct generic_pm_domain *genpd, struct device *dev,
+ bool timed)
{
+ if (!timed)
+ return GENPD_DEV_CALLBACK(genpd, int, stop, dev);
+
return GENPD_DEV_TIMED_CALLBACK(genpd, int, stop, dev,
stop_latency_ns, "stop");
}
if (ret)
return ret;
- ret = genpd_stop_dev(genpd, dev);
+ ret = genpd_stop_dev(genpd, dev, true);
if (ret) {
genpd_restore_dev(genpd, dev, true);
return ret;
|| (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev)))
return 0;
- genpd_stop_dev(genpd, dev);
+ genpd_stop_dev(genpd, dev, false);
/*
* Since all of the "noirq" callbacks are executed sequentially, it is
pm_genpd_sync_poweron(genpd, true);
genpd->suspended_count--;
- return genpd_start_dev(genpd, dev, true);
+ return genpd_start_dev(genpd, dev, false);
}
/**
if (IS_ERR(genpd))
return -EINVAL;
- return genpd->suspend_power_off ? 0 : genpd_stop_dev(genpd, dev);
+ return genpd->suspend_power_off ? 0 : genpd_stop_dev(genpd, dev, false);
}
/**
if (IS_ERR(genpd))
return -EINVAL;
- return genpd->suspend_power_off ? 0 : genpd_start_dev(genpd, dev, true);
+ return genpd->suspend_power_off ?
+ 0 : genpd_start_dev(genpd, dev, false);
}
/**
pm_genpd_sync_poweron(genpd, true);
- return genpd_start_dev(genpd, dev, true);
+ return genpd_start_dev(genpd, dev, false);
}
/**