3 * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 #include <linux/list.h>
33 #define DEV_FLAGS_INPUT 0x00000001 /* Device can be used as input console */
34 #define DEV_FLAGS_OUTPUT 0x00000002 /* Device can be used as output console */
35 #define DEV_FLAGS_SYSTEM 0x80000000 /* Device is a system device */
36 #define DEV_EXT_VIDEO 0x00000001 /* Video extensions supported */
38 /* Device information */
40 int flags; /* Device flags: input/output/system */
41 int ext; /* Supported extensions */
42 char name[16]; /* Device name */
44 /* GENERAL functions */
46 int (*start) (void); /* To start the device */
47 int (*stop) (void); /* To stop the device */
49 /* OUTPUT functions */
51 void (*putc) (const char c); /* To put a char */
52 void (*puts) (const char *s); /* To put a string (accelerator) */
56 int (*tstc) (void); /* To test if a char is ready... */
57 int (*getc) (void); /* To get that char */
61 void *priv; /* Private extensions */
62 struct list_head list;
68 #define VIDEO_FORMAT_RGB_INDEXED 0x0000
69 #define VIDEO_FORMAT_RGB_DIRECTCOLOR 0x0001
70 #define VIDEO_FORMAT_YUYV_4_4_4 0x0010
71 #define VIDEO_FORMAT_YUYV_4_2_2 0x0011
74 void *address; /* Address of framebuffer */
75 ushort width; /* Horizontal resolution */
76 ushort height; /* Vertical resolution */
77 uchar format; /* Format */
78 uchar colors; /* Colors number or color depth */
79 void (*setcolreg) (int, int, int, int);
80 void (*getcolreg) (int, void *);
86 extern device_t *stdio_devices[];
87 extern char *stdio_names[MAX_FILES];
92 int device_register (device_t * dev);
93 int devices_init (void);
94 int device_deregister(char *devname);
95 struct list_head* device_get_list(void);
96 device_t* device_get_by_name(char* name);
97 device_t* device_clone(device_t *dev);
100 int drv_lcd_init (void);
103 int drv_vfd_init (void);
105 #if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE)
106 int drv_video_init (void);
108 #ifdef CONFIG_KEYBOARD
109 int drv_keyboard_init (void);
111 #ifdef CONFIG_USB_TTY
112 int drv_usbtty_init (void);
114 #ifdef CONFIG_NETCONSOLE
115 int drv_nc_init (void);
118 #endif /* _DEVICES_H_ */