16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28a1ab315SDavid Howells #ifndef _UAPI_ASM_GENERIC_TERMIOS_H
38a1ab315SDavid Howells #define _UAPI_ASM_GENERIC_TERMIOS_H
48a1ab315SDavid Howells /*
58a1ab315SDavid Howells  * Most architectures have straight copies of the x86 code, with
68a1ab315SDavid Howells  * varying levels of bug fixes on top. Usually it's a good idea
78a1ab315SDavid Howells  * to use this generic version instead, but be careful to avoid
88a1ab315SDavid Howells  * ABI changes.
98a1ab315SDavid Howells  * New architectures should not provide their own version.
108a1ab315SDavid Howells  */
118a1ab315SDavid Howells 
128a1ab315SDavid Howells #include <asm/termbits.h>
138a1ab315SDavid Howells #include <asm/ioctls.h>
148a1ab315SDavid Howells 
158a1ab315SDavid Howells struct winsize {
168a1ab315SDavid Howells 	unsigned short ws_row;
178a1ab315SDavid Howells 	unsigned short ws_col;
188a1ab315SDavid Howells 	unsigned short ws_xpixel;
198a1ab315SDavid Howells 	unsigned short ws_ypixel;
208a1ab315SDavid Howells };
218a1ab315SDavid Howells 
228a1ab315SDavid Howells #define NCC 8
238a1ab315SDavid Howells struct termio {
248a1ab315SDavid Howells 	unsigned short c_iflag;		/* input mode flags */
258a1ab315SDavid Howells 	unsigned short c_oflag;		/* output mode flags */
268a1ab315SDavid Howells 	unsigned short c_cflag;		/* control mode flags */
278a1ab315SDavid Howells 	unsigned short c_lflag;		/* local mode flags */
288a1ab315SDavid Howells 	unsigned char c_line;		/* line discipline */
298a1ab315SDavid Howells 	unsigned char c_cc[NCC];	/* control characters */
308a1ab315SDavid Howells };
318a1ab315SDavid Howells 
328a1ab315SDavid Howells /* modem lines */
338a1ab315SDavid Howells #define TIOCM_LE	0x001
348a1ab315SDavid Howells #define TIOCM_DTR	0x002
358a1ab315SDavid Howells #define TIOCM_RTS	0x004
368a1ab315SDavid Howells #define TIOCM_ST	0x008
378a1ab315SDavid Howells #define TIOCM_SR	0x010
388a1ab315SDavid Howells #define TIOCM_CTS	0x020
398a1ab315SDavid Howells #define TIOCM_CAR	0x040
408a1ab315SDavid Howells #define TIOCM_RNG	0x080
418a1ab315SDavid Howells #define TIOCM_DSR	0x100
428a1ab315SDavid Howells #define TIOCM_CD	TIOCM_CAR
438a1ab315SDavid Howells #define TIOCM_RI	TIOCM_RNG
448a1ab315SDavid Howells #define TIOCM_OUT1	0x2000
458a1ab315SDavid Howells #define TIOCM_OUT2	0x4000
468a1ab315SDavid Howells #define TIOCM_LOOP	0x8000
478a1ab315SDavid Howells 
488a1ab315SDavid Howells /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
498a1ab315SDavid Howells 
508a1ab315SDavid Howells 
518a1ab315SDavid Howells #endif /* _UAPI_ASM_GENERIC_TERMIOS_H */
52