aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index e8c6c9136c97..f0f43d08d8b8 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -23,7 +23,7 @@
23 */ 23 */
24#define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ 24#define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */
25#define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ 25#define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */
26#define NR_LDISCS 19 26#define NR_LDISCS 20
27 27
28/* line disciplines */ 28/* line disciplines */
29#define N_TTY 0 29#define N_TTY 0
@@ -47,6 +47,8 @@
47#define N_SLCAN 17 /* Serial / USB serial CAN Adaptors */ 47#define N_SLCAN 17 /* Serial / USB serial CAN Adaptors */
48#define N_PPS 18 /* Pulse per Second */ 48#define N_PPS 18 /* Pulse per Second */
49 49
50#define N_V253 19 /* Codec control over voice modem */
51
50/* 52/*
51 * This character is the same as _POSIX_VDISABLE: it cannot be used as 53 * This character is the same as _POSIX_VDISABLE: it cannot be used as
52 * a c_cc[] character, but indicates that a particular special character 54 * a c_cc[] character, but indicates that a particular special character
@@ -185,7 +187,12 @@ struct tty_port;
185struct tty_port_operations { 187struct tty_port_operations {
186 /* Return 1 if the carrier is raised */ 188 /* Return 1 if the carrier is raised */
187 int (*carrier_raised)(struct tty_port *port); 189 int (*carrier_raised)(struct tty_port *port);
190 /* Control the DTR line */
188 void (*dtr_rts)(struct tty_port *port, int raise); 191 void (*dtr_rts)(struct tty_port *port, int raise);
192 /* Called when the last close completes or a hangup finishes
193 IFF the port was initialized. Do not use to free resources */
194 void (*shutdown)(struct tty_port *port);
195 void (*drop)(struct tty_port *port);
189}; 196};
190 197
191struct tty_port { 198struct tty_port {
@@ -196,11 +203,12 @@ struct tty_port {
196 int count; /* Usage count */ 203 int count; /* Usage count */
197 wait_queue_head_t open_wait; /* Open waiters */ 204 wait_queue_head_t open_wait; /* Open waiters */
198 wait_queue_head_t close_wait; /* Close waiters */ 205 wait_queue_head_t close_wait; /* Close waiters */
206 wait_queue_head_t delta_msr_wait; /* Modem status change */
199 unsigned long flags; /* TTY flags ASY_*/ 207 unsigned long flags; /* TTY flags ASY_*/
200 struct mutex mutex; /* Locking */ 208 struct mutex mutex; /* Locking */
201 unsigned char *xmit_buf; /* Optional buffer */ 209 unsigned char *xmit_buf; /* Optional buffer */
202 int close_delay; /* Close port delay */ 210 unsigned int close_delay; /* Close port delay */
203 int closing_wait; /* Delay for output */ 211 unsigned int closing_wait; /* Delay for output */
204 int drain_delay; /* Set to zero if no pure time 212 int drain_delay; /* Set to zero if no pure time
205 based drain is needed else 213 based drain is needed else
206 set to size of fifo */ 214 set to size of fifo */
@@ -457,6 +465,12 @@ extern int tty_port_block_til_ready(struct tty_port *port,
457extern int tty_port_close_start(struct tty_port *port, 465extern int tty_port_close_start(struct tty_port *port,
458 struct tty_struct *tty, struct file *filp); 466 struct tty_struct *tty, struct file *filp);
459extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty); 467extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty);
468extern void tty_port_close(struct tty_port *port,
469 struct tty_struct *tty, struct file *filp);
470extern inline int tty_port_users(struct tty_port *port)
471{
472 return port->count + port->blocked_open;
473}
460 474
461extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc); 475extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc);
462extern int tty_unregister_ldisc(int disc); 476extern int tty_unregister_ldisc(int disc);
@@ -517,14 +531,13 @@ extern void serial_console_init(void);
517 531
518extern int pcxe_open(struct tty_struct *tty, struct file *filp); 532extern int pcxe_open(struct tty_struct *tty, struct file *filp);
519 533
520/* printk.c */
521
522extern void console_print(const char *);
523
524/* vt.c */ 534/* vt.c */
525 535
526extern int vt_ioctl(struct tty_struct *tty, struct file *file, 536extern int vt_ioctl(struct tty_struct *tty, struct file *file,
527 unsigned int cmd, unsigned long arg); 537 unsigned int cmd, unsigned long arg);
528 538
539extern long vt_compat_ioctl(struct tty_struct *tty, struct file * file,
540 unsigned int cmd, unsigned long arg);
541
529#endif /* __KERNEL__ */ 542#endif /* __KERNEL__ */
530#endif 543#endif