xref: /linux/arch/powerpc/include/uapi/asm/ioctls.h (revision 3eb66e91a25497065c5322b1268cbc3953642227)
16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2c3617f72SDavid Howells #ifndef _ASM_POWERPC_IOCTLS_H
3c3617f72SDavid Howells #define _ASM_POWERPC_IOCTLS_H
4c3617f72SDavid Howells 
5c3617f72SDavid Howells #include <asm/ioctl.h>
6c3617f72SDavid Howells 
7c3617f72SDavid Howells #define FIOCLEX		_IO('f', 1)
8c3617f72SDavid Howells #define FIONCLEX	_IO('f', 2)
9c3617f72SDavid Howells #define FIOASYNC	_IOW('f', 125, int)
10c3617f72SDavid Howells #define FIONBIO		_IOW('f', 126, int)
11c3617f72SDavid Howells #define FIONREAD	_IOR('f', 127, int)
12c3617f72SDavid Howells #define TIOCINQ		FIONREAD
13c3617f72SDavid Howells #define FIOQSIZE	_IOR('f', 128, loff_t)
14c3617f72SDavid Howells 
15c3617f72SDavid Howells #define TIOCGETP	_IOR('t', 8, struct sgttyb)
16c3617f72SDavid Howells #define TIOCSETP	_IOW('t', 9, struct sgttyb)
17c3617f72SDavid Howells #define TIOCSETN	_IOW('t', 10, struct sgttyb)	/* TIOCSETP wo flush */
18c3617f72SDavid Howells 
19c3617f72SDavid Howells #define TIOCSETC	_IOW('t', 17, struct tchars)
20c3617f72SDavid Howells #define TIOCGETC	_IOR('t', 18, struct tchars)
21c3617f72SDavid Howells #define TCGETS		_IOR('t', 19, struct termios)
22c3617f72SDavid Howells #define TCSETS		_IOW('t', 20, struct termios)
23c3617f72SDavid Howells #define TCSETSW		_IOW('t', 21, struct termios)
24c3617f72SDavid Howells #define TCSETSF		_IOW('t', 22, struct termios)
25c3617f72SDavid Howells 
26c3617f72SDavid Howells #define TCGETA		_IOR('t', 23, struct termio)
27c3617f72SDavid Howells #define TCSETA		_IOW('t', 24, struct termio)
28c3617f72SDavid Howells #define TCSETAW		_IOW('t', 25, struct termio)
29c3617f72SDavid Howells #define TCSETAF		_IOW('t', 28, struct termio)
30c3617f72SDavid Howells 
31c3617f72SDavid Howells #define TCSBRK		_IO('t', 29)
32c3617f72SDavid Howells #define TCXONC		_IO('t', 30)
33c3617f72SDavid Howells #define TCFLSH		_IO('t', 31)
34c3617f72SDavid Howells 
35c3617f72SDavid Howells #define TIOCSWINSZ	_IOW('t', 103, struct winsize)
36c3617f72SDavid Howells #define TIOCGWINSZ	_IOR('t', 104, struct winsize)
37c3617f72SDavid Howells #define	TIOCSTART	_IO('t', 110)		/* start output, like ^Q */
38c3617f72SDavid Howells #define	TIOCSTOP	_IO('t', 111)		/* stop output, like ^S */
39c3617f72SDavid Howells #define TIOCOUTQ        _IOR('t', 115, int)     /* output queue size */
40c3617f72SDavid Howells 
41c3617f72SDavid Howells #define TIOCGLTC	_IOR('t', 116, struct ltchars)
42c3617f72SDavid Howells #define TIOCSLTC	_IOW('t', 117, struct ltchars)
43c3617f72SDavid Howells #define TIOCSPGRP	_IOW('t', 118, int)
44c3617f72SDavid Howells #define TIOCGPGRP	_IOR('t', 119, int)
45c3617f72SDavid Howells 
46c3617f72SDavid Howells #define TIOCEXCL	0x540C
47c3617f72SDavid Howells #define TIOCNXCL	0x540D
48c3617f72SDavid Howells #define TIOCSCTTY	0x540E
49c3617f72SDavid Howells 
50c3617f72SDavid Howells #define TIOCSTI		0x5412
51c3617f72SDavid Howells #define TIOCMGET	0x5415
52c3617f72SDavid Howells #define TIOCMBIS	0x5416
53c3617f72SDavid Howells #define TIOCMBIC	0x5417
54c3617f72SDavid Howells #define TIOCMSET	0x5418
55c3617f72SDavid Howells # define TIOCM_LE	0x001
56c3617f72SDavid Howells # define TIOCM_DTR	0x002
57c3617f72SDavid Howells # define TIOCM_RTS	0x004
58c3617f72SDavid Howells # define TIOCM_ST	0x008
59c3617f72SDavid Howells # define TIOCM_SR	0x010
60c3617f72SDavid Howells # define TIOCM_CTS	0x020
61c3617f72SDavid Howells # define TIOCM_CAR	0x040
62c3617f72SDavid Howells # define TIOCM_RNG	0x080
63c3617f72SDavid Howells # define TIOCM_DSR	0x100
64c3617f72SDavid Howells # define TIOCM_CD	TIOCM_CAR
65c3617f72SDavid Howells # define TIOCM_RI	TIOCM_RNG
66c3617f72SDavid Howells #define TIOCM_OUT1	0x2000
67c3617f72SDavid Howells #define TIOCM_OUT2	0x4000
68c3617f72SDavid Howells #define TIOCM_LOOP	0x8000
69c3617f72SDavid Howells 
70c3617f72SDavid Howells #define TIOCGSOFTCAR	0x5419
71c3617f72SDavid Howells #define TIOCSSOFTCAR	0x541A
72c3617f72SDavid Howells #define TIOCLINUX	0x541C
73c3617f72SDavid Howells #define TIOCCONS	0x541D
74c3617f72SDavid Howells #define TIOCGSERIAL	0x541E
75c3617f72SDavid Howells #define TIOCSSERIAL	0x541F
76c3617f72SDavid Howells #define TIOCPKT		0x5420
77c3617f72SDavid Howells # define TIOCPKT_DATA		 0
78c3617f72SDavid Howells # define TIOCPKT_FLUSHREAD	 1
79c3617f72SDavid Howells # define TIOCPKT_FLUSHWRITE	 2
80c3617f72SDavid Howells # define TIOCPKT_STOP		 4
81c3617f72SDavid Howells # define TIOCPKT_START		 8
82c3617f72SDavid Howells # define TIOCPKT_NOSTOP		16
83c3617f72SDavid Howells # define TIOCPKT_DOSTOP		32
84c3617f72SDavid Howells # define TIOCPKT_IOCTL		64
85c3617f72SDavid Howells 
86c3617f72SDavid Howells 
87c3617f72SDavid Howells #define TIOCNOTTY	0x5422
88c3617f72SDavid Howells #define TIOCSETD	0x5423
89c3617f72SDavid Howells #define TIOCGETD	0x5424
90c3617f72SDavid Howells #define TCSBRKP		0x5425	/* Needed for POSIX tcsendbreak() */
91c3617f72SDavid Howells #define TIOCSBRK	0x5427  /* BSD compatibility */
92c3617f72SDavid Howells #define TIOCCBRK	0x5428  /* BSD compatibility */
93c3617f72SDavid Howells #define TIOCGSID	0x5429  /* Return the session ID of FD */
94c3617f72SDavid Howells #define TIOCGRS485	0x542e
95c3617f72SDavid Howells #define TIOCSRS485	0x542f
96c3617f72SDavid Howells #define TIOCGPTN	_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
97c3617f72SDavid Howells #define TIOCSPTLCK	_IOW('T',0x31, int)  /* Lock/unlock Pty */
98c3617f72SDavid Howells #define TIOCGDEV	_IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */
99c3617f72SDavid Howells #define TIOCSIG		_IOW('T',0x36, int)  /* Generate signal on Pty slave */
100c3617f72SDavid Howells #define TIOCVHANGUP	0x5437
101c6298038SCyrill Gorcunov #define TIOCGPKT	_IOR('T', 0x38, int) /* Get packet mode state */
102c6298038SCyrill Gorcunov #define TIOCGPTLCK	_IOR('T', 0x39, int) /* Get Pty lock state */
103c6298038SCyrill Gorcunov #define TIOCGEXCL	_IOR('T', 0x40, int) /* Get exclusive mode state */
104c6325179SGleb Fotengauer-Malinovskiy #define TIOCGPTPEER	_IO('T', 0x41) /* Safely open the slave */
105*ad8c0eaaSNicolas Ferre #define TIOCGISO7816	_IOR('T', 0x42, struct serial_iso7816)
106*ad8c0eaaSNicolas Ferre #define TIOCSISO7816	_IOWR('T', 0x43, struct serial_iso7816)
107c3617f72SDavid Howells 
108c3617f72SDavid Howells #define TIOCSERCONFIG	0x5453
109c3617f72SDavid Howells #define TIOCSERGWILD	0x5454
110c3617f72SDavid Howells #define TIOCSERSWILD	0x5455
111c3617f72SDavid Howells #define TIOCGLCKTRMIOS	0x5456
112c3617f72SDavid Howells #define TIOCSLCKTRMIOS	0x5457
113c3617f72SDavid Howells #define TIOCSERGSTRUCT	0x5458 /* For debugging only */
114c3617f72SDavid Howells #define TIOCSERGETLSR   0x5459 /* Get line status register */
115c3617f72SDavid Howells   /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
116c3617f72SDavid Howells # define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
117c3617f72SDavid Howells #define TIOCSERGETMULTI 0x545A /* Get multiport config  */
118c3617f72SDavid Howells #define TIOCSERSETMULTI 0x545B /* Set multiport config */
119c3617f72SDavid Howells 
120c3617f72SDavid Howells #define TIOCMIWAIT	0x545C	/* wait for a change on serial input line(s) */
121c3617f72SDavid Howells #define TIOCGICOUNT	0x545D	/* read serial port inline interrupt counts */
122c3617f72SDavid Howells 
123c3617f72SDavid Howells #endif	/* _ASM_POWERPC_IOCTLS_H */
124