|
@@ -553,6 +553,30 @@ power_attr(pm_trace_dev_match);
|
|
|
|
|
|
#endif /* CONFIG_PM_TRACE */
|
|
|
|
|
|
+#ifdef CONFIG_FREEZER
|
|
|
+static ssize_t pm_freeze_timeout_show(struct kobject *kobj,
|
|
|
+ struct kobj_attribute *attr, char *buf)
|
|
|
+{
|
|
|
+ return sprintf(buf, "%u\n", freeze_timeout_msecs);
|
|
|
+}
|
|
|
+
|
|
|
+static ssize_t pm_freeze_timeout_store(struct kobject *kobj,
|
|
|
+ struct kobj_attribute *attr,
|
|
|
+ const char *buf, size_t n)
|
|
|
+{
|
|
|
+ unsigned long val;
|
|
|
+
|
|
|
+ if (kstrtoul(buf, 10, &val))
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
+ freeze_timeout_msecs = val;
|
|
|
+ return n;
|
|
|
+}
|
|
|
+
|
|
|
+power_attr(pm_freeze_timeout);
|
|
|
+
|
|
|
+#endif /* CONFIG_FREEZER*/
|
|
|
+
|
|
|
static struct attribute * g[] = {
|
|
|
&state_attr.attr,
|
|
|
#ifdef CONFIG_PM_TRACE
|
|
@@ -575,6 +599,9 @@ static struct attribute * g[] = {
|
|
|
#ifdef CONFIG_PM_SLEEP_DEBUG
|
|
|
&pm_print_times_attr.attr,
|
|
|
#endif
|
|
|
+#endif
|
|
|
+#ifdef CONFIG_FREEZER
|
|
|
+ &pm_freeze_timeout_attr.attr,
|
|
|
#endif
|
|
|
NULL,
|
|
|
};
|