drivers/tty/tty.h

Source file repositories/reference/linux-study-clean/drivers/tty/tty.h

File Facts

System
Linux kernel
Corpus path
drivers/tty/tty.h
Extension
.h
Size
4464 bytes
Lines
126
Domain
Driver Families
Bucket
drivers/tty
Inferred role
Driver Families: operation-table or driver-model contract
Status
pattern implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

void tty_default_fops(struct file_operations *fops);
struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx);
int tty_alloc_file(struct file *file);
void tty_add_file(struct tty_struct *tty, struct file *file);
void tty_free_file(struct file *file);
int tty_release(struct inode *inode, struct file *filp);

#define tty_is_writelocked(tty)  (mutex_is_locked(&tty->atomic_write_lock))

int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty);
void tty_ldisc_release(struct tty_struct *tty);
int __must_check tty_ldisc_init(struct tty_struct *tty);
void tty_ldisc_deinit(struct tty_struct *tty);

extern int tty_ldisc_autoload;

/* tty_audit.c */
#ifdef CONFIG_AUDIT
void tty_audit_add_data(const struct tty_struct *tty, const void *data,
			size_t size);
void tty_audit_tiocsti(const struct tty_struct *tty, u8 ch);
#else
static inline void tty_audit_add_data(const struct tty_struct *tty,
				      const void *data, size_t size)
{
}
static inline void tty_audit_tiocsti(const struct tty_struct *tty, u8 ch)
{
}
#endif

ssize_t redirected_tty_write(struct kiocb *, struct iov_iter *);

int tty_insert_flip_string_and_push_buffer(struct tty_port *port,
					   const u8 *chars, size_t cnt);

#endif

Annotation

Implementation Notes