History

Merge tag 'tty-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty and serial driver updates from Greg KH: "Here is the big set of tty and serial driver updates for 5.19-rc1. Lots of tiny cleanups in here, the major stuff is: - termbit cleanups and unification by Ilpo. A much needed change that goes a long way to making things simpler for all of the different arches - tty documentation cleanups and movements to their own place in the documentation tree - old tty driver cleanups and fixes from Jiri to bring some existing drivers into the modern world - RS485 cleanups and unifications to make it easier for individual drivers to support this mode instead of having to duplicate logic in each driver - Lots of 8250 driver updates and additions - new device id additions - n_gsm continued fixes and cleanups - other minor serial driver updates and cleanups All of these have been in linux-next for weeks with no reported issues" * tag 'tty-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (166 commits) tty: Rework receive flow control char logic pcmcia: synclink_cs: Don't allow CS5-6 serial: stm32-usart: Correct CSIZE, bits, and parity serial: st-asc: Sanitize CSIZE and correct PARENB for CS7 serial: sifive: Sanitize CSIZE and c_iflag serial: sh-sci: Don't allow CS5-6 serial: txx9: Don't allow CS5-6 serial: rda-uart: Don't allow CS5-6 serial: digicolor-usart: Don't allow CS5-6 serial: uartlite: Fix BRKINT clearing serial: cpm_uart: Fix build error without CONFIG_SERIAL_CPM_CONSOLE serial: core: Do stop_rx in suspend path for console if console_suspend is disabled tty: serial: qcom-geni-serial: Remove uart frequency table. Instead, find suitable frequency with call to clk_round_rate. dt-bindings: serial: renesas,em-uart: Add RZ/V2M clock to access the registers serial: 8250_fintek: Check SER_RS485_RTS_* only with RS485 Revert "serial: 8250_mtk: Make sure to select the right FEATURE_SEL" serial: msm_serial: disable interrupts in __msm_console_write() serial: meson: acquire port->lock in startup() serial: 8250_dw: Use dev_err_probe() serial: 8250_dw: Use devm_add_action_or_reset() ...

Linus Torvalds committed 4 years ago

Commit 932c2982 parents 4ad680f 25e02ba114 files · +3164 −2451Browse files

Showing the changes to include/uapi (2 of 114 files). Show all

Unified · Split

2 files
  1. include/uapi/asm-generic/termbits-common.h +65 −0
  2. include/uapi/asm-generic/termbits.h +94 −145
include/uapi/asm-generic/termbits-common.h+65−0
@@ -0,0 +1,65 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef __ASM_GENERIC_TERMBITS_COMMON_H
3#define __ASM_GENERIC_TERMBITS_COMMON_H
4
5typedef unsigned char cc_t;
6typedef unsigned int speed_t;
7
8/* c_iflag bits */
9#define IGNBRK 0x001 /* Ignore break condition */
10#define BRKINT 0x002 /* Signal interrupt on break */
11#define IGNPAR 0x004 /* Ignore characters with parity errors */
12#define PARMRK 0x008 /* Mark parity and framing errors */
13#define INPCK 0x010 /* Enable input parity check */
14#define ISTRIP 0x020 /* Strip 8th bit off characters */
15#define INLCR 0x040 /* Map NL to CR on input */
16#define IGNCR 0x080 /* Ignore CR */
17#define ICRNL 0x100 /* Map CR to NL on input */
18#define IXANY 0x800 /* Any character will restart after stop */
19
20/* c_oflag bits */
21#define OPOST 0x01 /* Perform output processing */
22#define OCRNL 0x08
23#define ONOCR 0x10
24#define ONLRET 0x20
25#define OFILL 0x40
26#define OFDEL 0x80
27
28/* c_cflag bit meaning */
29/* Common CBAUD rates */
30#define B0 0x00000000 /* hang up */
31#define B50 0x00000001
32#define B75 0x00000002
33#define B110 0x00000003
34#define B134 0x00000004
35#define B150 0x00000005
36#define B200 0x00000006
37#define B300 0x00000007
38#define B600 0x00000008
39#define B1200 0x00000009
40#define B1800 0x0000000a
41#define B2400 0x0000000b
42#define B4800 0x0000000c
43#define B9600 0x0000000d
44#define B19200 0x0000000e
45#define B38400 0x0000000f
46#define EXTA B19200
47#define EXTB B38400
48
49#define CMSPAR 0x40000000 /* mark or space (stick) parity */
50#define CRTSCTS 0x80000000 /* flow control */
51
52#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
53
54/* tcflow() ACTION argument and TCXONC use these */
55#define TCOOFF 0 /* Suspend output */
56#define TCOON 1 /* Restart suspended output */
57#define TCIOFF 2 /* Send a STOP character */
58#define TCION 3 /* Send a START character */
59
60/* tcflush() QUEUE_SELECTOR argument and TCFLSH use these */
61#define TCIFLUSH 0 /* Discard data received but not yet read */
62#define TCOFLUSH 1 /* Discard data written but not yet sent */
63#define TCIOFLUSH 2 /* Discard all pending data */
64
65#endif /* __ASM_GENERIC_TERMBITS_COMMON_H */
include/uapi/asm-generic/termbits.h+94−145
@@ -2,10 +2,8 @@ · 1 unmodified line
2#ifndef __ASM_GENERIC_TERMBITS_H2#ifndef __ASM_GENERIC_TERMBITS_H
3#define __ASM_GENERIC_TERMBITS_H3#define __ASM_GENERIC_TERMBITS_H
4 4
5#include <linux/posix_types.h>5#include <asm-generic/termbits-common.h>
6 6
7typedef unsigned char cc_t;
8typedef unsigned int speed_t;
9typedef unsigned int tcflag_t;7typedef unsigned int tcflag_t;
10 8
11#define NCCS 199#define NCCS 19
@@ -41,156 +39,107 @@ struct ktermios { · 29 unmodified lines
41};39};
42 40
43/* c_cc characters */41/* c_cc characters */
44#define VINTR 042#define VINTR 0
45#define VQUIT 143#define VQUIT 1
46#define VERASE 244#define VERASE 2
47#define VKILL 345#define VKILL 3
48#define VEOF 446#define VEOF 4
49#define VTIME 547#define VTIME 5
50#define VMIN 648#define VMIN 6
51#define VSWTC 749#define VSWTC 7
52#define VSTART 850#define VSTART 8
53#define VSTOP 951#define VSTOP 9
54#define VSUSP 1052#define VSUSP 10
55#define VEOL 1153#define VEOL 11
56#define VREPRINT 1254#define VREPRINT 12
57#define VDISCARD 1355#define VDISCARD 13
58#define VWERASE 1456#define VWERASE 14
59#define VLNEXT 1557#define VLNEXT 15
60#define VEOL2 1658#define VEOL2 16
61 59
62/* c_iflag bits */60/* c_iflag bits */
63#define IGNBRK 000000161#define IUCLC 0x0200
64#define BRKINT 000000262#define IXON 0x0400
65#define IGNPAR 000000463#define IXOFF 0x1000
66#define PARMRK 000001064#define IMAXBEL 0x2000
67#define INPCK 000002065#define IUTF8 0x4000
68#define ISTRIP 0000040
69#define INLCR 0000100
70#define IGNCR 0000200
71#define ICRNL 0000400
72#define IUCLC 0001000
73#define IXON 0002000
74#define IXANY 0004000
75#define IXOFF 0010000
76#define IMAXBEL 0020000
77#define IUTF8 0040000
78 66
79/* c_oflag bits */67/* c_oflag bits */
80#define OPOST 000000168#define OLCUC 0x00002
81#define OLCUC 000000269#define ONLCR 0x00004
82#define ONLCR 000000470#define NLDLY 0x00100
83#define OCRNL 000001071#define NL0 0x00000
84#define ONOCR 000002072#define NL1 0x00100
85#define ONLRET 000004073#define CRDLY 0x00600
86#define OFILL 000010074#define CR0 0x00000
87#define OFDEL 000020075#define CR1 0x00200
88#define NLDLY 000040076#define CR2 0x00400
89#define NL0 000000077#define CR3 0x00600
90#define NL1 000040078#define TABDLY 0x01800
91#define CRDLY 000300079#define TAB0 0x00000
92#define CR0 000000080#define TAB1 0x00800
93#define CR1 000100081#define TAB2 0x01000
94#define CR2 000200082#define TAB3 0x01800
95#define CR3 000300083#define XTABS 0x01800
96#define TABDLY 001400084#define BSDLY 0x02000
97#define TAB0 000000085#define BS0 0x00000
98#define TAB1 000400086#define BS1 0x02000
99#define TAB2 001000087#define VTDLY 0x04000
100#define TAB3 001400088#define VT0 0x00000
101#define XTABS 001400089#define VT1 0x04000
102#define BSDLY 002000090#define FFDLY 0x08000
103#define BS0 000000091#define FF0 0x00000
104#define BS1 002000092#define FF1 0x08000
105#define VTDLY 0040000
106#define VT0 0000000
107#define VT1 0040000
108#define FFDLY 0100000
109#define FF0 0000000
110#define FF1 0100000
111 93
112/* c_cflag bit meaning */94/* c_cflag bit meaning */
113#define CBAUD 001001795#define CBAUD 0x0000100f
114#define B0 0000000 /* hang up */96#define CSIZE 0x00000030
115#define B50 000000197#define CS5 0x00000000
116#define B75 000000298#define CS6 0x00000010
117#define B110 000000399#define CS7 0x00000020
118#define B134 0000004100#define CS8 0x00000030
119#define B150 0000005101#define CSTOPB 0x00000040
120#define B200 0000006102#define CREAD 0x00000080
121#define B300 0000007103#define PARENB 0x00000100
122#define B600 0000010104#define PARODD 0x00000200
123#define B1200 0000011105#define HUPCL 0x00000400
124#define B1800 0000012106#define CLOCAL 0x00000800
125#define B2400 0000013107#define CBAUDEX 0x00001000
126#define B4800 0000014108#define BOTHER 0x00001000
127#define B9600 0000015109#define B57600 0x00001001
128#define B19200 0000016110#define B115200 0x00001002
129#define B38400 0000017111#define B230400 0x00001003
130#define EXTA B19200112#define B460800 0x00001004
131#define EXTB B38400113#define B500000 0x00001005
132#define CSIZE 0000060114#define B576000 0x00001006
133#define CS5 0000000115#define B921600 0x00001007
134#define CS6 0000020116#define B1000000 0x00001008
135#define CS7 0000040117#define B1152000 0x00001009
136#define CS8 0000060118#define B1500000 0x0000100a
137#define CSTOPB 0000100119#define B2000000 0x0000100b
138#define CREAD 0000200120#define B2500000 0x0000100c
139#define PARENB 0000400121#define B3000000 0x0000100d
140#define PARODD 0001000122#define B3500000 0x0000100e
141#define HUPCL 0002000123#define B4000000 0x0000100f
142#define CLOCAL 0004000124#define CIBAUD 0x100f0000 /* input baud rate */
143#define CBAUDEX 0010000
144#define BOTHER 0010000
145#define B57600 0010001
146#define B115200 0010002
147#define B230400 0010003
148#define B460800 0010004
149#define B500000 0010005
150#define B576000 0010006
151#define B921600 0010007
152#define B1000000 0010010
153#define B1152000 0010011
154#define B1500000 0010012
155#define B2000000 0010013
156#define B2500000 0010014
157#define B3000000 0010015
158#define B3500000 0010016
159#define B4000000 0010017
160#define CIBAUD 002003600000 /* input baud rate */
161#define CMSPAR 010000000000 /* mark or space (stick) parity */
162#define CRTSCTS 020000000000 /* flow control */
163
164#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
165 125
166/* c_lflag bits */126/* c_lflag bits */
167#define ISIG 0000001127#define ISIG 0x00001
168#define ICANON 0000002128#define ICANON 0x00002
169#define XCASE 0000004129#define XCASE 0x00004
170#define ECHO 0000010130#define ECHO 0x00008
171#define ECHOE 0000020131#define ECHOE 0x00010
172#define ECHOK 0000040132#define ECHOK 0x00020
173#define ECHONL 0000100133#define ECHONL 0x00040
174#define NOFLSH 0000200134#define NOFLSH 0x00080
175#define TOSTOP 0000400135#define TOSTOP 0x00100
176#define ECHOCTL 0001000136#define ECHOCTL 0x00200
177#define ECHOPRT 0002000137#define ECHOPRT 0x00400
178#define ECHOKE 0004000138#define ECHOKE 0x00800
179#define FLUSHO 0010000139#define FLUSHO 0x01000
180#define PENDIN 0040000140#define PENDIN 0x04000
181#define IEXTEN 0100000141#define IEXTEN 0x08000
182#define EXTPROC 0200000142#define EXTPROC 0x10000
183
184/* tcflow() and TCXONC use these */
185#define TCOOFF 0
186#define TCOON 1
187#define TCIOFF 2
188#define TCION 3
189
190/* tcflush() and TCFLSH use these */
191#define TCIFLUSH 0
192#define TCOFLUSH 1
193#define TCIOFLUSH 2
194 143
195/* tcsetattr uses these */144/* tcsetattr uses these */
196#define TCSANOW 0145#define TCSANOW 0