9 #include <linux/module.h>
12 #include <linux/tty.h>
15 #include <linux/slab.h>
22 static struct tty_port nfcon_tty_port;
25 static void nfputs(
const char *
str,
unsigned int count)
41 static void nfcon_write(
struct console *
con,
const char *str,
53 static struct console nf_console = {
56 .device = nfcon_device,
62 static int nfcon_tty_open(
struct tty_struct *tty,
struct file *filp)
67 static void nfcon_tty_close(
struct tty_struct *tty,
struct file *filp)
71 static int nfcon_tty_write(
struct tty_struct *tty,
const unsigned char *buf,
78 static int nfcon_tty_put_char(
struct tty_struct *tty,
unsigned char ch)
80 char temp[2] = { ch, 0 };
86 static int nfcon_tty_write_room(
struct tty_struct *tty)
92 .open = nfcon_tty_open,
93 .close = nfcon_tty_close,
94 .write = nfcon_tty_write,
95 .put_char = nfcon_tty_put_char,
96 .write_room = nfcon_tty_write_room,
101 static int __init nf_debug_setup(
char *
arg)
119 static int __init nfcon_init(
void)
129 nfcon_tty_driver = alloc_tty_driver(1);
130 if (!nfcon_tty_driver)
134 nfcon_tty_driver->
name =
"nfcon";
144 pr_err(
"failed to register nfcon tty driver\n");
155 static void __exit nfcon_exit(
void)