Commit 4b70858b authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: atkbd - release previously reserved keycodes 248 - 254

Keycodes in 248 - 254 range were reserved for special needs (scrolling)
of atkbd driver. Now that the driver has been switched to use unsigned
short keycodes instead of unsigned char we can release this range back
into pull. We keep code 255 (ATKBD_KEY_NULL) reserved since users may
have been using it to silence keys they do not care about since atkbd
silently drops scancodes mapped to this keycode.
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 492d4f25
...@@ -156,13 +156,13 @@ static const unsigned short atkbd_unxlate_table[128] = { ...@@ -156,13 +156,13 @@ static const unsigned short atkbd_unxlate_table[128] = {
#define ATKBD_KEY_UNKNOWN 0 #define ATKBD_KEY_UNKNOWN 0
#define ATKBD_KEY_NULL 255 #define ATKBD_KEY_NULL 255
#define ATKBD_SCR_1 254 #define ATKBD_SCR_1 0xfffe
#define ATKBD_SCR_2 253 #define ATKBD_SCR_2 0xfffd
#define ATKBD_SCR_4 252 #define ATKBD_SCR_4 0xfffc
#define ATKBD_SCR_8 251 #define ATKBD_SCR_8 0xfffb
#define ATKBD_SCR_CLICK 250 #define ATKBD_SCR_CLICK 0xfffa
#define ATKBD_SCR_LEFT 249 #define ATKBD_SCR_LEFT 0xfff9
#define ATKBD_SCR_RIGHT 248 #define ATKBD_SCR_RIGHT 0xfff8
#define ATKBD_SPECIAL ATKBD_SCR_RIGHT #define ATKBD_SPECIAL ATKBD_SCR_RIGHT
...@@ -177,7 +177,7 @@ static const unsigned short atkbd_unxlate_table[128] = { ...@@ -177,7 +177,7 @@ static const unsigned short atkbd_unxlate_table[128] = {
#define ATKBD_XL_HANJA 0x20 #define ATKBD_XL_HANJA 0x20
static const struct { static const struct {
unsigned char keycode; unsigned short keycode;
unsigned char set2; unsigned char set2;
} atkbd_scroll_keys[] = { } atkbd_scroll_keys[] = {
{ ATKBD_SCR_1, 0xc5 }, { ATKBD_SCR_1, 0xc5 },
...@@ -1074,9 +1074,13 @@ static void atkbd_set_device_attrs(struct atkbd *atkbd) ...@@ -1074,9 +1074,13 @@ static void atkbd_set_device_attrs(struct atkbd *atkbd)
input_dev->keycodesize = sizeof(unsigned short); input_dev->keycodesize = sizeof(unsigned short);
input_dev->keycodemax = ARRAY_SIZE(atkbd_set2_keycode); input_dev->keycodemax = ARRAY_SIZE(atkbd_set2_keycode);
for (i = 0; i < ATKBD_KEYMAP_SIZE; i++) for (i = 0; i < ATKBD_KEYMAP_SIZE; i++) {
if (atkbd->keycode[i] && atkbd->keycode[i] < ATKBD_SPECIAL) if (atkbd->keycode[i] != KEY_RESERVED &&
atkbd->keycode[i] != ATKBD_KEY_NULL &&
atkbd->keycode[i] < ATKBD_SPECIAL) {
__set_bit(atkbd->keycode[i], input_dev->keybit); __set_bit(atkbd->keycode[i], input_dev->keybit);
}
}
} }
/* /*
......
...@@ -377,7 +377,7 @@ struct input_absinfo { ...@@ -377,7 +377,7 @@ struct input_absinfo {
#define KEY_WIMAX 246 #define KEY_WIMAX 246
/* Range 248 - 255 is reserved for special needs of AT keyboard driver */ /* Code 255 is reserved for special needs of AT keyboard driver */
#define BTN_MISC 0x100 #define BTN_MISC 0x100
#define BTN_0 0x100 #define BTN_0 0x100
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment