aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark F. Brown <mark.brown314@gmail.com>2010-09-03 18:28:07 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-10-09 05:07:17 -0400
commit6d109465fb751fe4376c080e5fb10838d3414c28 (patch)
tree95149a8ec520557ec3f8c919c6a9030f7450f9f3
parent4a2490eac897e3648c4800b1068b56b7e1ad91b3 (diff)
ARM: pxa168: added keypad support
Signed-off-by: Mark F. Brown <mark.brown314@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r--arch/arm/mach-mmp/include/mach/mfp-pxa168.h7
-rw-r--r--arch/arm/mach-mmp/include/mach/pxa168.h7
-rw-r--r--arch/arm/mach-mmp/pxa168.c3
-rw-r--r--drivers/input/keyboard/Kconfig2
4 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h
index ded43c455ec3..4621067c7720 100644
--- a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h
+++ b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h
@@ -289,4 +289,11 @@
289#define GPIO86_PWM1_OUT MFP_CFG(GPIO86, AF2) 289#define GPIO86_PWM1_OUT MFP_CFG(GPIO86, AF2)
290#define GPIO86_PWM2_OUT MFP_CFG(GPIO86, AF3) 290#define GPIO86_PWM2_OUT MFP_CFG(GPIO86, AF3)
291 291
292/* Keypad */
293#define GPIO109_KP_MKIN1 MFP_CFG(GPIO109, AF7)
294#define GPIO110_KP_MKIN0 MFP_CFG(GPIO110, AF7)
295#define GPIO111_KP_MKOUT7 MFP_CFG(GPIO111, AF7)
296#define GPIO112_KP_MKOUT6 MFP_CFG(GPIO112, AF7)
297#define GPIO121_KP_MKIN4 MFP_CFG(GPIO121, AF7)
298
292#endif /* __ASM_MACH_MFP_PXA168_H */ 299#endif /* __ASM_MACH_MFP_PXA168_H */
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h
index 220738f9c5e0..f34e6638fc6c 100644
--- a/arch/arm/mach-mmp/include/mach/pxa168.h
+++ b/arch/arm/mach-mmp/include/mach/pxa168.h
@@ -11,6 +11,7 @@ extern void __init pxa168_init_irq(void);
11#include <plat/i2c.h> 11#include <plat/i2c.h>
12#include <plat/pxa3xx_nand.h> 12#include <plat/pxa3xx_nand.h>
13#include <video/pxa168fb.h> 13#include <video/pxa168fb.h>
14#include <plat/pxa27x_keypad.h>
14 15
15extern struct pxa_device_desc pxa168_device_uart1; 16extern struct pxa_device_desc pxa168_device_uart1;
16extern struct pxa_device_desc pxa168_device_uart2; 17extern struct pxa_device_desc pxa168_device_uart2;
@@ -27,6 +28,7 @@ extern struct pxa_device_desc pxa168_device_ssp4;
27extern struct pxa_device_desc pxa168_device_ssp5; 28extern struct pxa_device_desc pxa168_device_ssp5;
28extern struct pxa_device_desc pxa168_device_nand; 29extern struct pxa_device_desc pxa168_device_nand;
29extern struct pxa_device_desc pxa168_device_fb; 30extern struct pxa_device_desc pxa168_device_fb;
31extern struct pxa_device_desc pxa168_device_keypad;
30 32
31static inline int pxa168_add_uart(int id) 33static inline int pxa168_add_uart(int id)
32{ 34{
@@ -105,4 +107,9 @@ static inline int pxa168_add_fb(struct pxa168fb_mach_info *mi)
105 return pxa_register_device(&pxa168_device_fb, mi, sizeof(*mi)); 107 return pxa_register_device(&pxa168_device_fb, mi, sizeof(*mi));
106} 108}
107 109
110static inline int pxa168_add_keypad(struct pxa27x_keypad_platform_data *data)
111{
112 return pxa_register_device(&pxa168_device_keypad, data, sizeof(*data));
113}
114
108#endif /* __ASM_MACH_PXA168_H */ 115#endif /* __ASM_MACH_PXA168_H */
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
index eaebf6621415..2fa16fb4503c 100644
--- a/arch/arm/mach-mmp/pxa168.c
+++ b/arch/arm/mach-mmp/pxa168.c
@@ -77,6 +77,7 @@ static APBC_CLK(ssp2, PXA168_SSP2, 4, 0);
77static APBC_CLK(ssp3, PXA168_SSP3, 4, 0); 77static APBC_CLK(ssp3, PXA168_SSP3, 4, 0);
78static APBC_CLK(ssp4, PXA168_SSP4, 4, 0); 78static APBC_CLK(ssp4, PXA168_SSP4, 4, 0);
79static APBC_CLK(ssp5, PXA168_SSP5, 4, 0); 79static APBC_CLK(ssp5, PXA168_SSP5, 4, 0);
80static APBC_CLK(keypad, PXA168_KPC, 0, 32000);
80 81
81static APMU_CLK(nand, NAND, 0x01db, 208000000); 82static APMU_CLK(nand, NAND, 0x01db, 208000000);
82static APMU_CLK(lcd, LCD, 0x7f, 312000000); 83static APMU_CLK(lcd, LCD, 0x7f, 312000000);
@@ -98,6 +99,7 @@ static struct clk_lookup pxa168_clkregs[] = {
98 INIT_CLKREG(&clk_ssp5, "pxa168-ssp.4", NULL), 99 INIT_CLKREG(&clk_ssp5, "pxa168-ssp.4", NULL),
99 INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL), 100 INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL),
100 INIT_CLKREG(&clk_lcd, "pxa168-fb", NULL), 101 INIT_CLKREG(&clk_lcd, "pxa168-fb", NULL),
102 INIT_CLKREG(&clk_keypad, "pxa27x-keypad", NULL),
101}; 103};
102 104
103static int __init pxa168_init(void) 105static int __init pxa168_init(void)
@@ -150,3 +152,4 @@ PXA168_DEVICE(ssp3, "pxa168-ssp", 2, SSP3, 0xd401f000, 0x40, 56, 57);
150PXA168_DEVICE(ssp4, "pxa168-ssp", 3, SSP4, 0xd4020000, 0x40, 58, 59); 152PXA168_DEVICE(ssp4, "pxa168-ssp", 3, SSP4, 0xd4020000, 0x40, 58, 59);
151PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61); 153PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61);
152PXA168_DEVICE(fb, "pxa168-fb", -1, LCD, 0xd420b000, 0x1c8); 154PXA168_DEVICE(fb, "pxa168-fb", -1, LCD, 0xd420b000, 0x1c8);
155PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c);
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index 9cc488d21490..aa037fec2f86 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -338,7 +338,7 @@ config KEYBOARD_OPENCORES
338 338
339config KEYBOARD_PXA27x 339config KEYBOARD_PXA27x
340 tristate "PXA27x/PXA3xx keypad support" 340 tristate "PXA27x/PXA3xx keypad support"
341 depends on PXA27x || PXA3xx 341 depends on PXA27x || PXA3xx || ARCH_MMP
342 help 342 help
343 Enable support for PXA27x/PXA3xx keypad controller. 343 Enable support for PXA27x/PXA3xx keypad controller.
344 344