History

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

Pull tty/serial driver updates from Greg KH: "Here is the big set of tty and serial driver changes for 6.6-rc1. Lots of cleanups in here this cycle, and some driver updates. Short summary is: - Jiri's continued work to make the tty code and apis be a bit more sane with regards to modern kernel coding style and types - cpm_uart driver updates - n_gsm updates and fixes - meson driver updates - sc16is7xx driver updates - 8250 driver updates for different hardware types - qcom-geni driver fixes - tegra serial driver change - stm32 driver updates - synclink_gt driver cleanups - tty structure size reduction All of these have been in linux-next this week with no reported issues. The last bit of cleanups from Jiri and the tty structure size reduction came in last week, a bit late but as they were just style changes and size reductions, I figured they should get into this merge cycle so that others can work on top of them with no merge conflicts" * tag 'tty-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (199 commits) tty: shrink the size of struct tty_struct by 40 bytes tty: n_tty: deduplicate copy code in n_tty_receive_buf_real_raw() tty: n_tty: extract ECHO_OP processing to a separate function tty: n_tty: unify counts to size_t tty: n_tty: use u8 for chars and flags tty: n_tty: simplify chars_in_buffer() tty: n_tty: remove unsigned char casts from character constants tty: n_tty: move newline handling to a separate function tty: n_tty: move canon handling to a separate function tty: n_tty: use MASK() for masking out size bits tty: n_tty: make n_tty_data::num_overrun unsigned tty: n_tty: use time_is_before_jiffies() in n_tty_receive_overrun() tty: n_tty: use 'num' for writes' counts tty: n_tty: use output character directly tty: n_tty: make flow of n_tty_receive_buf_common() a bool Revert "tty: serial: meson: Add a earlycon for the T7 SoC" Documentation: devices.txt: Fix minors for ttyCPM* Documentation: devices.txt: Remove ttySIOC* Documentation: devices.txt: Remove ttyIOC* serial: 8250_bcm7271: improve bcm7271 8250 port ...

Linus Torvalds committed 3 years ago

Commit 8e1e4952 parents e925992 ebf05c7185 files · +2106 −2175Browse files

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

Unified · Split

2 files
  1. include/uapi/linux/gsmmux.h +99 −19
  2. include/uapi/linux/serial_core.h +5 −39
include/uapi/linux/gsmmux.h+99−19
@@ -2,10 +2,45 @@ · 1 unmodified line
22 #ifndef _LINUX_GSMMUX_H
33 #define _LINUX_GSMMUX_H
44
5+#include <linux/const.h>
56 #include <linux/if.h>
67 #include <linux/ioctl.h>
78 #include <linux/types.h>
89
10+/*
11+ * flags definition for n_gsm
12+ *
13+ * Used by:
14+ * struct gsm_config_ext.flags
15+ * struct gsm_dlci_config.flags
16+ */
17+/* Forces a DLCI reset if set. Otherwise, a DLCI reset is only done if
18+ * incompatible settings were provided. Always cleared on retrieval.
19+ */
20+#define GSM_FL_RESTART _BITUL(0)
21+
22+/**
23+ * struct gsm_config - n_gsm basic configuration parameters
24+ *
25+ * This structure is used in combination with GSMIOC_GETCONF and GSMIOC_SETCONF
26+ * to retrieve and set the basic parameters of an n_gsm ldisc.
27+ * struct gsm_config_ext can be used to configure extended ldisc parameters.
28+ *
29+ * All timers are in units of 1/100th of a second.
30+ *
31+ * @adaption: Convergence layer type
32+ * @encapsulation: Framing (0 = basic option, 1 = advanced option)
33+ * @initiator: Initiator or responder
34+ * @t1: Acknowledgment timer
35+ * @t2: Response timer for multiplexer control channel
36+ * @t3: Response timer for wake-up procedure
37+ * @n2: Maximum number of retransmissions
38+ * @mru: Maximum incoming frame payload size
39+ * @mtu: Maximum outgoing frame payload size
40+ * @k: Window size
41+ * @i: Frame type (1 = UIH, 2 = UI)
42+ * @unused: Can not be used
43+ */
944 struct gsm_config
1045 {
1146 unsigned int adaption;
@@ -19,18 +54,32 @@ struct gsm_config · 7 unmodified lines
1954 unsigned int mtu;
2055 unsigned int k;
2156 unsigned int i;
22− unsigned int unused[8]; /* Can not be used */
57+ unsigned int unused[8];
2358 };
2459
2560 #define GSMIOC_GETCONF _IOR('G', 0, struct gsm_config)
2661 #define GSMIOC_SETCONF _IOW('G', 1, struct gsm_config)
2762
63+/**
64+ * struct gsm_netconfig - n_gsm network configuration parameters
65+ *
66+ * This structure is used in combination with GSMIOC_ENABLE_NET and
67+ * GSMIOC_DISABLE_NET to enable or disable a network data connection
68+ * over a mux virtual tty channel. This is for modems that support
69+ * data connections with raw IP frames instead of PPP.
70+ *
71+ * @adaption: Adaption to use in network mode.
72+ * @protocol: Protocol to use - only ETH_P_IP supported.
73+ * @unused2: Can not be used.
74+ * @if_name: Interface name format string.
75+ * @unused: Can not be used.
76+ */
2877 struct gsm_netconfig {
29− unsigned int adaption; /* Adaption to use in network mode */
30− unsigned short protocol;/* Protocol to use - only ETH_P_IP supported */
31− unsigned short unused2; /* Can not be used */
32− char if_name[IFNAMSIZ]; /* interface name format string */
33− __u8 unused[28]; /* Can not be used */
78+ unsigned int adaption;
79+ unsigned short protocol;
80+ unsigned short unused2;
81+ char if_name[IFNAMSIZ];
82+ __u8 unused[28];
3483 };
3584
3685 #define GSMIOC_ENABLE_NET _IOW('G', 2, struct gsm_netconfig)
@@ -39,26 +88,57 @@ struct gsm_netconfig { · 2 unmodified lines
3988 /* get the base tty number for a configured gsmmux tty */
4089 #define GSMIOC_GETFIRST _IOR('G', 4, __u32)
4190
91+/**
92+ * struct gsm_config_ext - n_gsm extended configuration parameters
93+ *
94+ * This structure is used in combination with GSMIOC_GETCONF_EXT and
95+ * GSMIOC_SETCONF_EXT to retrieve and set the extended parameters of an
96+ * n_gsm ldisc.
97+ *
98+ * All timers are in units of 1/100th of a second.
99+ *
100+ * @keep_alive: Control channel keep-alive in 1/100th of a second (0 to disable).
101+ * @wait_config: Wait for DLCI config before opening virtual link?
102+ * @flags: Mux specific flags.
103+ * @reserved: For future use, must be initialized to zero.
104+ */
42105 struct gsm_config_ext {
43− __u32 keep_alive; /* Control channel keep-alive in 1/100th of a
44− * second (0 to disable)
45− */
46− __u32 wait_config; /* Wait for DLCI config before opening virtual link? */
47− __u32 reserved[6]; /* For future use, must be initialized to zero */
106+ __u32 keep_alive;
107+ __u32 wait_config;
108+ __u32 flags;
109+ __u32 reserved[5];
48110 };
49111
50112 #define GSMIOC_GETCONF_EXT _IOR('G', 5, struct gsm_config_ext)
51113 #define GSMIOC_SETCONF_EXT _IOW('G', 6, struct gsm_config_ext)
52114
53−/* Set channel accordingly before calling GSMIOC_GETCONF_DLCI. */
115+/**
116+ * struct gsm_dlci_config - n_gsm channel configuration parameters
117+ *
118+ * This structure is used in combination with GSMIOC_GETCONF_DLCI and
119+ * GSMIOC_SETCONF_DLCI to retrieve and set the channel specific parameters
120+ * of an n_gsm ldisc.
121+ *
122+ * Set the channel accordingly before calling GSMIOC_GETCONF_DLCI.
123+ *
124+ * @channel: DLCI (0 for the associated DLCI).
125+ * @adaption: Convergence layer type.
126+ * @mtu: Maximum transfer unit.
127+ * @priority: Priority (0 for default value).
128+ * @i: Frame type (1 = UIH, 2 = UI).
129+ * @k: Window size (0 for default value).
130+ * @flags: DLCI specific flags.
131+ * @reserved: For future use, must be initialized to zero.
132+ */
54133 struct gsm_dlci_config {
55− __u32 channel; /* DLCI (0 for the associated DLCI) */
56− __u32 adaption; /* Convergence layer type */
57− __u32 mtu; /* Maximum transfer unit */
58− __u32 priority; /* Priority (0 for default value) */
59− __u32 i; /* Frame type (1 = UIH, 2 = UI) */
60− __u32 k; /* Window size (0 for default value) */
61− __u32 reserved[8]; /* For future use, must be initialized to zero */
134+ __u32 channel;
135+ __u32 adaption;
136+ __u32 mtu;
137+ __u32 priority;
138+ __u32 i;
139+ __u32 k;
140+ __u32 flags;
141+ __u32 reserved[7];
62142 };
63143
64144 #define GSMIOC_GETCONF_DLCI _IOWR('G', 7, struct gsm_dlci_config)
include/uapi/linux/serial_core.h+5−39
@@ -25,6 +25,8 @@ · 24 unmodified lines
2525
2626 /*
2727 * The type definitions. These are from Ted Ts'o's serial.h
28+ * By historical reasons the values from 0 to 13 are defined
29+ * in the include/uapi/linux/serial.h, do not define them here.
2830 */
2931 #define PORT_NS16550A 14
3032 #define PORT_XSCALE 15
@@ -94,15 +96,9 @@ · 63 unmodified lines
9496 #define PORT_SCIF 53
9597 #define PORT_IRDA 54
9698
97−/* Samsung S3C2410 SoC and derivatives thereof */
98−#define PORT_S3C2410 55
99−
10099 /* SGI IP22 aka Indy / Challenge S / Indigo 2 */
101100 #define PORT_IP22ZILOG 56
102101
103−/* Sharp LH7a40x -- an ARM9 SoC series */
104−#define PORT_LH7A40X 57
105−
106102 /* PPC CPM type number */
107103 #define PORT_CPM 58
108104
@@ -112,37 +108,23 @@ · 3 unmodified lines
112108 /* IBM icom */
113109 #define PORT_ICOM 60
114110
115−/* Samsung S3C2440 SoC */
116−#define PORT_S3C2440 61
117−
118111 /* Motorola i.MX SoC */
119112 #define PORT_IMX 62
120113
121−/* Marvell MPSC (obsolete unused) */
122−#define PORT_MPSC 63
123−
124114 /* TXX9 type number */
125115 #define PORT_TXX9 64
126116
127−/* Samsung S3C2400 SoC */
128−#define PORT_S3C2400 67
129−
130−/* M32R SIO */
131−#define PORT_M32R_SIO 68
132−
133117 /*Digi jsm */
134118 #define PORT_JSM 69
135119
136120 /* SUN4V Hypervisor Console */
137121 #define PORT_SUNHV 72
138122
139−#define PORT_S3C2412 73
140−
141123 /* Xilinx uartlite */
142124 #define PORT_UARTLITE 74
143125
144−/* Blackfin bf5xx */
145−#define PORT_BFIN 75
126+/* Broadcom BCM7271 UART */
127+#define PORT_BCM7271 76
146128
147129 /* Broadcom SB1250, etc. SOC */
148130 #define PORT_SB1250_DUART 77
@@ -150,13 +132,6 @@ · 1 unmodified line
150132 /* Freescale ColdFire */
151133 #define PORT_MCF 78
152134
153−/* Blackfin SPORT */
154−#define PORT_BFIN_SPORT 79
155−
156−/* MN10300 on-chip UART numbers */
157−#define PORT_MN10300 80
158−#define PORT_MN10300_CTS 81
159−
160135 #define PORT_SC26XX 82
161136
162137 /* SH-SCI */
@@ -164,9 +139,6 @@ · 1 unmodified line
164139
165140 #define PORT_S3C6400 84
166141
167−/* NWPSERIAL, now removed */
168−#define PORT_NWPSERIAL 85
169−
170142 /* MAX3100 */
171143 #define PORT_MAX3100 86
172144
@@ -225,13 +197,10 @@ · 52 unmodified lines
225197 /* ST ASC type numbers */
226198 #define PORT_ASC 105
227199
228−/* Tilera TILE-Gx UART */
229−#define PORT_TILEGX 106
230−
231200 /* MEN 16z135 UART */
232201 #define PORT_MEN_Z135 107
233202
234−/* SC16IS74xx */
203+/* SC16IS7xx */
235204 #define PORT_SC16IS7XX 108
236205
237206 /* MESON */
@@ -243,9 +212,6 @@ · 5 unmodified lines
243212 /* SPRD SERIAL */
244213 #define PORT_SPRD 111
245214
246−/* Cris v10 / v32 SoC */
247−#define PORT_CRIS 112
248−
249215 /* STM32 USART */
250216 #define PORT_STM32 113
251217