Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Vojtech Pavlik and committed by
Dmitry Torokhov
903b126b 8a409b01

+7 -3
+7 -3
drivers/input/keyboard/atkbd.c
··· 208 208 unsigned char resend; 209 209 unsigned char release; 210 210 unsigned char bat_xl; 211 + unsigned char err_xl; 211 212 unsigned int last; 212 213 unsigned long time; 213 214 }; ··· 297 296 if (atkbd->emul || 298 297 !(code == ATKBD_RET_EMUL0 || code == ATKBD_RET_EMUL1 || 299 298 code == ATKBD_RET_HANGUEL || code == ATKBD_RET_HANJA || 300 - code == ATKBD_RET_ERR || 299 + (code == ATKBD_RET_ERR && !atkbd->err_xl) || 301 300 (code == ATKBD_RET_BAT && !atkbd->bat_xl))) { 302 301 atkbd->release = code >> 7; 303 302 code &= 0x7f; 304 303 } 305 304 306 - if (!atkbd->emul && 307 - (code & 0x7f) == (ATKBD_RET_BAT & 0x7f)) 305 + if (!atkbd->emul) { 306 + if ((code & 0x7f) == (ATKBD_RET_BAT & 0x7f)) 308 307 atkbd->bat_xl = !atkbd->release; 308 + if ((code & 0x7f) == (ATKBD_RET_ERR & 0x7f)) 309 + atkbd->err_xl = !atkbd->release; 310 + } 309 311 } 310 312 311 313 switch (code) {