Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=72f9df4023f9e44b29a48a5ea4954d89b18363fe
Commit:     72f9df4023f9e44b29a48a5ea4954d89b18363fe
Parent:     5637f02a9cf84f2c00fd8a0f6561c375bb19103b
Author:     Dmitry Torokhov <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 11 00:48:48 2007 -0400
Committer:  Dmitry Torokhov <[EMAIL PROTECTED]>
CommitDate: Thu Oct 11 00:48:48 2007 -0400

    Input: jornada720_kbd - send MSC_SCAN events
    
    Send MSC_SCAN events to userspace to ease task of adjusting
    keymap.
    
    Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]>
---
 drivers/input/keyboard/jornada720_kbd.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/input/keyboard/jornada720_kbd.c 
b/drivers/input/keyboard/jornada720_kbd.c
index dd8a037..e6696b3 100644
--- a/drivers/input/keyboard/jornada720_kbd.c
+++ b/drivers/input/keyboard/jornada720_kbd.c
@@ -59,7 +59,8 @@ static irqreturn_t jornada720_kbd_interrupt(int irq, void 
*dev_id)
 {
        struct platform_device *pdev = dev_id;
        struct jornadakbd *jornadakbd = platform_get_drvdata(pdev);
-       u8 count, kbd_data;
+       struct input_dev *input = jornadakbd->input;
+       u8 count, kbd_data, scan_code;
 
        /* startup ssp with spinlock */
        jornada_ssp_start();
@@ -77,11 +78,12 @@ static irqreturn_t jornada720_kbd_interrupt(int irq, void 
*dev_id)
                while (count--) {
                        /* Exchange TxDummy for location (keymap[kbddata]) */
                        kbd_data = jornada_ssp_byte(TXDUMMY);
+                       scan_code = kbd_data & 0x7f;
 
-                       input_report_key(jornadakbd->input,
-                                        jornadakbd->keymap[kbd_data & 0x7f],
+                       input_event(input, EV_MSC, MSC_SCAN, scan_code);
+                       input_report_key(input, jornadakbd->keymap[scan_code],
                                         !(kbd_data & 0x80));
-                       input_sync(jornadakbd->input);
+                       input_sync(input);
                }
        }
 
@@ -123,6 +125,8 @@ static int __devinit jornada720_kbd_probe(struct 
platform_device *pdev)
                __set_bit(jornadakbd->keymap[i], input_dev->keybit);
        __clear_bit(KEY_RESERVED, input_dev->keybit);
 
+       input_set_capability(input_dev, EV_MSC, MSC_SCAN);
+
        err = request_irq(IRQ_GPIO0,
                          jornada720_kbd_interrupt,
                          IRQF_DISABLED | IRQF_TRIGGER_FALLING,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to