diff options
author | Andres Salomon <dilinger@queued.net> | 2012-07-10 22:31:51 -0400 |
---|---|---|
committer | Andres Salomon <dilinger@queued.net> | 2012-07-31 23:27:29 -0400 |
commit | 392a325c4351339cfbf182bb5a1444df1cf65dbb (patch) | |
tree | 90fc86d937d133f965e4f2129dede4ad6558f114 /drivers/platform | |
parent | 08843b79fb35d33859e0f8f11a7318341076e4d1 (diff) |
Platform: OLPC: add a stub to drivers/platform/ for the OLPC EC driver
The OLPC EC driver has outgrown arch/x86/platform/. It's time to both
share common code amongst different architectures, as well as move it out
of arch/x86/. The XO-1.75 is ARM-based, and the EC driver shares a lot of
code with the x86 code.
Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Paul Fox <pgf@laptop.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/Makefile | 1 | ||||
-rw-r--r-- | drivers/platform/olpc/Makefile | 4 | ||||
-rw-r--r-- | drivers/platform/olpc/olpc-ec.c | 16 |
3 files changed, 21 insertions, 0 deletions
diff --git a/drivers/platform/Makefile b/drivers/platform/Makefile index 782953ae4c03..b17c16ce54ad 100644 --- a/drivers/platform/Makefile +++ b/drivers/platform/Makefile | |||
@@ -3,3 +3,4 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_X86) += x86/ | 5 | obj-$(CONFIG_X86) += x86/ |
6 | obj-$(CONFIG_OLPC) += olpc/ | ||
diff --git a/drivers/platform/olpc/Makefile b/drivers/platform/olpc/Makefile new file mode 100644 index 000000000000..dc8b26bc7209 --- /dev/null +++ b/drivers/platform/olpc/Makefile | |||
@@ -0,0 +1,4 @@ | |||
1 | # | ||
2 | # OLPC XO platform-specific drivers | ||
3 | # | ||
4 | obj-$(CONFIG_OLPC) += olpc-ec.o | ||
diff --git a/drivers/platform/olpc/olpc-ec.c b/drivers/platform/olpc/olpc-ec.c new file mode 100644 index 000000000000..42026036cd3e --- /dev/null +++ b/drivers/platform/olpc/olpc-ec.c | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Generic driver for the OLPC Embedded Controller. | ||
3 | * | ||
4 | * Copyright (C) 2011-2012 One Laptop per Child Foundation. | ||
5 | * | ||
6 | * Licensed under the GPL v2 or later. | ||
7 | */ | ||
8 | #include <linux/module.h> | ||
9 | #include <asm/olpc.h> | ||
10 | |||
11 | int olpc_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *outbuf, size_t outlen) | ||
12 | { | ||
13 | /* Currently a stub; this will be expanded upon later. */ | ||
14 | return olpc_ec_cmd_x86(cmd, inbuf, inlen, outbuf, outlen); | ||
15 | } | ||
16 | EXPORT_SYMBOL_GPL(olpc_ec_cmd); | ||