xref: /linux/Documentation/driver-api/tty/tty_buffer.rst (revision a1c613ae4c322ddd58d5a8539dbfba2a0380a8c0)
1b96cd8b0SJiri Slaby.. SPDX-License-Identifier: GPL-2.0
2b96cd8b0SJiri Slaby
3b96cd8b0SJiri Slaby==========
4b96cd8b0SJiri SlabyTTY Buffer
5b96cd8b0SJiri Slaby==========
6b96cd8b0SJiri Slaby
7b96cd8b0SJiri Slaby.. contents:: :local:
8b96cd8b0SJiri Slaby
9b96cd8b0SJiri SlabyHere, we document functions for taking care of tty buffer and their flipping.
10b96cd8b0SJiri SlabyDrivers are supposed to fill the buffer by one of those functions below and
11b96cd8b0SJiri Slabythen flip the buffer, so that the data are passed to :doc:`line discipline
12b96cd8b0SJiri Slaby<tty_ldisc>` for further processing.
13b96cd8b0SJiri Slaby
14b96cd8b0SJiri SlabyFlip Buffer Management
15b96cd8b0SJiri Slaby======================
16b96cd8b0SJiri Slaby
17b96cd8b0SJiri Slaby.. kernel-doc:: drivers/tty/tty_buffer.c
18*b49a0ff7SJiri Slaby (SUSE)   :identifiers: tty_prepare_flip_string
19b96cd8b0SJiri Slaby           tty_flip_buffer_push tty_ldisc_receive_buf
20b96cd8b0SJiri Slaby
21c26405fdSJiri Slaby (SUSE).. kernel-doc:: include/linux/tty_flip.h
22c26405fdSJiri Slaby (SUSE)   :identifiers: tty_insert_flip_string_fixed_flag tty_insert_flip_string_flags
23*b49a0ff7SJiri Slaby (SUSE)           tty_insert_flip_char
24c26405fdSJiri Slaby (SUSE)
25b96cd8b0SJiri Slaby----
26b96cd8b0SJiri Slaby
27b96cd8b0SJiri SlabyOther Functions
28b96cd8b0SJiri Slaby===============
29b96cd8b0SJiri Slaby
30b96cd8b0SJiri Slaby.. kernel-doc:: drivers/tty/tty_buffer.c
31b96cd8b0SJiri Slaby   :identifiers: tty_buffer_space_avail tty_buffer_set_limit
32b96cd8b0SJiri Slaby
33b96cd8b0SJiri Slaby----
34b96cd8b0SJiri Slaby
35b96cd8b0SJiri SlabyBuffer Locking
36b96cd8b0SJiri Slaby==============
37b96cd8b0SJiri Slaby
38b96cd8b0SJiri SlabyThese are used only in special circumstances. Avoid them.
39b96cd8b0SJiri Slaby
40b96cd8b0SJiri Slaby.. kernel-doc:: drivers/tty/tty_buffer.c
41b96cd8b0SJiri Slaby   :identifiers: tty_buffer_lock_exclusive tty_buffer_unlock_exclusive
42b96cd8b0SJiri Slaby
43b96cd8b0SJiri Slaby----
44b96cd8b0SJiri Slaby
45b96cd8b0SJiri SlabyInternal Functions
46b96cd8b0SJiri Slaby==================
47b96cd8b0SJiri Slaby
48b96cd8b0SJiri Slaby.. kernel-doc:: drivers/tty/tty_buffer.c
49b96cd8b0SJiri Slaby   :internal:
50