aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-02-26 03:22:04 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-02-26 03:23:59 -0500
commit4b70858ba8d4537daf782defebe5f2ff80ccef2b (patch)
treec704cac9b9dcb0404a29bcfcdadfeda948ae81fb /drivers/input/keyboard
parent492d4f25416528ffb900e6edf0fd70eafd098cfc (diff)
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: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/atkbd.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 326875be192e..d358ef8623f4 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -153,16 +153,16 @@ static const unsigned short atkbd_unxlate_table[128] = {
153#define ATKBD_RET_HANGEUL 0xf2 153#define ATKBD_RET_HANGEUL 0xf2
154#define ATKBD_RET_ERR 0xff 154#define ATKBD_RET_ERR 0xff
155 155
156#define ATKBD_KEY_UNKNOWN 0 156#define ATKBD_KEY_UNKNOWN 0
157#define ATKBD_KEY_NULL 255 157#define ATKBD_KEY_NULL 255
158 158
159#define ATKBD_SCR_1 254 159#define ATKBD_SCR_1 0xfffe
160#define ATKBD_SCR_2 253 160#define ATKBD_SCR_2 0xfffd
161#define ATKBD_SCR_4 252 161#define ATKBD_SCR_4 0xfffc
162#define ATKBD_SCR_8 251 162#define ATKBD_SCR_8 0xfffb
163#define ATKBD_SCR_CLICK 250 163#define ATKBD_SCR_CLICK 0xfffa
164#define ATKBD_SCR_LEFT 249 164#define ATKBD_SCR_LEFT 0xfff9
165#define ATKBD_SCR_RIGHT 248 165#define ATKBD_SCR_RIGHT 0xfff8
166 166
167#define ATKBD_SPECIAL ATKBD_SCR_RIGHT 167#define ATKBD_SPECIAL ATKBD_SCR_RIGHT
168 168
@@ -177,7 +177,7 @@ static const unsigned short atkbd_unxlate_table[128] = {
177#define ATKBD_XL_HANJA 0x20 177#define ATKBD_XL_HANJA 0x20
178 178
179static const struct { 179static const struct {
180 unsigned char keycode; 180 unsigned short keycode;
181 unsigned char set2; 181 unsigned char set2;
182} atkbd_scroll_keys[] = { 182} atkbd_scroll_keys[] = {
183 { ATKBD_SCR_1, 0xc5 }, 183 { ATKBD_SCR_1, 0xc5 },
@@ -1074,9 +1074,13 @@ static void atkbd_set_device_attrs(struct atkbd *atkbd)
1074 input_dev->keycodesize = sizeof(unsigned short); 1074 input_dev->keycodesize = sizeof(unsigned short);
1075 input_dev->keycodemax = ARRAY_SIZE(atkbd_set2_keycode); 1075 input_dev->keycodemax = ARRAY_SIZE(atkbd_set2_keycode);
1076 1076
1077 for (i = 0; i < ATKBD_KEYMAP_SIZE; i++) 1077 for (i = 0; i < ATKBD_KEYMAP_SIZE; i++) {
1078 if (atkbd->keycode[i] && atkbd->keycode[i] < ATKBD_SPECIAL) 1078 if (atkbd->keycode[i] != KEY_RESERVED &&
1079 atkbd->keycode[i] != ATKBD_KEY_NULL &&
1080 atkbd->keycode[i] < ATKBD_SPECIAL) {
1079 __set_bit(atkbd->keycode[i], input_dev->keybit); 1081 __set_bit(atkbd->keycode[i], input_dev->keybit);
1082 }
1083 }
1080} 1084}
1081 1085
1082/* 1086/*