Lines Matching defs:console

2  *  linux/include/linux/console.h
40 * @owner: the module to get references of when this console is used
41 * @con_startup: set up the console and return its name (like VGA, EGA, ...)
42 * @con_init: initialize the console on @vc. @init is true for the very first
44 * @con_deinit: deinitialize the console from @vc.
52 * Invoked by csi_M and printing to the console.
53 * @con_switch: notifier about the console switch; it is supposed to return
55 * @con_blank: blank/unblank the console. The target mode is passed in @blank.
58 * @con_font_set: set console @vc font to @font with height @vpitch. @flags can
64 * @con_resize: resize the @vc console to @width x @height. @from_user is true
66 * @con_set_palette: sets the palette of the console @vc to @table (optional)
67 * @con_scrolldelta: the contents of the console should be scrolled by @lines.
79 * @con_debug_enter: prepare the console for the debugger. This includes, but
80 * is not limited to, unblanking the console, loading an
83 * @con_debug_leave: restore the console to its pre-debug state as closely as
129 extern const struct consw dummy_con; /* dummy console buffer */
130 extern const struct consw vga_con; /* VGA text console */
131 extern const struct consw newport_con; /* SGI Newport console */
153 * The interface for a console, or any other device that wants to capture
154 * console messages (printer driver?)
158 * enum cons_flags - General console flags
162 * @CON_CONSDEV: Indicates that the console driver is backing
163 * /dev/console.
164 * @CON_ENABLED: Indicates if a console is allowed to print records. If
165 * false, the console also will not advance to later
167 * @CON_BOOT: Marks the console driver as early console driver which
170 * when the real console driver is registered unless
173 * that the legacy @console::write callback can be invoked
180 * @CON_EXTENDED: The console supports the extended output format of
182 * @CON_SUSPENDED: Indicates if a console is suspended. If true, the
200 * struct nbcon_state - console state for nbcon consoles
207 * past. The console cannot be safe until re-initialized.
211 * state variable @console::nbcon_state.
232 * are stored in the @console::nbcon_state variable. Ensure this struct stays
239 * enum nbcon_prio - console owner priority for nbcon consoles
246 * A higher priority context can takeover the console when it is
258 struct console;
262 * struct nbcon_context - Context for console acquire/release
263 * @console: The associated console
268 * might cause a system freeze when the console
276 struct console *console;
291 * @ctxt: The core console context
304 * struct console - The console descriptor structure
305 * @name: The name of the console driver
307 * @read: Read callback for console input (Optional)
309 * @unblank: Callback to unblank the console (Optional)
310 * @setup: Callback for initializing the console (Optional)
311 * @exit: Callback for teardown of the console (Optional)
312 * @match: Callback for matching a console (Optional)
321 * @node: hlist node for the console list
328 struct console {
330 void (*write)(struct console *co, const char *s, unsigned int count);
331 int (*read)(struct console *co, char *s, unsigned int count);
332 struct tty_driver *(*device)(struct console *co, int *index);
334 int (*setup)(struct console *co, char *options);
335 int (*exit)(struct console *co);
336 int (*match)(struct console *co, char *name, int idx, char *options);
347 /* nbcon console specific members */
348 bool (*write_atomic)(struct console *con,
381 * console_srcu_read_flags - Locklessly read the console flags
382 * @con: struct console pointer of console to read flags from
385 * notation for locklessly reading the console flags. The READ_ONCE()
389 * Only use this function to read console flags when locklessly
390 * iterating the console list via srcu.
394 static inline short console_srcu_read_flags(const struct console *con)
399 * Locklessly reading console->flags provides a consistent
401 * console->flags and that CPU is using only read-modify-write
408 * console_srcu_write_flags - Write flags for a registered console
409 * @con: struct console pointer of console to write flags to
417 static inline void console_srcu_write_flags(struct console *con, short flags)
426 static inline bool console_is_registered_locked(const struct console *con)
433 * console_is_registered - Check if the console is registered
434 * @con: struct console pointer of console to check
436 * Context: Process context. May sleep while acquiring console list lock.
437 * Return: true if the console is in the console list, otherwise false.
439 * If false is returned for a console that was previously registered, it
440 * can be assumed that the console's unregistration is fully completed,
441 * including the exit() callback after console list removal.
443 static inline bool console_is_registered(const struct console *con)
455 * @con: struct console pointer used as loop cursor
457 * Although SRCU guarantees the console list will be consistent, the
458 * struct console fields may be updated by other CPUs while iterating.
469 * @con: struct console pointer used as loop cursor
471 * The console list and the &console.flags are immutable while iterating.
490 extern struct console *early_console;
498 extern void console_force_preferred_locked(struct console *con);
499 extern void register_console(struct console *);
500 extern int unregister_console(struct console *);
508 extern void console_stop(struct console *);
509 extern void console_start(struct console *);
511 extern int braille_register_console(struct console *, int index,
513 extern int braille_unregister_console(struct console *);
522 /* Suspend and resume console messages over PM events */
543 /* For deferred console takeover */