aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorVojtech Pavlik <vojtech@suse.cz>2005-09-05 01:11:41 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2005-09-05 01:11:41 -0400
commit903b126bffb77dc313b7c2971880df408bf41a9e (patch)
tree18a2a11a2d3cbb0244415fb4068659a1f67961f4 /drivers/input/keyboard
parent8a409b0118c2d78f84f740f60fe03abda1fe3333 (diff)
Input: atkbd - handle keyboards generating scancode 0x7f
Extend bat_xl handling to do err_xl handling, so that keyboards using 0x7f scancode for regular keys can work. Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/atkbd.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 4d4985b59abf..1ad8c2ee7dbf 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -208,6 +208,7 @@ struct atkbd {
208 unsigned char resend; 208 unsigned char resend;
209 unsigned char release; 209 unsigned char release;
210 unsigned char bat_xl; 210 unsigned char bat_xl;
211 unsigned char err_xl;
211 unsigned int last; 212 unsigned int last;
212 unsigned long time; 213 unsigned long time;
213}; 214};
@@ -296,15 +297,18 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
296 if (atkbd->emul || 297 if (atkbd->emul ||
297 !(code == ATKBD_RET_EMUL0 || code == ATKBD_RET_EMUL1 || 298 !(code == ATKBD_RET_EMUL0 || code == ATKBD_RET_EMUL1 ||
298 code == ATKBD_RET_HANGUEL || code == ATKBD_RET_HANJA || 299 code == ATKBD_RET_HANGUEL || code == ATKBD_RET_HANJA ||
299 code == ATKBD_RET_ERR || 300 (code == ATKBD_RET_ERR && !atkbd->err_xl) ||
300 (code == ATKBD_RET_BAT && !atkbd->bat_xl))) { 301 (code == ATKBD_RET_BAT && !atkbd->bat_xl))) {
301 atkbd->release = code >> 7; 302 atkbd->release = code >> 7;
302 code &= 0x7f; 303 code &= 0x7f;
303 } 304 }
304 305
305 if (!atkbd->emul && 306 if (!atkbd->emul) {
306 (code & 0x7f) == (ATKBD_RET_BAT & 0x7f)) 307 if ((code & 0x7f) == (ATKBD_RET_BAT & 0x7f))
307 atkbd->bat_xl = !atkbd->release; 308 atkbd->bat_xl = !atkbd->release;
309 if ((code & 0x7f) == (ATKBD_RET_ERR & 0x7f))
310 atkbd->err_xl = !atkbd->release;
311 }
308 } 312 }
309 313
310 switch (code) { 314 switch (code) {