From: "Mark F. Brown" <mark.brown314@gmail.com>
To: Eric Miao <eric.y.miao@gmail.com>,
Haojian Zhuang <haojian.zhuang@marvell.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>li
Cc: "Mark F. Brown" <mark.brown314@gmail.com>
Subject: [PATCH v2 2/6 RESEND] ARM: pxa168: added keypad support
Date: Fri, 3 Sep 2010 18:28:07 -0400 [thread overview]
Message-ID: <1283552891-13966-3-git-send-email-mark.brown314__43362.2307530188$1283553018$gmane$org@gmail.com> (raw)
In-Reply-To: <1283552891-13966-1-git-send-email-mark.brown314@gmail.com>
Signed-off-by: Mark F. Brown <mark.brown314@gmail.com>
---
arch/arm/mach-mmp/include/mach/mfp-pxa168.h | 7 +++++++
arch/arm/mach-mmp/include/mach/pxa168.h | 7 +++++++
arch/arm/mach-mmp/pxa168.c | 3 +++
drivers/input/keyboard/Kconfig | 2 +-
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 ded43c4..4621067 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 @@
#define GPIO86_PWM1_OUT MFP_CFG(GPIO86, AF2)
#define GPIO86_PWM2_OUT MFP_CFG(GPIO86, AF3)
+/* Keypad */
+#define GPIO109_KP_MKIN1 MFP_CFG(GPIO109, AF7)
+#define GPIO110_KP_MKIN0 MFP_CFG(GPIO110, AF7)
+#define GPIO111_KP_MKOUT7 MFP_CFG(GPIO111, AF7)
+#define GPIO112_KP_MKOUT6 MFP_CFG(GPIO112, AF7)
+#define GPIO121_KP_MKIN4 MFP_CFG(GPIO121, AF7)
+
#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 220738f..f34e663 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);
#include <plat/i2c.h>
#include <plat/pxa3xx_nand.h>
#include <video/pxa168fb.h>
+#include <plat/pxa27x_keypad.h>
extern struct pxa_device_desc pxa168_device_uart1;
extern struct pxa_device_desc pxa168_device_uart2;
@@ -27,6 +28,7 @@ extern struct pxa_device_desc pxa168_device_ssp4;
extern struct pxa_device_desc pxa168_device_ssp5;
extern struct pxa_device_desc pxa168_device_nand;
extern struct pxa_device_desc pxa168_device_fb;
+extern struct pxa_device_desc pxa168_device_keypad;
static inline int pxa168_add_uart(int id)
{
@@ -105,4 +107,9 @@ static inline int pxa168_add_fb(struct pxa168fb_mach_info *mi)
return pxa_register_device(&pxa168_device_fb, mi, sizeof(*mi));
}
+static inline int pxa168_add_keypad(struct pxa27x_keypad_platform_data *data)
+{
+ return pxa_register_device(&pxa168_device_keypad, data, sizeof(*data));
+}
+
#endif /* __ASM_MACH_PXA168_H */
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
index eaebf66..2fa16fb 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);
static APBC_CLK(ssp3, PXA168_SSP3, 4, 0);
static APBC_CLK(ssp4, PXA168_SSP4, 4, 0);
static APBC_CLK(ssp5, PXA168_SSP5, 4, 0);
+static APBC_CLK(keypad, PXA168_KPC, 0, 32000);
static APMU_CLK(nand, NAND, 0x01db, 208000000);
static APMU_CLK(lcd, LCD, 0x7f, 312000000);
@@ -98,6 +99,7 @@ static struct clk_lookup pxa168_clkregs[] = {
INIT_CLKREG(&clk_ssp5, "pxa168-ssp.4", NULL),
INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL),
INIT_CLKREG(&clk_lcd, "pxa168-fb", NULL),
+ INIT_CLKREG(&clk_keypad, "pxa27x-keypad", NULL),
};
static int __init pxa168_init(void)
@@ -150,3 +152,4 @@ PXA168_DEVICE(ssp3, "pxa168-ssp", 2, SSP3, 0xd401f000, 0x40, 56, 57);
PXA168_DEVICE(ssp4, "pxa168-ssp", 3, SSP4, 0xd4020000, 0x40, 58, 59);
PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61);
PXA168_DEVICE(fb, "pxa168-fb", -1, LCD, 0xd420b000, 0x1c8);
+PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c);
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index 9cc488d..aa037fe 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -338,7 +338,7 @@ config KEYBOARD_OPENCORES
config KEYBOARD_PXA27x
tristate "PXA27x/PXA3xx keypad support"
- depends on PXA27x || PXA3xx
+ depends on PXA27x || PXA3xx || ARCH_MMP
help
Enable support for PXA27x/PXA3xx keypad controller.
--
1.7.0.4
next prev parent reply other threads:[~2010-09-03 22:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-03 22:28 [PATCH v2 0/6 RESEND] ARM: pxa168: add keypad support Mark F. Brown
2010-09-03 22:28 ` [PATCH v2 1/6 RESEND] ARM: pxa27x/pxa3xx: moved pxa27x_keypad.h to platform pxa directory Mark F. Brown
2010-09-03 22:28 ` Mark F. Brown [this message]
2010-09-03 22:28 ` [PATCH v2 3/6 RESEND] ARM: pxa168: added wake clear register support for APMU Mark F. Brown
2010-09-03 22:28 ` [PATCH v2 4/6 RESEND] ARM: pxa27x_keypad: added wakeup event handler for keypad interrupts Mark F. Brown
2010-09-04 7:41 ` Eric Miao
2010-09-05 8:02 ` Igor Grinberg
2010-09-05 10:46 ` Eric Miao
2010-09-05 15:28 ` Mark F. Brown
2010-09-03 22:28 ` [PATCH v2 5/6 RESEND] ARM: pxa168: added keypad wake clear event support for platform Mark F. Brown
2010-09-03 22:28 ` [PATCH v2 6/6 RESEND] ARM: pxa168: aspenite: add board support for keypad Mark F. Brown
2010-09-04 7:42 ` Eric Miao
[not found] ` <1283552891-13966-2-git-send-email-mark.brown314@gmail.com>
2010-09-04 7:40 ` [PATCH v2 1/6 RESEND] ARM: pxa27x/pxa3xx: moved pxa27x_keypad.h to platform pxa directory Eric Miao
[not found] ` <1283552891-13966-3-git-send-email-mark.brown314@gmail.com>
2010-09-04 7:41 ` [PATCH v2 2/6 RESEND] ARM: pxa168: added keypad support Eric Miao
[not found] ` <1283552891-13966-4-git-send-email-mark.brown314@gmail.com>
2010-09-04 7:41 ` [PATCH v2 3/6 RESEND] ARM: pxa168: added wake clear register support for APMU Eric Miao
[not found] ` <1283552891-13966-6-git-send-email-mark.brown314@gmail.com>
2010-09-04 7:41 ` [PATCH v2 5/6 RESEND] ARM: pxa168: added keypad wake clear event support for platform Eric Miao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='1283552891-13966-3-git-send-email-mark.brown314__43362.2307530188$1283553018$gmane$org@gmail.com' \
--to=mark.brown314@gmail.com \
--cc=eric.y.miao@gmail.com \
--cc=haojian.zhuang@marvell.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).