]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
input: Change LED state bits to conform i8042 compatible keyboard
authorBin Meng <bmeng.cn@gmail.com>
Thu, 12 Nov 2015 13:33:03 +0000 (05:33 -0800)
committerSimon Glass <sjg@chromium.org>
Fri, 20 Nov 2015 03:13:42 +0000 (20:13 -0700)
When sending LED update command to an i8042 compatible keyboard,
bit1 is 'Num Lock' and bit2 is 'Caps Lock' in the data byte. But
input library defines bit1 as 'Caps Lock' and bit2 as 'Num Lock'.
This causes a wrong LED to be set on an i8042 compatible keyboard.
Change the LED state bits to be i8042 compatible, and change the
keyboard flags as well.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/input/input.c
include/input.h

index e02e2643c9f2a385d22e7cc2435d07f624840638..526769692be8550b5b62f9b60ab3c3d35c450ecc 100644 (file)
@@ -19,9 +19,9 @@
 
 enum {
        /* These correspond to the lights on the keyboard */
-       FLAG_NUM_LOCK           = 1 << 0,
-       FLAG_CAPS_LOCK          = 1 << 1,
-       FLAG_SCROLL_LOCK        = 1 << 2,
+       FLAG_SCROLL_LOCK        = 1 << 0,
+       FLAG_NUM_LOCK           = 1 << 1,
+       FLAG_CAPS_LOCK          = 1 << 2,
 
        /* Special flag ORed with key code to indicate release */
        KEY_RELEASE             = 1 << 15,
index ad120e47f59b5e9a6bd689cf03e8fbe72d5b2bf5..2902b079b23dee172b1f0b69713fccb9bc26b6a8 100644 (file)
@@ -17,8 +17,8 @@ enum {
 enum {
        /* Keyboard LEDs */
        INPUT_LED_SCROLL        = 1 << 0,
-       INPUT_LED_CAPS          = 1 << 1,
-       INPUT_LED_NUM           = 1 << 2,
+       INPUT_LED_NUM           = 1 << 1,
+       INPUT_LED_CAPS          = 1 << 2,
 };
 
 /*