From: tip-bot for Daniel Drake <dsd@laptop.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
dsd@laptop.org, dilinger@queued.net, tglx@linutronix.de,
hpa@linux.intel.com
Subject: [tip:x86/olpc] x86, olpc: Rename olpc-xo1 to olpc-xo1-pm
Date: Thu, 7 Jul 2011 00:47:51 GMT [thread overview]
Message-ID: <tip-a3128588b3c6be634a9013a375903e0b55668f0a@git.kernel.org> (raw)
In-Reply-To: <1309019658-1712-4-git-send-email-dsd@laptop.org>
Commit-ID: a3128588b3c6be634a9013a375903e0b55668f0a
Gitweb: http://git.kernel.org/tip/a3128588b3c6be634a9013a375903e0b55668f0a
Author: Daniel Drake <dsd@laptop.org>
AuthorDate: Sat, 25 Jun 2011 17:34:10 +0100
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Wed, 6 Jul 2011 14:44:28 -0700
x86, olpc: Rename olpc-xo1 to olpc-xo1-pm
Based on earlier review comments, we'll no longer try to stick all of
our XO-1 goodies in a single driver. We'll split it into a power management
driver, and an EC/SCI driver.
As a first step, rename olpc-xo1 to olpc-xo1-pm, and make it builtin
instead of modular.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Link: http://lkml.kernel.org/r/1309019658-1712-4-git-send-email-dsd@laptop.org
Acked-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/Kconfig | 7 ++-
arch/x86/platform/olpc/Makefile | 2 +-
.../platform/olpc/{olpc-xo1.c => olpc-xo1-pm.c} | 43 +++++++-------------
3 files changed, 20 insertions(+), 32 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index da34972..29615ee 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2073,11 +2073,12 @@ config OLPC
Add support for detecting the unique features of the OLPC
XO hardware.
-config OLPC_XO1
- tristate "OLPC XO-1 support"
+config OLPC_XO1_PM
+ bool "OLPC XO-1 Power Management"
depends on OLPC && MFD_CS5535
+ select MFD_CORE
---help---
- Add support for non-essential features of the OLPC XO-1 laptop.
+ Add support for poweroff of the OLPC XO-1 laptop.
endif # X86_32
diff --git a/arch/x86/platform/olpc/Makefile b/arch/x86/platform/olpc/Makefile
index 81c5e21..cd25038 100644
--- a/arch/x86/platform/olpc/Makefile
+++ b/arch/x86/platform/olpc/Makefile
@@ -1,2 +1,2 @@
obj-$(CONFIG_OLPC) += olpc.o olpc_ofw.o olpc_dt.o
-obj-$(CONFIG_OLPC_XO1) += olpc-xo1.o
+obj-$(CONFIG_OLPC_XO1_PM) += olpc-xo1-pm.o
diff --git a/arch/x86/platform/olpc/olpc-xo1.c b/arch/x86/platform/olpc/olpc-xo1-pm.c
similarity index 70%
rename from arch/x86/platform/olpc/olpc-xo1.c
rename to arch/x86/platform/olpc/olpc-xo1-pm.c
index a63e948..a2a59d3 100644
--- a/arch/x86/platform/olpc/olpc-xo1.c
+++ b/arch/x86/platform/olpc/olpc-xo1-pm.c
@@ -1,5 +1,5 @@
/*
- * Support for features of the OLPC XO-1 laptop
+ * Support for power management features of the OLPC XO-1 laptop
*
* Copyright (C) 2010 Andres Salomon <dilinger@queued.net>
* Copyright (C) 2010 One Laptop per Child
@@ -13,7 +13,6 @@
*/
#include <linux/cs5535.h>
-#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/mfd/core.h>
@@ -21,7 +20,7 @@
#include <asm/io.h>
#include <asm/olpc.h>
-#define DRV_NAME "olpc-xo1"
+#define DRV_NAME "olpc-xo1-pm"
static unsigned long acpi_base;
static unsigned long pms_base;
@@ -44,7 +43,7 @@ static void xo1_power_off(void)
outl(0x00002000, acpi_base + CS5536_PM1_CNT);
}
-static int __devinit olpc_xo1_probe(struct platform_device *pdev)
+static int __devinit xo1_pm_probe(struct platform_device *pdev)
{
struct resource *res;
int err;
@@ -76,7 +75,7 @@ static int __devinit olpc_xo1_probe(struct platform_device *pdev)
return 0;
}
-static int __devexit olpc_xo1_remove(struct platform_device *pdev)
+static int __devexit xo1_pm_remove(struct platform_device *pdev)
{
mfd_cell_disable(pdev);
@@ -89,48 +88,36 @@ static int __devexit olpc_xo1_remove(struct platform_device *pdev)
return 0;
}
-static struct platform_driver cs5535_pms_drv = {
+static struct platform_driver cs5535_pms_driver = {
.driver = {
.name = "cs5535-pms",
.owner = THIS_MODULE,
},
- .probe = olpc_xo1_probe,
- .remove = __devexit_p(olpc_xo1_remove),
+ .probe = xo1_pm_probe,
+ .remove = __devexit_p(xo1_pm_remove),
};
-static struct platform_driver cs5535_acpi_drv = {
+static struct platform_driver cs5535_acpi_driver = {
.driver = {
.name = "olpc-xo1-pm-acpi",
.owner = THIS_MODULE,
},
- .probe = olpc_xo1_probe,
- .remove = __devexit_p(olpc_xo1_remove),
+ .probe = xo1_pm_probe,
+ .remove = __devexit_p(xo1_pm_remove),
};
-static int __init olpc_xo1_init(void)
+static int __init xo1_pm_init(void)
{
int r;
- r = platform_driver_register(&cs5535_pms_drv);
+ r = platform_driver_register(&cs5535_pms_driver);
if (r)
return r;
- r = platform_driver_register(&cs5535_acpi_drv);
+ r = platform_driver_register(&cs5535_acpi_driver);
if (r)
- platform_driver_unregister(&cs5535_pms_drv);
+ platform_driver_unregister(&cs5535_pms_driver);
return r;
}
-
-static void __exit olpc_xo1_exit(void)
-{
- platform_driver_unregister(&cs5535_acpi_drv);
- platform_driver_unregister(&cs5535_pms_drv);
-}
-
-MODULE_AUTHOR("Daniel Drake <dsd@laptop.org>");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:cs5535-pms");
-
-module_init(olpc_xo1_init);
-module_exit(olpc_xo1_exit);
+arch_initcall(xo1_pm_init);
next prev parent reply other threads:[~2011-07-07 0:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-25 16:34 [PATCH v3 00/11] OLPC Power Management Daniel Drake
2011-06-25 16:34 ` [PATCH v3 01/11] x86, olpc: add missing elements to device tree Daniel Drake
2011-07-07 0:46 ` [tip:x86/olpc] x86, olpc: Add " tip-bot for Daniel Drake
2011-06-25 16:34 ` [PATCH v3 02/11] x86, olpc: Move CS5536-related constants to cs5535.h Daniel Drake
2011-07-07 0:47 ` [tip:x86/olpc] " tip-bot for Daniel Drake
2011-06-25 16:34 ` [PATCH v3 03/11] x86, olpc: rename olpc-xo1 to olpc-xo1-pm Daniel Drake
2011-07-07 0:47 ` tip-bot for Daniel Drake [this message]
2011-06-25 16:34 ` [PATCH v3 04/11] x86, olpc: Add XO-1 suspend/resume support Daniel Drake
2011-07-07 0:48 ` [tip:x86/olpc] " tip-bot for Daniel Drake
2011-06-25 16:34 ` [PATCH v3 05/11] x86, olpc: Add XO-1 SCI driver and power button control Daniel Drake
2011-07-07 0:48 ` [tip:x86/olpc] " tip-bot for Daniel Drake
2011-06-25 16:34 ` [PATCH v3 06/11] x86, olpc: EC SCI wakeup mask functionality Daniel Drake
2011-07-07 0:49 ` [tip:x86/olpc] " tip-bot for Daniel Drake
2011-06-25 16:34 ` [PATCH v3 07/11] x86, olpc-xo1-sci: Add GPE handler and ebook switch functionality Daniel Drake
2011-07-07 0:49 ` [tip:x86/olpc] " tip-bot for Daniel Drake
2011-06-25 16:34 ` [PATCH v3 08/11] x86, olpc-xo1-sci: Add lid " Daniel Drake
2011-07-07 0:50 ` [tip:x86/olpc] " tip-bot for Daniel Drake
2011-06-25 16:34 ` [PATCH v3 09/11] x86, olpc-xo1-sci: Propagate power supply/battery events Daniel Drake
2011-07-07 0:50 ` [tip:x86/olpc] " tip-bot for Daniel Drake
2011-06-25 16:34 ` [PATCH v3 10/11] x86, olpc: Add XO-1 RTC driver Daniel Drake
2011-07-07 0:51 ` [tip:x86/olpc] " tip-bot for Daniel Drake
2011-06-25 16:34 ` [PATCH v3 11/11] x86, olpc: Add XO-1.5 SCI driver Daniel Drake
2011-07-07 0:51 ` [tip:x86/olpc] " tip-bot for Daniel Drake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-a3128588b3c6be634a9013a375903e0b55668f0a@git.kernel.org \
--to=dsd@laptop.org \
--cc=dilinger@queued.net \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome