18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _ASM_X86_KBDLEDS_H
38c2ecf20Sopenharmony_ci#define _ASM_X86_KBDLEDS_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci/*
68c2ecf20Sopenharmony_ci * Some laptops take the 789uiojklm,. keys as number pad when NumLock is on.
78c2ecf20Sopenharmony_ci * This seems a good reason to start with NumLock off. That's why on X86 we
88c2ecf20Sopenharmony_ci * ask the bios for the correct state.
98c2ecf20Sopenharmony_ci */
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <asm/setup.h>
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_cistatic inline int kbd_defleds(void)
148c2ecf20Sopenharmony_ci{
158c2ecf20Sopenharmony_ci	return boot_params.kbd_status & 0x20 ? (1 << VC_NUMLOCK) : 0;
168c2ecf20Sopenharmony_ci}
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci#endif /* _ASM_X86_KBDLEDS_H */
19