- struct module *owner;
The module owner for this driver.
- int magic;
The "magic" value for this
structure. Should always be set to
TTY_DRIVER_MAGIC. Is initialized in the
- const char *driver_name;
Name of the driver, used in /proc/tty and sysfs.
- const char *name;
Node name of the driver.
- int name_base;
Starting number to use when creating names for devices. This is used
when the kernel creates a string representation of a specific tty
device assigned to the tty driver.
- short major;
Major number for the driver.
- short minor_start;
Starting minor number for the driver. This is usually set to the same
value as name_base. Typically, this value is set
- short num;
Number of minor numbers assigned to the driver. If an entire major
number range is used by the driver, this value should be set to 255.
This variable is initialized in the
- short type;
- short subtype;
Describe what kind of tty driver is being registered with the tty
core. The value of subtype depends on the
type. The type field can be:
Used internally by the tty subsystem to remember that it is dealing
with an internal tty driver. subtype should be set
SYSTEM_TYPE_SYSPTMX. This type should not be used
by any "normal" tty driver.
Used only by the console driver.
Used by any serial type driver. subtype should be
set to SERIAL_TYPE_NORMAL or
SERIAL_TYPE_CALLOUT, depending on which type your
driver is. This is one of the most common settings for the
Used by the pseudo terminal interface (pty).
subtype needs to be set to either
- struct termios init_termios;
Initial struct termios values for the device when it is created.
- int flags;
Driver flags, as described earlier in this chapter.
- struct proc_dir_entry *proc_entry;
This driver's /proc entry
structure. It is created by the tty core if the driver implements the
write_proc or read_proc
functions. This field should not be set by the tty driver itself.
- struct tty_driver *other;
Pointer to a tty slave driver. This is used only by the pty driver
and should not be used by any other tty driver.
- void *driver_state;
Internal state of the tty driver. Should be used only by the pty
- struct tty_driver *next;
- struct tty_driver *prev;
Linking variables. These variables are used by the tty core to chain
all of the different tty drivers together, and should not be touched
by any tty driver.