Merge remote-tracking branch 'lsk/v3.10/topic/configs' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / include / linux / pm_wakeup.h
index d9f05113e5fb85204df5f45ee28d17e4596f31ee..569781faa5042a7930e082a74985bceac6f89786 100644 (file)
  *
  * @total_time: Total time this wakeup source has been active.
  * @max_time: Maximum time this wakeup source has been continuously active.
- * @last_time: Monotonic clock when the wakeup source's was activated last time.
+ * @last_time: Monotonic clock when the wakeup source's was touched last time.
+ * @prevent_sleep_time: Total time this source has been preventing autosleep.
  * @event_count: Number of signaled wakeup events.
  * @active_count: Number of times the wakeup sorce was activated.
  * @relax_count: Number of times the wakeup sorce was deactivated.
- * @hit_count: Number of times the wakeup sorce might abort system suspend.
+ * @expire_count: Number of times the wakeup source's timeout has expired.
+ * @wakeup_count: Number of times the wakeup source might abort suspend.
  * @active: Status of the wakeup source.
+ * @has_timeout: The wakeup source has been activated with a timeout.
  */
 struct wakeup_source {
        const char              *name;
@@ -49,11 +52,15 @@ struct wakeup_source {
        ktime_t total_time;
        ktime_t max_time;
        ktime_t last_time;
+       ktime_t start_prevent_time;
+       ktime_t prevent_sleep_time;
        unsigned long           event_count;
        unsigned long           active_count;
        unsigned long           relax_count;
-       unsigned long           hit_count;
-       unsigned int            active:1;
+       unsigned long           expire_count;
+       unsigned long           wakeup_count;
+       bool                    active:1;
+       bool                    autosleep_enabled:1;
 };
 
 #ifdef CONFIG_PM_SLEEP