1/* 2 * linux/include/asm-m68k/keyboard.h 3 * 4 * Created 3 Nov 1996 by Geert Uytterhoeven 5 */ 6 7/* 8 * This file contains the m68k architecture specific keyboard definitions 9 */ 10 11#ifndef __M68K_KEYBOARD_H 12#define __M68K_KEYBOARD_H 13 14#ifdef __KERNEL__ 15 16#include <linux/config.h> 17#include <linux/kd.h> 18#include <asm/machdep.h> 19 20#ifdef CONFIG_Q40 21#include <asm/q40_keyboard.h> 22#endif 23 24static __inline__ int kbd_setkeycode(unsigned int scancode, 25 unsigned int keycode) 26{ 27#ifdef CONFIG_Q40 28 if (MACH_IS_Q40) 29 return q40kbd_setkeycode(scancode,keycode); 30#endif 31 return -EOPNOTSUPP; 32} 33 34static __inline__ int kbd_getkeycode(unsigned int scancode) 35{ 36#ifdef CONFIG_Q40 37 if (MACH_IS_Q40) 38 return q40kbd_getkeycode(scancode); 39#endif 40 return scancode > 127 ? -EINVAL : scancode; 41} 42 43static __inline__ char kbd_unexpected_up(unsigned char keycode) 44{ 45#ifdef CONFIG_Q40 46 if (MACH_IS_Q40) 47 return q40kbd_unexpected_up(keycode); 48#endif 49 return 0200; 50} 51 52static __inline__ void kbd_leds(unsigned char leds) 53{ 54 if (mach_kbd_leds) 55 mach_kbd_leds(leds); 56} 57 58#define kbd_init_hw mach_keyb_init 59#define kbd_translate mach_kbd_translate 60#define kbd_rate mach_kbdrate 61 62#define kbd_sysrq_xlate mach_sysrq_xlate 63 64/* resource allocation */ 65#define kbd_request_region() 66#define kbd_request_irq(handler) 67 68extern unsigned int SYSRQ_KEY; 69 70#endif /* __KERNEL__ */ 71 72#endif /* __M68K_KEYBOARD_H */ 73