[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <11592491482560-git-send-email-greg@kroah.com>
Date: Mon, 25 Sep 2006 22:37:40 -0700
From: Greg KH <greg@...ah.com>
To: linux-kernel@...r.kernel.org
Cc: David Brownell <david-b@...bell.net>,
David Brownell <dbrownell@...rs.sourceforge.net>,
Greg Kroah-Hartman <gregkh@...e.de>
Subject: [PATCH 20/47] PM: add kconfig option for deprecated .../power/state files
From: David Brownell <david-b@...bell.net>
Add a new PM_SYSFS_DEPRECATED config option to control whether or
not the /sys/devices/.../power/state files are provided. This will
make it easier to get rid of that mechanism when the time comes,
and to verify that userspace tools work right without it.
Signed-off-by: David Brownell <dbrownell@...rs.sourceforge.net>
Acked-by: Pavel Machek <pavel@...e.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
drivers/base/power/sysfs.c | 6 ++++++
kernel/power/Kconfig | 11 +++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c
index e55b3c2..2d47517 100644
--- a/drivers/base/power/sysfs.c
+++ b/drivers/base/power/sysfs.c
@@ -7,6 +7,8 @@ #include <linux/string.h>
#include "power.h"
+#ifdef CONFIG_PM_SYSFS_DEPRECATED
+
/**
* state - Control current power state of device
*
@@ -66,6 +68,8 @@ static ssize_t state_store(struct device
static DEVICE_ATTR(state, 0644, state_show, state_store);
+#endif /* CONFIG_PM_SYSFS_DEPRECATED */
+
/*
* wakeup - Report/change current wakeup option for device
*
@@ -139,7 +143,9 @@ static DEVICE_ATTR(wakeup, 0644, wake_sh
static struct attribute * power_attrs[] = {
+#ifdef CONFIG_PM_SYSFS_DEPRECATED
&dev_attr_state.attr,
+#endif
&dev_attr_wakeup.attr,
NULL,
};
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 619ecab..1ed9720 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -53,6 +53,17 @@ config PM_TRACE
CAUTION: this option will cause your machine's real-time clock to be
set to an invalid time after a resume.
+config PM_SYSFS_DEPRECATED
+ bool "Driver model /sys/devices/.../power/state files (DEPRECATED)"
+ depends on PM && SYSFS
+ default n
+ help
+ The driver model started out with a sysfs file intended to provide
+ a userspace hook for device power management. This feature has never
+ worked very well, except for limited testing purposes, and so it will
+ be removed. It's not clear that a generic mechanism could really
+ handle the wide variability of device power states; any replacements
+ are likely to be bus or driver specific.
config SOFTWARE_SUSPEND
bool "Software Suspend"
--
1.4.2.1
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists