]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/linux/serialP.h
TTY: simserial/amiserial, use one instance of other members
[mirror_ubuntu-bionic-kernel.git] / include / linux / serialP.h
CommitLineData
1da177e4
LT
1/*
2 * Private header file for the (dumb) serial driver
3 *
4 * Copyright (C) 1997 by Theodore Ts'o.
5 *
6 * Redistribution of this file is permitted under the terms of the GNU
7 * Public License (GPL)
8 */
9
10#ifndef _LINUX_SERIALP_H
11#define _LINUX_SERIALP_H
12
13/*
14 * This is our internal structure for each serial port's state.
15 *
16 * Many fields are paralleled by the structure used by the serial_struct
17 * structure.
18 *
19 * For definitions of the flags field, see tty.h
20 */
21
1da177e4
LT
22#include <linux/termios.h>
23#include <linux/workqueue.h>
24#include <linux/interrupt.h>
25#include <linux/circ_buf.h>
26#include <linux/wait.h>
27
28struct serial_state {
1da177e4
LT
29 int baud_base;
30 unsigned long port;
31 int irq;
32 int flags;
1da177e4
LT
33 int type;
34 int line;
1da177e4
LT
35 int xmit_fifo_size;
36 int custom_divisor;
37 int count;
1da177e4
LT
38 unsigned short close_delay;
39 unsigned short closing_wait; /* time to wait before closing */
40 struct async_icount icount;
1da177e4 41 struct async_struct *info;
1da177e4
LT
42};
43
44struct async_struct {
1da177e4
LT
45 struct serial_state *state;
46 struct tty_struct *tty;
47 int read_status_mask;
48 int ignore_status_mask;
49 int timeout;
50 int quot;
51 int x_char; /* xon/xoff character */
1da177e4
LT
52 int IER; /* Interrupt Enable Register */
53 int MCR; /* Modem control register */
1da177e4
LT
54 int blocked_open; /* # of blocked opens */
55 struct circ_buf xmit;
1da177e4
LT
56 wait_queue_head_t open_wait;
57 wait_queue_head_t close_wait;
58 wait_queue_head_t delta_msr_wait;
1da177e4
LT
59 struct async_struct *next_port; /* For the linked list */
60 struct async_struct *prev_port;
61};
62
1da177e4 63#endif /* _LINUX_SERIAL_H */