diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/generic_serial.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/linux/generic_serial.h')
-rw-r--r-- | include/linux/generic_serial.h | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/include/linux/generic_serial.h b/include/linux/generic_serial.h new file mode 100644 index 000000000000..0abe9d9a0069 --- /dev/null +++ b/include/linux/generic_serial.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * generic_serial.h | ||
3 | * | ||
4 | * Copyright (C) 1998 R.E.Wolff@BitWizard.nl | ||
5 | * | ||
6 | * written for the SX serial driver. | ||
7 | * Contains the code that should be shared over all the serial drivers. | ||
8 | * | ||
9 | * Version 0.1 -- December, 1998. | ||
10 | */ | ||
11 | |||
12 | #ifndef GENERIC_SERIAL_H | ||
13 | #define GENERIC_SERIAL_H | ||
14 | |||
15 | struct real_driver { | ||
16 | void (*disable_tx_interrupts) (void *); | ||
17 | void (*enable_tx_interrupts) (void *); | ||
18 | void (*disable_rx_interrupts) (void *); | ||
19 | void (*enable_rx_interrupts) (void *); | ||
20 | int (*get_CD) (void *); | ||
21 | void (*shutdown_port) (void*); | ||
22 | int (*set_real_termios) (void*); | ||
23 | int (*chars_in_buffer) (void*); | ||
24 | void (*close) (void*); | ||
25 | void (*hungup) (void*); | ||
26 | void (*getserial) (void*, struct serial_struct *sp); | ||
27 | }; | ||
28 | |||
29 | |||
30 | |||
31 | struct gs_port { | ||
32 | int magic; | ||
33 | unsigned char *xmit_buf; | ||
34 | int xmit_head; | ||
35 | int xmit_tail; | ||
36 | int xmit_cnt; | ||
37 | struct semaphore port_write_sem; | ||
38 | int flags; | ||
39 | wait_queue_head_t open_wait; | ||
40 | wait_queue_head_t close_wait; | ||
41 | int count; | ||
42 | int blocked_open; | ||
43 | struct tty_struct *tty; | ||
44 | unsigned long event; | ||
45 | unsigned short closing_wait; | ||
46 | int close_delay; | ||
47 | struct real_driver *rd; | ||
48 | int wakeup_chars; | ||
49 | int baud_base; | ||
50 | int baud; | ||
51 | int custom_divisor; | ||
52 | spinlock_t driver_lock; | ||
53 | }; | ||
54 | |||
55 | |||
56 | /* Flags */ | ||
57 | /* Warning: serial.h defines some ASYNC_ flags, they say they are "only" | ||
58 | used in serial.c, but they are also used in all other serial drivers. | ||
59 | Make sure they don't clash with these here... */ | ||
60 | #define GS_TX_INTEN 0x00800000 | ||
61 | #define GS_RX_INTEN 0x00400000 | ||
62 | #define GS_ACTIVE 0x00200000 | ||
63 | |||
64 | |||
65 | |||
66 | #define GS_TYPE_NORMAL 1 | ||
67 | |||
68 | #define GS_DEBUG_FLUSH 0x00000001 | ||
69 | #define GS_DEBUG_BTR 0x00000002 | ||
70 | #define GS_DEBUG_TERMIOS 0x00000004 | ||
71 | #define GS_DEBUG_STUFF 0x00000008 | ||
72 | #define GS_DEBUG_CLOSE 0x00000010 | ||
73 | #define GS_DEBUG_FLOW 0x00000020 | ||
74 | #define GS_DEBUG_WRITE 0x00000040 | ||
75 | |||
76 | |||
77 | void gs_put_char(struct tty_struct *tty, unsigned char ch); | ||
78 | int gs_write(struct tty_struct *tty, | ||
79 | const unsigned char *buf, int count); | ||
80 | int gs_write_room(struct tty_struct *tty); | ||
81 | int gs_chars_in_buffer(struct tty_struct *tty); | ||
82 | void gs_flush_buffer(struct tty_struct *tty); | ||
83 | void gs_flush_chars(struct tty_struct *tty); | ||
84 | void gs_stop(struct tty_struct *tty); | ||
85 | void gs_start(struct tty_struct *tty); | ||
86 | void gs_hangup(struct tty_struct *tty); | ||
87 | int gs_block_til_ready(void *port, struct file *filp); | ||
88 | void gs_close(struct tty_struct *tty, struct file *filp); | ||
89 | void gs_set_termios (struct tty_struct * tty, | ||
90 | struct termios * old_termios); | ||
91 | int gs_init_port(struct gs_port *port); | ||
92 | int gs_setserial(struct gs_port *port, struct serial_struct __user *sp); | ||
93 | int gs_getserial(struct gs_port *port, struct serial_struct __user *sp); | ||
94 | void gs_got_break(struct gs_port *port); | ||
95 | |||
96 | #endif | ||