diff options
author | Andres Salomon <dilinger@queued.net> | 2011-02-10 17:53:24 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-18 12:33:21 -0800 |
commit | 097cd83a4c312e1ae0d9c14526f846666cab4f3a (patch) | |
tree | 9c8229a0684c4ef8583245d25dd10eab2e009a44 /drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | |
parent | 8f2fb16a9cd015072b3da9038084930287e11985 (diff) | |
download | op-kernel-dev-097cd83a4c312e1ae0d9c14526f846666cab4f3a.zip op-kernel-dev-097cd83a4c312e1ae0d9c14526f846666cab4f3a.tar.gz |
staging: olpc_dcon: add config options for XO_1 and XO_1_5, drop hardcoded XO-1 stuff
This adds CONFIG_FB_OLPC_DCON_1 and CONFIG_FB_OLPC_DCON_1_5 options for
allowing selection of XO-1 and/or XO-1.5 DCON support. In the process,
it also forces the xo_1.c and xo_1_5.c files to build as separate units,
correctly selects between XO-1 and XO-1.5 at runtime, and adds some
hacks to allow xo_1_5.c to build.
This isn't the cleanest patch, but it'll get better as more global
variables are dropped.
Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c')
-rw-r--r-- | drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c b/drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c index 5ef0540..d4c2d74 100644 --- a/drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c +++ b/drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c @@ -7,6 +7,20 @@ */ #include <linux/acpi.h> +#include <linux/pci.h> +#include <linux/gpio.h> +#include <asm/olpc.h> + +/* TODO: this eventually belongs in linux/vx855.h */ +#define NR_VX855_GPI 14 +#define NR_VX855_GPO 13 +#define NR_VX855_GPIO 15 + +#define VX855_GPI(n) (n) +#define VX855_GPO(n) (NR_VX855_GPI + (n)) +#define VX855_GPIO(n) (NR_VX855_GPI + NR_VX855_GPO + (n)) + +#include "olpc_dcon.h" /* Hardware setup on the XO 1.5: * DCONLOAD connects to @@ -26,8 +40,6 @@ #define PREFIX "OLPC DCON:" -static struct dcon_platform_data dcon_pdata_xo_1_5; - static void dcon_clear_irq(void) { /* irq status will appear in PMIO_Rx50[6] (RW1C) on gpio12 */ @@ -173,7 +185,7 @@ static u8 dcon_read_status_xo_1_5(void) return status; } -static struct dcon_platform_data dcon_pdata_xo_1_5 = { +struct dcon_platform_data dcon_pdata_xo_1_5 = { .init = dcon_init_xo_1_5, .bus_stabilize_wiggle = dcon_wiggle_xo_1_5, .set_dconload = dcon_set_dconload_xo_1_5, |