]>
git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - arch/um/drivers/line.h
0c4dadf5e03e613d4be1f0d5af57c48f9198af53
2 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
9 #include "linux/list.h"
10 #include "linux/workqueue.h"
11 #include "linux/tty.h"
12 #include "linux/interrupt.h"
13 #include "linux/spinlock.h"
14 #include "linux/mutex.h"
15 #include "chan_user.h"
16 #include "mconsole_kern.h"
18 /* There's only one modifiable field in this - .mc.list */
21 const char *device_name
;
23 const short minor_start
;
27 const char *read_irq_name
;
29 const char *write_irq_name
;
34 struct tty_struct
*tty
;
35 spinlock_t count_lock
;
40 struct list_head chan_list
;
42 /*This lock is actually, mostly, local to*/
45 /* Yes, this is a real circular buffer.
46 * XXX: And this should become a struct kfifo!
48 * buffer points to a buffer allocated on demand, of length
49 * LINE_BUFSIZE, head to the start of the ring, tail to the end.*/
55 struct delayed_work task
;
56 const struct line_driver
*driver
;
60 extern void line_close(struct tty_struct
*tty
, struct file
* filp
);
61 extern int line_open(struct line
*lines
, struct tty_struct
*tty
);
62 extern int line_setup(char **conf
, unsigned nlines
, char **def
,
63 char *init
, char *name
);
64 extern int line_write(struct tty_struct
*tty
, const unsigned char *buf
,
66 extern int line_put_char(struct tty_struct
*tty
, unsigned char ch
);
67 extern void line_set_termios(struct tty_struct
*tty
, struct ktermios
* old
);
68 extern int line_chars_in_buffer(struct tty_struct
*tty
);
69 extern void line_flush_buffer(struct tty_struct
*tty
);
70 extern void line_flush_chars(struct tty_struct
*tty
);
71 extern int line_write_room(struct tty_struct
*tty
);
72 extern int line_ioctl(struct tty_struct
*tty
, unsigned int cmd
,
74 extern void line_throttle(struct tty_struct
*tty
);
75 extern void line_unthrottle(struct tty_struct
*tty
);
77 extern char *add_xterm_umid(char *base
);
78 extern int line_setup_irq(int fd
, int input
, int output
, struct line
*line
,
80 extern void line_close_chan(struct line
*line
);
81 extern struct tty_driver
*register_lines(struct line_driver
*line_driver
,
82 const struct tty_operations
*driver
,
83 struct line
*lines
, int nlines
);
84 extern void lines_init(struct line
*lines
, int nlines
, struct chan_opts
*opts
);
85 extern void close_lines(struct line
*lines
, int nlines
);
87 extern int line_config(struct line
*lines
, unsigned int sizeof_lines
,
88 char *str
, const struct chan_opts
*opts
,
90 extern int line_id(char **str
, int *start_out
, int *end_out
);
91 extern int line_remove(struct line
*lines
, unsigned int sizeof_lines
, int n
,
93 extern int line_get_config(char *dev
, struct line
*lines
,
94 unsigned int sizeof_lines
, char *str
,
95 int size
, char **error_out
);