summaryrefslogtreecommitdiffstats
path: root/include/linux/console.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2023-01-09 11:13:55 +0106
committerPetr Mladek <pmladek@suse.com>2023-01-11 15:35:11 +0100
commit02b2396d7d0cf806e80c887b4c799d482d6977ed (patch)
tree351f5fe7a1df3ba9ca4e653b05b01804e0792f54 /include/linux/console.h
parent717a5651b10940ec827fe07acfb956d906250b2b (diff)
downloadlinux-stable-02b2396d7d0cf806e80c887b4c799d482d6977ed.tar.gz
linux-stable-02b2396d7d0cf806e80c887b4c799d482d6977ed.tar.bz2
linux-stable-02b2396d7d0cf806e80c887b4c799d482d6977ed.zip
console: Document struct console
Add kerneldoc comments to struct console. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20230109100800.1085541-4-john.ogness@linutronix.de
Diffstat (limited to 'include/linux/console.h')
-rw-r--r--include/linux/console.h54
1 files changed, 37 insertions, 17 deletions
diff --git a/include/linux/console.h b/include/linux/console.h
index ed804dd7c2e8..1e36958aa656 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -164,24 +164,44 @@ enum cons_flags {
CON_EXTENDED = BIT(6),
};
+/**
+ * struct console - The console descriptor structure
+ * @name: The name of the console driver
+ * @write: Write callback to output messages (Optional)
+ * @read: Read callback for console input (Optional)
+ * @device: The underlying TTY device driver (Optional)
+ * @unblank: Callback to unblank the console (Optional)
+ * @setup: Callback for initializing the console (Optional)
+ * @exit: Callback for teardown of the console (Optional)
+ * @match: Callback for matching a console (Optional)
+ * @flags: Console flags. See enum cons_flags
+ * @index: Console index, e.g. port number
+ * @cflag: TTY control mode flags
+ * @ispeed: TTY input speed
+ * @ospeed: TTY output speed
+ * @seq: Sequence number of the next ringbuffer record to print
+ * @dropped: Number of unreported dropped ringbuffer records
+ * @data: Driver private data
+ * @node: hlist node for the console list
+ */
struct console {
- char name[16];
- void (*write)(struct console *, const char *, unsigned);
- int (*read)(struct console *, char *, unsigned);
- struct tty_driver *(*device)(struct console *, int *);
- void (*unblank)(void);
- int (*setup)(struct console *, char *);
- int (*exit)(struct console *);
- int (*match)(struct console *, char *name, int idx, char *options);
- short flags;
- short index;
- int cflag;
- uint ispeed;
- uint ospeed;
- u64 seq;
- unsigned long dropped;
- void *data;
- struct hlist_node node;
+ char name[16];
+ void (*write)(struct console *co, const char *s, unsigned int count);
+ int (*read)(struct console *co, char *s, unsigned int count);
+ struct tty_driver *(*device)(struct console *co, int *index);
+ void (*unblank)(void);
+ int (*setup)(struct console *co, char *options);
+ int (*exit)(struct console *co);
+ int (*match)(struct console *co, char *name, int idx, char *options);
+ short flags;
+ short index;
+ int cflag;
+ uint ispeed;
+ uint ospeed;
+ u64 seq;
+ unsigned long dropped;
+ void *data;
+ struct hlist_node node;
};
#ifdef CONFIG_LOCKDEP