mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 17:55:55 +02:00
omap24xx: Add n8x0 specific GPIO switch code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23082 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b1b3d54319
commit
0aeafa66af
@ -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
|
||||
|
||||
@ -407,13 +408,49 @@
|
||||
+#endif
|
||||
+
|
||||
+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 */
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user