The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/include/asm-mips64/keyboard.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * This file is subject to the terms and conditions of the GNU General Public
    3  * License.  See the file "COPYING" in the main directory of this archive
    4  * for more details.
    5  *
    6  * Copyright (C) 1994 - 1999 Ralf Baechle
    7  */
    8 #ifndef _ASM_KEYBOARD_H
    9 #define _ASM_KEYBOARD_H
   10 
   11 #ifdef __KERNEL__
   12 
   13 #include <linux/config.h>
   14 #include <linux/delay.h>
   15 #include <linux/ioport.h>
   16 #include <linux/kd.h>
   17 #include <linux/pm.h>
   18 
   19 #define DISABLE_KBD_DURING_INTERRUPTS 0
   20 
   21 #ifdef CONFIG_PC_KEYB
   22 
   23 extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode);
   24 extern int pckbd_getkeycode(unsigned int scancode);
   25 extern int pckbd_translate(unsigned char scancode, unsigned char *keycode,
   26                            char raw_mode);
   27 extern char pckbd_unexpected_up(unsigned char keycode);
   28 extern void pckbd_leds(unsigned char leds);
   29 extern void pckbd_init_hw(void);
   30 extern int pckbd_pm_resume(struct pm_dev *, pm_request_t, void *);
   31 extern pm_callback pm_kbd_request_override;
   32 extern unsigned char pckbd_sysrq_xlate[128];
   33 extern void kbd_forward_char (int ch);
   34 
   35 #define kbd_setkeycode          pckbd_setkeycode
   36 #define kbd_getkeycode          pckbd_getkeycode
   37 #define kbd_translate           pckbd_translate
   38 #define kbd_unexpected_up       pckbd_unexpected_up
   39 #define kbd_leds                pckbd_leds
   40 #define kbd_init_hw             pckbd_init_hw
   41 #define kbd_sysrq_xlate         pckbd_sysrq_xlate
   42 
   43 #define SYSRQ_KEY 0x54
   44 
   45 /* Some stoneage hardware needs delays after some operations.  */
   46 #define kbd_pause() do { } while(0)
   47 
   48 struct kbd_ops {
   49         /* Keyboard driver resource allocation  */
   50         void (*kbd_request_region)(void);
   51         int (*kbd_request_irq)(void (*handler)(int, void *, struct pt_regs *));
   52 
   53         /* PSaux driver resource management  */
   54         int (*aux_request_irq)(void (*handler)(int, void *, struct pt_regs *));
   55         void (*aux_free_irq)(void);
   56 
   57         /* Methods to access the keyboard processor's I/O registers  */
   58         unsigned char (*kbd_read_input)(void);
   59         void (*kbd_write_output)(unsigned char val);
   60         void (*kbd_write_command)(unsigned char val);
   61         unsigned char (*kbd_read_status)(void);
   62 };
   63 
   64 extern struct kbd_ops *kbd_ops;
   65 #define kbd_controller_present() (kbd_ops != 0)
   66 
   67 /* Do the actual calls via kbd_ops vector  */
   68 #define kbd_request_region() kbd_ops->kbd_request_region()
   69 #define kbd_request_irq(handler) kbd_ops->kbd_request_irq(handler)
   70 
   71 #define aux_request_irq(hand, dev_id) kbd_ops->aux_request_irq(hand)
   72 #define aux_free_irq(dev_id) kbd_ops->aux_free_irq()
   73 
   74 #define kbd_read_input() kbd_ops->kbd_read_input()
   75 #define kbd_write_output(val) kbd_ops->kbd_write_output(val)
   76 #define kbd_write_command(val) kbd_ops->kbd_write_command(val)
   77 #define kbd_read_status() kbd_ops->kbd_read_status()
   78 
   79 #else
   80 
   81 extern int kbd_setkeycode(unsigned int scancode, unsigned int keycode);
   82 extern int kbd_getkeycode(unsigned int scancode);
   83 extern int kbd_translate(unsigned char scancode, unsigned char *keycode,
   84         char raw_mode);
   85 extern char kbd_unexpected_up(unsigned char keycode);
   86 extern void kbd_leds(unsigned char leds);
   87 extern void kbd_init_hw(void);
   88 extern unsigned char *kbd_sysrq_xlate;
   89 
   90 extern unsigned char kbd_sysrq_key;
   91 #define SYSRQ_KEY kbd_sysrq_key
   92 
   93 #endif
   94 
   95 #endif /* __KERNEL */
   96 
   97 #endif /* _ASM_KEYBOARD_H */

Cache object: 59e8598d2b7407994f212da7c19280c0


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.