From: Brian Swetland <swetland@google.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH] fix omap keypad
Date: Sat, 3 Dec 2005 02:27:34 -0800 [thread overview]
Message-ID: <20051203102734.GA12279@localhost.localdomain> (raw)
[-- Attachment #1: Type: text/plain, Size: 180 bytes --]
- register an "omap-keypad" device so that the keypad
driver actually gets probed
- initialize kp_tasklet.data so that we don't crash the
first time the keypad tasklet runs
[-- Attachment #2: omap-keypad.patch --]
[-- Type: text/plain, Size: 1304 bytes --]
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 1bb1058..4aeb032 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -99,6 +99,11 @@ static inline void omap_init_i2c(void) {
/*-------------------------------------------------------------------------*/
#if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE)
+static struct platform_device omap_kp_device = {
+ .name = "omap-keypad",
+ .id = -1,
+};
+
static void omap_init_kp(void)
{
if (machine_is_omap_h2() || machine_is_omap_h3()) {
@@ -127,6 +132,8 @@ static void omap_init_kp(void)
omap_cfg_reg(F4_730_KBC3);
omap_cfg_reg(E3_730_KBC4);
}
+
+ (void) platform_device_register(&omap_kp_device);
}
#else
static inline void omap_init_kp(void) {}
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
index 15351bb..7e851e2 100644
--- a/drivers/input/keyboard/omap-keypad.c
+++ b/drivers/input/keyboard/omap-keypad.c
@@ -331,6 +331,7 @@ static int __init omap_kp_probe(struct p
/* get the irq and init timer*/
tasklet_enable(&kp_tasklet);
+ kp_tasklet.data = (unsigned long) omap_kp;
if (request_irq(keypad_irq, omap_kp_interrupt, 0,
"omap-keypad", 0) < 0)
return -EINVAL;
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
reply other threads:[~2005-12-03 10:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20051203102734.GA12279@localhost.localdomain \
--to=swetland@google.com \
--cc=linux-omap-open-source@linux.omap.com \
/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