diff options
author | Michael Büsch <mb@bu3sch.de> | 2010-09-18 17:58:30 +0000 |
---|---|---|
committer | Michael Büsch <mb@bu3sch.de> | 2010-09-18 17:58:30 +0000 |
commit | 1e3c230596933752856f895a2b422b040b885639 (patch) | |
tree | ecea9b2cc17aec6b0df32e99f611f7c3928ec8c1 /target/linux/omap24xx | |
parent | 581f65334be992a8680a0e744bc939202fd7c5c4 (diff) | |
download | upstream-1e3c230596933752856f895a2b422b040b885639.tar.gz upstream-1e3c230596933752856f895a2b422b040b885639.tar.bz2 upstream-1e3c230596933752856f895a2b422b040b885639.zip |
omap24xx: Add n8x0 specific GPIO switch code
SVN-Revision: 23082
Diffstat (limited to 'target/linux/omap24xx')
-rw-r--r-- | target/linux/omap24xx/patches-2.6.36/300-nokia-board.patch | 61 | ||||
-rw-r--r-- | target/linux/omap24xx/patches-2.6.36/900-n810-battery-management.patch | 8 |
2 files changed, 53 insertions, 16 deletions
diff --git a/target/linux/omap24xx/patches-2.6.36/300-nokia-board.patch b/target/linux/omap24xx/patches-2.6.36/300-nokia-board.patch index 4bec75ec8b..825d8be066 100644 --- a/target/linux/omap24xx/patches-2.6.36/300-nokia-board.patch +++ b/target/linux/omap24xx/patches-2.6.36/300-nokia-board.patch @@ -1,13 +1,13 @@ --- arch/arm/mach-omap1/board-nokia770.c | 16 + - arch/arm/mach-omap2/Kconfig | 10 + + arch/arm/mach-omap2/Kconfig | 10 arch/arm/mach-omap2/Makefile | 2 - arch/arm/mach-omap2/board-n8x0-lcd.c | 127 +++++++++++++ - arch/arm/mach-omap2/board-n8x0-usb.c | 175 +++++++++++++++++++ - arch/arm/mach-omap2/board-n8x0.c | 318 +++++++++++++++++++++++++---------- + arch/arm/mach-omap2/board-n8x0-lcd.c | 127 ++++++++++++ + arch/arm/mach-omap2/board-n8x0-usb.c | 175 +++++++++++++++++ + arch/arm/mach-omap2/board-n8x0.c | 355 ++++++++++++++++++++++++++--------- arch/arm/mach-omap2/control.c | 2 arch/arm/mach-omap2/serial.c | 8 - 8 files changed, 571 insertions(+), 87 deletions(-) + 8 files changed, 608 insertions(+), 87 deletions(-) --- linux-2.6.36-rc4.orig/arch/arm/mach-omap1/board-nokia770.c +++ linux-2.6.36-rc4/arch/arm/mach-omap1/board-nokia770.c @@ -58,15 +58,16 @@ #include <asm/mach/arch.h> #include <asm/mach-types.h> -@@ -32,6 +36,7 @@ +@@ -32,6 +36,8 @@ #include <plat/onenand.h> #include <plat/mmc.h> #include <plat/serial.h> +#include <plat/cbus.h> ++#include <plat/gpio-switch.h> #include "mux.h" -@@ -39,109 +44,154 @@ static int slot1_cover_open; +@@ -39,109 +45,154 @@ static int slot1_cover_open; static int slot2_cover_open; static struct device *mmc_device; @@ -304,7 +305,7 @@ { .modalias = "p54spi", .bus_num = 2, -@@ -149,6 +199,68 @@ static struct spi_board_info n800_spi_bo +@@ -149,6 +200,68 @@ static struct spi_board_info n800_spi_bo .max_speed_hz = 48000000, .controller_data = &p54spi_mcspi_config, }, @@ -373,7 +374,7 @@ }; #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ -@@ -183,6 +295,20 @@ static struct mtd_partition onenand_part +@@ -183,6 +296,20 @@ static struct mtd_partition onenand_part }, }; @@ -394,7 +395,7 @@ static struct omap_onenand_platform_data board_onenand_data = { .cs = 0, .gpio_irq = 26, -@@ -659,15 +785,41 @@ static struct omap_board_mux board_mux[] +@@ -659,15 +786,77 @@ static struct omap_board_mux board_mux[] #define board_mux NULL #endif @@ -408,12 +409,48 @@ + +extern void n8x0_usb_init(void); + ++static struct omap_gpio_switch n8x0_gpio_switches[] __initdata = { ++ { ++ .name = "headphone", ++ .gpio = -1, ++ .debounce_rising = 200, ++ .debounce_falling = 200, ++ }, { ++ .name = "cam_act", ++ .gpio = -1, ++ .debounce_rising = 200, ++ .debounce_falling = 200, ++ }, { ++ .name = "cam_turn", ++ .gpio = -1, ++ .debounce_rising = 100, ++ .debounce_falling = 100, ++ }, { ++ .name = "slide", ++ .gpio = -1, ++ .debounce_rising = 200, ++ .debounce_falling = 200, ++ }, { ++ .name = "kb_lock", ++ .gpio = -1, ++ .debounce_rising = 200, ++ .debounce_falling = 200, ++ }, ++}; ++ ++static void __init n8x0_gpio_switches_init(void) ++{ ++ /* The switches are actually registered through ATAG mechanism. ++ * This just updates the parameters (thus .gpio is -1) */ ++ omap_register_gpio_switches(n8x0_gpio_switches, ++ ARRAY_SIZE(n8x0_gpio_switches)); ++} ++ static void __init n8x0_init_machine(void) { omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC); -+ ++ n8x0_gpio_switches_init(); + platform_device_register(&n8x0_cbus_device); -+ + n8x0_bt_init(); + /* FIXME: add n810 spi devices */ diff --git a/target/linux/omap24xx/patches-2.6.36/900-n810-battery-management.patch b/target/linux/omap24xx/patches-2.6.36/900-n810-battery-management.patch index ea8f896c11..c3507fba99 100644 --- a/target/linux/omap24xx/patches-2.6.36/900-n810-battery-management.patch +++ b/target/linux/omap24xx/patches-2.6.36/900-n810-battery-management.patch @@ -460,9 +460,9 @@ int retu_request_irq(int id, void *irq_handler, unsigned long arg, char *name); --- linux-2.6.36-rc4.orig/arch/arm/mach-omap2/board-n8x0.c +++ linux-2.6.36-rc4/arch/arm/mach-omap2/board-n8x0.c -@@ -795,6 +795,17 @@ extern void n8x0_blizzard_init(void); - - extern void n8x0_usb_init(void); +@@ -833,6 +833,17 @@ static void __init n8x0_gpio_switches_in + ARRAY_SIZE(n8x0_gpio_switches)); + } +static struct platform_device n810_bm_device = { + .name = "n810bm", @@ -478,7 +478,7 @@ static void __init n8x0_init_machine(void) { omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC); -@@ -823,6 +834,8 @@ static void __init n8x0_init_machine(voi +@@ -860,6 +871,8 @@ static void __init n8x0_init_machine(voi n8x0_onenand_init(); n8x0_mmc_init(); n8x0_usb_init(); |