staging: rtl8188eu: rename HalSetBrateCfg() - style
[linux/fpc-iii.git] / drivers / s390 / char / keyboard.h
blobc467589c7f452fdfc2aeabd509aaddd6086d7713
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * ebcdic keycode functions for s390 console drivers
5 * Copyright IBM Corp. 2003
6 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
7 */
9 #include <linux/tty.h>
10 #include <linux/tty_flip.h>
11 #include <linux/keyboard.h>
13 #define NR_FN_HANDLER 20
15 struct kbd_data;
17 extern int ebc_funcbufsize, ebc_funcbufleft;
18 extern char *ebc_func_table[MAX_NR_FUNC];
19 extern char ebc_func_buf[];
20 extern char *ebc_funcbufptr;
21 extern unsigned int ebc_keymap_count;
23 extern struct kbdiacruc ebc_accent_table[];
24 extern unsigned int ebc_accent_table_size;
25 extern unsigned short *ebc_key_maps[MAX_NR_KEYMAPS];
26 extern unsigned short ebc_plain_map[NR_KEYS];
28 typedef void (fn_handler_fn)(struct kbd_data *);
31 * FIXME: explain key_maps tricks.
34 struct kbd_data {
35 struct tty_port *port;
36 unsigned short **key_maps;
37 char **func_table;
38 fn_handler_fn **fn_handler;
39 struct kbdiacruc *accent_table;
40 unsigned int accent_table_size;
41 unsigned int diacr;
42 unsigned short sysrq;
45 struct kbd_data *kbd_alloc(void);
46 void kbd_free(struct kbd_data *);
47 void kbd_ascebc(struct kbd_data *, unsigned char *);
49 void kbd_keycode(struct kbd_data *, unsigned int);
50 int kbd_ioctl(struct kbd_data *, unsigned int, unsigned long);
53 * Helper Functions.
55 static inline void
56 kbd_put_queue(struct tty_port *port, int ch)
58 tty_insert_flip_char(port, ch, 0);
59 tty_schedule_flip(port);
62 static inline void
63 kbd_puts_queue(struct tty_port *port, char *cp)
65 while (*cp)
66 tty_insert_flip_char(port, *cp++, 0);
67 tty_schedule_flip(port);