diff options
author | Joshua Cov <joshuacov@googlemail.com> | 2012-04-13 15:08:26 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-05-08 17:19:41 -0400 |
commit | b2d0b7a061bfddd27155c7dcd53f365d9dc0c7c3 (patch) | |
tree | 8063c6df479723b7adc509ee2aad728889faa9a4 /arch/parisc/include | |
parent | c2c21e9bb17549e8add4ff76931bcec2e2d3ad48 (diff) |
keyboard: Use BIOS Keyboard variable to set Numlock
The PC BIOS does provide a NUMLOCK flag containing the desired state
of this LED. This patch sets the current state according to the data
in the bios.
[ hpa: fixed __weak declaration without definition, changed "inline"
to "static inline" ]
Signed-Off-By: Joshua Cov <joshuacov@googlemail.com>
Link: http://lkml.kernel.org/r/CAKL7Q7rvq87TNS1T_Km8fW_5OzS%2BSbYazLXKxW-6ztOxo3zorg@mail.gmail.com
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/parisc/include')
-rw-r--r-- | arch/parisc/include/asm/kbdleds.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/parisc/include/asm/kbdleds.h b/arch/parisc/include/asm/kbdleds.h new file mode 100644 index 00000000000..2e2e75a83c2 --- /dev/null +++ b/arch/parisc/include/asm/kbdleds.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef _ASM_PARISC_KBDLEDS_H | ||
2 | #define _ASM_PARISC_KBDLEDS_H | ||
3 | |||
4 | /* | ||
5 | * On HIL keyboards of PARISC machines there is no NumLock key and | ||
6 | * everyone expects the keypad to be used for numbers. That's why | ||
7 | * we can safely turn on the NUMLOCK bit. | ||
8 | */ | ||
9 | |||
10 | static inline int kbd_defleds(void) | ||
11 | { | ||
12 | #if defined(CONFIG_KEYBOARD_HIL) || defined(CONFIG_KEYBOARD_HIL_OLD) | ||
13 | return 1 << VC_NUMLOCK; | ||
14 | #else | ||
15 | return 0; | ||
16 | #endif | ||
17 | } | ||
18 | |||
19 | #endif /* _ASM_PARISC_KBDLEDS_H */ | ||