1 /* SPDX-License-Identifier: GPL-2.0 */
3 * ebcdic keycode functions for s390 console drivers
5 * Copyright IBM Corp. 2003
6 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
10 #include <linux/tty_flip.h>
11 #include <linux/keyboard.h>
13 #define NR_FN_HANDLER 20
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.
35 struct tty_port
*port
;
36 unsigned short **key_maps
;
38 fn_handler_fn
**fn_handler
;
39 struct kbdiacruc
*accent_table
;
40 unsigned int accent_table_size
;
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);
56 kbd_put_queue(struct tty_port
*port
, int ch
)
58 tty_insert_flip_char(port
, ch
, 0);
59 tty_schedule_flip(port
);
63 kbd_puts_queue(struct tty_port
*port
, char *cp
)
66 tty_insert_flip_char(port
, *cp
++, 0);
67 tty_schedule_flip(port
);