]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-pxa/devices.c
[ARM] pxa: add pxa27x_keypad device and pxa_set_keypad_info()
[linux-2.6-omap-h63xx.git] / arch / arm / mach-pxa / devices.c
index bfccb80ac8eff129d62aaccd02469fbec7b504de..3665e242f1f9afcecc46ac9da1a56ecb6ea3f29f 100644 (file)
@@ -11,6 +11,7 @@
 #include <asm/arch/irda.h>
 #include <asm/arch/i2c.h>
 #include <asm/arch/ohci.h>
+#include <asm/arch/pxa27x_keypad.h>
 
 #include "devices.h"
 
@@ -396,6 +397,31 @@ struct platform_device pxa25x_device_assp = {
 
 #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
 
+static struct resource pxa27x_resource_keypad[] = {
+       [0] = {
+               .start  = 0x41500000,
+               .end    = 0x4150004c,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = IRQ_KEYPAD,
+               .end    = IRQ_KEYPAD,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device pxa27x_device_keypad = {
+       .name           = "pxa27x-keypad",
+       .id             = -1,
+       .resource       = pxa27x_resource_keypad,
+       .num_resources  = ARRAY_SIZE(pxa27x_resource_keypad),
+};
+
+void __init pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info)
+{
+       pxa_register_device(&pxa27x_device_keypad, info);
+}
+
 static u64 pxa27x_ohci_dma_mask = DMA_BIT_MASK(32);
 
 static struct resource pxa27x_resource_ohci[] = {