diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2008-04-17 14:05:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 14:05:37 -0400 |
commit | f2d937f3bf00665ccf048b3b6616ef95859b0945 (patch) | |
tree | 6136ded0706be0d39a09a0a912e8f79a4ab63322 /include/linux/tty_driver.h | |
parent | dc7d552705215ac50a0617fcf51bb9c736255b8e (diff) |
consoles: polling support, kgdboc
polled console handling support, to access a console in an irq-less
way while in debug or irq context.
absolutely zero impact as long as CONFIG_CONSOLE_POLL is disabled.
(which is the default)
[ jan.kiszka@siemens.com: lots of cleanups ]
[ mingo@elte.hu: redesign, splitups, cleanups. ]
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/tty_driver.h')
-rw-r--r-- | include/linux/tty_driver.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 85c95cd39bc3..21f69aca4505 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -125,6 +125,7 @@ | |||
125 | #include <linux/cdev.h> | 125 | #include <linux/cdev.h> |
126 | 126 | ||
127 | struct tty_struct; | 127 | struct tty_struct; |
128 | struct tty_driver; | ||
128 | 129 | ||
129 | struct tty_operations { | 130 | struct tty_operations { |
130 | int (*open)(struct tty_struct * tty, struct file * filp); | 131 | int (*open)(struct tty_struct * tty, struct file * filp); |
@@ -157,6 +158,11 @@ struct tty_operations { | |||
157 | int (*tiocmget)(struct tty_struct *tty, struct file *file); | 158 | int (*tiocmget)(struct tty_struct *tty, struct file *file); |
158 | int (*tiocmset)(struct tty_struct *tty, struct file *file, | 159 | int (*tiocmset)(struct tty_struct *tty, struct file *file, |
159 | unsigned int set, unsigned int clear); | 160 | unsigned int set, unsigned int clear); |
161 | #ifdef CONFIG_CONSOLE_POLL | ||
162 | int (*poll_init)(struct tty_driver *driver, int line, char *options); | ||
163 | int (*poll_get_char)(struct tty_driver *driver, int line); | ||
164 | void (*poll_put_char)(struct tty_driver *driver, int line, char ch); | ||
165 | #endif | ||
160 | }; | 166 | }; |
161 | 167 | ||
162 | struct tty_driver { | 168 | struct tty_driver { |
@@ -220,6 +226,11 @@ struct tty_driver { | |||
220 | int (*tiocmget)(struct tty_struct *tty, struct file *file); | 226 | int (*tiocmget)(struct tty_struct *tty, struct file *file); |
221 | int (*tiocmset)(struct tty_struct *tty, struct file *file, | 227 | int (*tiocmset)(struct tty_struct *tty, struct file *file, |
222 | unsigned int set, unsigned int clear); | 228 | unsigned int set, unsigned int clear); |
229 | #ifdef CONFIG_CONSOLE_POLL | ||
230 | int (*poll_init)(struct tty_driver *driver, int line, char *options); | ||
231 | int (*poll_get_char)(struct tty_driver *driver, int line); | ||
232 | void (*poll_put_char)(struct tty_driver *driver, int line, char ch); | ||
233 | #endif | ||
223 | 234 | ||
224 | struct list_head tty_drivers; | 235 | struct list_head tty_drivers; |
225 | }; | 236 | }; |
@@ -230,6 +241,7 @@ struct tty_driver *alloc_tty_driver(int lines); | |||
230 | void put_tty_driver(struct tty_driver *driver); | 241 | void put_tty_driver(struct tty_driver *driver); |
231 | void tty_set_operations(struct tty_driver *driver, | 242 | void tty_set_operations(struct tty_driver *driver, |
232 | const struct tty_operations *op); | 243 | const struct tty_operations *op); |
244 | extern struct tty_driver *tty_find_polling_driver(char *name, int *line); | ||
233 | 245 | ||
234 | /* tty driver magic number */ | 246 | /* tty driver magic number */ |
235 | #define TTY_DRIVER_MAGIC 0x5402 | 247 | #define TTY_DRIVER_MAGIC 0x5402 |