Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
tty_driver.h File Reference
#include <linux/export.h>
#include <linux/fs.h>
#include <linux/list.h>
#include <linux/cdev.h>
#include <linux/termios.h>

Go to the source code of this file.

Data Structures

struct  tty_operations
 
struct  tty_driver
 

Macros

#define tty_alloc_driver(lines, flags)   __tty_alloc_driver(lines, THIS_MODULE, flags)
 
#define TTY_DRIVER_MAGIC   0x5402
 
#define TTY_DRIVER_INSTALLED   0x0001
 
#define TTY_DRIVER_RESET_TERMIOS   0x0002
 
#define TTY_DRIVER_REAL_RAW   0x0004
 
#define TTY_DRIVER_DYNAMIC_DEV   0x0008
 
#define TTY_DRIVER_DEVPTS_MEM   0x0010
 
#define TTY_DRIVER_HARDWARE_BREAK   0x0020
 
#define TTY_DRIVER_DYNAMIC_ALLOC   0x0040
 
#define TTY_DRIVER_UNNUMBERED_NODE   0x0080
 
#define TTY_DRIVER_TYPE_SYSTEM   0x0001
 
#define TTY_DRIVER_TYPE_CONSOLE   0x0002
 
#define TTY_DRIVER_TYPE_SERIAL   0x0003
 
#define TTY_DRIVER_TYPE_PTY   0x0004
 
#define TTY_DRIVER_TYPE_SCC   0x0005 /* scc driver */
 
#define TTY_DRIVER_TYPE_SYSCONS   0x0006
 
#define SYSTEM_TYPE_TTY   0x0001
 
#define SYSTEM_TYPE_CONSOLE   0x0002
 
#define SYSTEM_TYPE_SYSCONS   0x0003
 
#define SYSTEM_TYPE_SYSPTMX   0x0004
 
#define PTY_TYPE_MASTER   0x0001
 
#define PTY_TYPE_SLAVE   0x0002
 
#define SERIAL_TYPE_NORMAL   1
 

Functions

struct tty_driver__tty_alloc_driver (unsigned int lines, struct module *owner, unsigned long flags)
 
void put_tty_driver (struct tty_driver *driver)
 
void tty_set_operations (struct tty_driver *driver, const struct tty_operations *op)
 
struct tty_drivertty_find_polling_driver (char *name, int *line)
 
void tty_driver_kref_put (struct tty_driver *driver)
 

Variables

struct list_head tty_drivers
 

Macro Definition Documentation

#define PTY_TYPE_MASTER   0x0001

Definition at line 427 of file tty_driver.h.

#define PTY_TYPE_SLAVE   0x0002

Definition at line 428 of file tty_driver.h.

#define SERIAL_TYPE_NORMAL   1

Definition at line 431 of file tty_driver.h.

#define SYSTEM_TYPE_CONSOLE   0x0002

Definition at line 422 of file tty_driver.h.

#define SYSTEM_TYPE_SYSCONS   0x0003

Definition at line 423 of file tty_driver.h.

#define SYSTEM_TYPE_SYSPTMX   0x0004

Definition at line 424 of file tty_driver.h.

#define SYSTEM_TYPE_TTY   0x0001

Definition at line 421 of file tty_driver.h.

#define tty_alloc_driver (   lines,
  flags 
)    __tty_alloc_driver(lines, THIS_MODULE, flags)

Definition at line 335 of file tty_driver.h.

#define TTY_DRIVER_DEVPTS_MEM   0x0010

Definition at line 407 of file tty_driver.h.

#define TTY_DRIVER_DYNAMIC_ALLOC   0x0040

Definition at line 409 of file tty_driver.h.

#define TTY_DRIVER_DYNAMIC_DEV   0x0008

Definition at line 406 of file tty_driver.h.

#define TTY_DRIVER_HARDWARE_BREAK   0x0020

Definition at line 408 of file tty_driver.h.

#define TTY_DRIVER_INSTALLED   0x0001

Definition at line 403 of file tty_driver.h.

#define TTY_DRIVER_MAGIC   0x5402

Definition at line 357 of file tty_driver.h.

#define TTY_DRIVER_REAL_RAW   0x0004

Definition at line 405 of file tty_driver.h.

#define TTY_DRIVER_RESET_TERMIOS   0x0002

Definition at line 404 of file tty_driver.h.

#define TTY_DRIVER_TYPE_CONSOLE   0x0002

Definition at line 414 of file tty_driver.h.

#define TTY_DRIVER_TYPE_PTY   0x0004

Definition at line 416 of file tty_driver.h.

#define TTY_DRIVER_TYPE_SCC   0x0005 /* scc driver */

Definition at line 417 of file tty_driver.h.

#define TTY_DRIVER_TYPE_SERIAL   0x0003

Definition at line 415 of file tty_driver.h.

#define TTY_DRIVER_TYPE_SYSCONS   0x0006

Definition at line 418 of file tty_driver.h.

#define TTY_DRIVER_TYPE_SYSTEM   0x0001

Definition at line 413 of file tty_driver.h.

#define TTY_DRIVER_UNNUMBERED_NODE   0x0080

Definition at line 410 of file tty_driver.h.

Function Documentation

struct tty_driver* __tty_alloc_driver ( unsigned int  lines,
struct module owner,
unsigned long  flags 
)
read

__tty_alloc_driver – allocate tty driver : count of lines this driver can handle at most : module which is repsonsible for this driver : some of TTY_DRIVER_* flags, will be set in driver->flags

This should not be called directly, some of the provided macros should be used instead. Use IS_ERR and friends on

Return values

Definition at line 3147 of file tty_io.c.

void put_tty_driver ( struct tty_driver driver)

Definition at line 3249 of file tty_io.c.

void tty_driver_kref_put ( struct tty_driver driver)

Definition at line 3236 of file tty_io.c.

struct tty_driver* tty_find_polling_driver ( char name,
int line 
)
read
void tty_set_operations ( struct tty_driver driver,
const struct tty_operations op 
)

Definition at line 3242 of file tty_io.c.

Variable Documentation

struct list_head tty_drivers