2 * linux/drivers/video/dummycon.c -- A dummy console driver
4 * To be used if there's no other console driver (e.g. for plain VGA text)
5 * available, usually until fbcon takes console over.
8 #include <linux/types.h>
9 #include <linux/kdev_t.h>
10 #include <linux/tty.h>
11 #include <linux/console.h>
12 #include <linux/console_struct.h>
13 #include <linux/vt_kern.h>
14 #include <linux/init.h>
17 * Dummy console driver
21 #define DUMMY_COLUMNS ORIG_VIDEO_COLS
22 #define DUMMY_ROWS ORIG_VIDEO_LINES
24 #define DUMMY_COLUMNS 80
28 static const char *dummycon_startup(void)
30 return "dummy device";
33 static void dummycon_init(struct vc_data
*conp
, int init
)
35 conp
->vc_can_do_color
= 1;
37 conp
->vc_cols
= DUMMY_COLUMNS
;
38 conp
->vc_rows
= DUMMY_ROWS
;
40 vc_resize_con(DUMMY_ROWS
, DUMMY_COLUMNS
, conp
->vc_num
);
43 static int dummycon_dummy(void)
49 * The console `switch' structure for the dummy console
51 * Most of the operations are dummies.
54 struct consw dummy_con
= {
55 dummycon_startup
, dummycon_init
,
56 (void *)dummycon_dummy
, /* con_deinit */
57 (void *)dummycon_dummy
, /* con_clear */
58 (void *)dummycon_dummy
, /* con_putc */
59 (void *)dummycon_dummy
, /* con_putcs */
60 (void *)dummycon_dummy
, /* con_cursor */
61 (void *)dummycon_dummy
, /* con_scroll */
62 (void *)dummycon_dummy
, /* con_bmove */
63 (void *)dummycon_dummy
, /* con_switch */
64 (void *)dummycon_dummy
, /* con_blank */
65 (void *)dummycon_dummy
, /* con_font_op */
66 (void *)dummycon_dummy
, /* con_set_palette */
67 (void *)dummycon_dummy
, /* con_scrolldelta */
68 NULL
, /* con_set_origin */
69 NULL
, /* con_save_screen */