18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci#ifndef _UAPI_ASM_SPARC_IOCTLS_H
38c2ecf20Sopenharmony_ci#define _UAPI_ASM_SPARC_IOCTLS_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <asm/ioctl.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci/* Big T */
88c2ecf20Sopenharmony_ci#define TCGETA		_IOR('T', 1, struct termio)
98c2ecf20Sopenharmony_ci#define TCSETA		_IOW('T', 2, struct termio)
108c2ecf20Sopenharmony_ci#define TCSETAW		_IOW('T', 3, struct termio)
118c2ecf20Sopenharmony_ci#define TCSETAF		_IOW('T', 4, struct termio)
128c2ecf20Sopenharmony_ci#define TCSBRK		_IO('T', 5)
138c2ecf20Sopenharmony_ci#define TCXONC		_IO('T', 6)
148c2ecf20Sopenharmony_ci#define TCFLSH		_IO('T', 7)
158c2ecf20Sopenharmony_ci#define TCGETS		_IOR('T', 8, struct termios)
168c2ecf20Sopenharmony_ci#define TCSETS		_IOW('T', 9, struct termios)
178c2ecf20Sopenharmony_ci#define TCSETSW		_IOW('T', 10, struct termios)
188c2ecf20Sopenharmony_ci#define TCSETSF		_IOW('T', 11, struct termios)
198c2ecf20Sopenharmony_ci#define TCGETS2		_IOR('T', 12, struct termios2)
208c2ecf20Sopenharmony_ci#define TCSETS2		_IOW('T', 13, struct termios2)
218c2ecf20Sopenharmony_ci#define TCSETSW2	_IOW('T', 14, struct termios2)
228c2ecf20Sopenharmony_ci#define TCSETSF2	_IOW('T', 15, struct termios2)
238c2ecf20Sopenharmony_ci#define TIOCGDEV	_IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */
248c2ecf20Sopenharmony_ci#define TIOCVHANGUP	_IO('T', 0x37)
258c2ecf20Sopenharmony_ci#define TIOCGPKT	_IOR('T', 0x38, int) /* Get packet mode state */
268c2ecf20Sopenharmony_ci#define TIOCGPTLCK	_IOR('T', 0x39, int) /* Get Pty lock state */
278c2ecf20Sopenharmony_ci#define TIOCGEXCL	_IOR('T', 0x40, int) /* Get exclusive mode state */
288c2ecf20Sopenharmony_ci#define TIOCGRS485	_IOR('T', 0x41, struct serial_rs485)
298c2ecf20Sopenharmony_ci#define TIOCSRS485	_IOWR('T', 0x42, struct serial_rs485)
308c2ecf20Sopenharmony_ci#define TIOCGISO7816	_IOR('T', 0x43, struct serial_iso7816)
318c2ecf20Sopenharmony_ci#define TIOCSISO7816	_IOWR('T', 0x44, struct serial_iso7816)
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci/* Note that all the ioctls that are not available in Linux have a
348c2ecf20Sopenharmony_ci * double underscore on the front to: a) avoid some programs to
358c2ecf20Sopenharmony_ci * think we support some ioctls under Linux (autoconfiguration stuff)
368c2ecf20Sopenharmony_ci */
378c2ecf20Sopenharmony_ci/* Little t */
388c2ecf20Sopenharmony_ci#define TIOCGETD	_IOR('t', 0, int)
398c2ecf20Sopenharmony_ci#define TIOCSETD	_IOW('t', 1, int)
408c2ecf20Sopenharmony_ci#define __TIOCHPCL        _IO('t', 2) /* SunOS Specific */
418c2ecf20Sopenharmony_ci#define __TIOCMODG        _IOR('t', 3, int) /* SunOS Specific */
428c2ecf20Sopenharmony_ci#define __TIOCMODS        _IOW('t', 4, int) /* SunOS Specific */
438c2ecf20Sopenharmony_ci#define __TIOCGETP        _IOR('t', 8, struct sgttyb) /* SunOS Specific */
448c2ecf20Sopenharmony_ci#define __TIOCSETP        _IOW('t', 9, struct sgttyb) /* SunOS Specific */
458c2ecf20Sopenharmony_ci#define __TIOCSETN        _IOW('t', 10, struct sgttyb) /* SunOS Specific */
468c2ecf20Sopenharmony_ci#define TIOCEXCL	_IO('t', 13)
478c2ecf20Sopenharmony_ci#define TIOCNXCL	_IO('t', 14)
488c2ecf20Sopenharmony_ci#define __TIOCFLUSH       _IOW('t', 16, int) /* SunOS Specific */
498c2ecf20Sopenharmony_ci#define __TIOCSETC        _IOW('t', 17, struct tchars) /* SunOS Specific */
508c2ecf20Sopenharmony_ci#define __TIOCGETC        _IOR('t', 18, struct tchars) /* SunOS Specific */
518c2ecf20Sopenharmony_ci#define __TIOCTCNTL       _IOW('t', 32, int) /* SunOS Specific */
528c2ecf20Sopenharmony_ci#define __TIOCSIGNAL      _IOW('t', 33, int) /* SunOS Specific */
538c2ecf20Sopenharmony_ci#define __TIOCSETX        _IOW('t', 34, int) /* SunOS Specific */
548c2ecf20Sopenharmony_ci#define __TIOCGETX        _IOR('t', 35, int) /* SunOS Specific */
558c2ecf20Sopenharmony_ci#define TIOCCONS	_IO('t', 36)
568c2ecf20Sopenharmony_ci#define TIOCGSOFTCAR	_IOR('t', 100, int)
578c2ecf20Sopenharmony_ci#define TIOCSSOFTCAR	_IOW('t', 101, int)
588c2ecf20Sopenharmony_ci#define __TIOCUCNTL       _IOW('t', 102, int) /* SunOS Specific */
598c2ecf20Sopenharmony_ci#define TIOCSWINSZ	_IOW('t', 103, struct winsize)
608c2ecf20Sopenharmony_ci#define TIOCGWINSZ	_IOR('t', 104, struct winsize)
618c2ecf20Sopenharmony_ci#define __TIOCREMOTE      _IOW('t', 105, int) /* SunOS Specific */
628c2ecf20Sopenharmony_ci#define TIOCMGET	_IOR('t', 106, int)
638c2ecf20Sopenharmony_ci#define TIOCMBIC	_IOW('t', 107, int)
648c2ecf20Sopenharmony_ci#define TIOCMBIS	_IOW('t', 108, int)
658c2ecf20Sopenharmony_ci#define TIOCMSET	_IOW('t', 109, int)
668c2ecf20Sopenharmony_ci#define TIOCSTART       _IO('t', 110)
678c2ecf20Sopenharmony_ci#define TIOCSTOP        _IO('t', 111)
688c2ecf20Sopenharmony_ci#define TIOCPKT		_IOW('t', 112, int)
698c2ecf20Sopenharmony_ci#define TIOCNOTTY	_IO('t', 113)
708c2ecf20Sopenharmony_ci#define TIOCSTI		_IOW('t', 114, char)
718c2ecf20Sopenharmony_ci#define TIOCOUTQ	_IOR('t', 115, int)
728c2ecf20Sopenharmony_ci#define __TIOCGLTC        _IOR('t', 116, struct ltchars) /* SunOS Specific */
738c2ecf20Sopenharmony_ci#define __TIOCSLTC        _IOW('t', 117, struct ltchars) /* SunOS Specific */
748c2ecf20Sopenharmony_ci/* 118 is the non-posix setpgrp tty ioctl */
758c2ecf20Sopenharmony_ci/* 119 is the non-posix getpgrp tty ioctl */
768c2ecf20Sopenharmony_ci#define __TIOCCDTR        _IO('t', 120) /* SunOS Specific */
778c2ecf20Sopenharmony_ci#define __TIOCSDTR        _IO('t', 121) /* SunOS Specific */
788c2ecf20Sopenharmony_ci#define TIOCCBRK        _IO('t', 122)
798c2ecf20Sopenharmony_ci#define TIOCSBRK        _IO('t', 123)
808c2ecf20Sopenharmony_ci#define __TIOCLGET        _IOW('t', 124, int) /* SunOS Specific */
818c2ecf20Sopenharmony_ci#define __TIOCLSET        _IOW('t', 125, int) /* SunOS Specific */
828c2ecf20Sopenharmony_ci#define __TIOCLBIC        _IOW('t', 126, int) /* SunOS Specific */
838c2ecf20Sopenharmony_ci#define __TIOCLBIS        _IOW('t', 127, int) /* SunOS Specific */
848c2ecf20Sopenharmony_ci#define __TIOCISPACE      _IOR('t', 128, int) /* SunOS Specific */
858c2ecf20Sopenharmony_ci#define __TIOCISIZE       _IOR('t', 129, int) /* SunOS Specific */
868c2ecf20Sopenharmony_ci#define TIOCSPGRP	_IOW('t', 130, int)
878c2ecf20Sopenharmony_ci#define TIOCGPGRP	_IOR('t', 131, int)
888c2ecf20Sopenharmony_ci#define TIOCSCTTY	_IO('t', 132)
898c2ecf20Sopenharmony_ci#define TIOCGSID	_IOR('t', 133, int)
908c2ecf20Sopenharmony_ci/* Get minor device of a pty master's FD -- Solaris equiv is ISPTM */
918c2ecf20Sopenharmony_ci#define TIOCGPTN	_IOR('t', 134, unsigned int) /* Get Pty Number */
928c2ecf20Sopenharmony_ci#define TIOCSPTLCK	_IOW('t', 135, int) /* Lock/unlock PTY */
938c2ecf20Sopenharmony_ci#define TIOCSIG		_IOW('t', 136, int) /* Generate signal on Pty slave */
948c2ecf20Sopenharmony_ci#define TIOCGPTPEER	_IO('t', 137) /* Safely open the slave */
958c2ecf20Sopenharmony_ci
968c2ecf20Sopenharmony_ci/* Little f */
978c2ecf20Sopenharmony_ci#define FIOCLEX		_IO('f', 1)
988c2ecf20Sopenharmony_ci#define FIONCLEX	_IO('f', 2)
998c2ecf20Sopenharmony_ci#define FIOASYNC	_IOW('f', 125, int)
1008c2ecf20Sopenharmony_ci#define FIONBIO		_IOW('f', 126, int)
1018c2ecf20Sopenharmony_ci#define FIONREAD	_IOR('f', 127, int)
1028c2ecf20Sopenharmony_ci#define TIOCINQ		FIONREAD
1038c2ecf20Sopenharmony_ci#define FIOQSIZE	_IOR('f', 128, loff_t)
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci/* SCARY Rutgers local SunOS kernel hackery, perhaps I will support it
1068c2ecf20Sopenharmony_ci * someday.  This is completely bogus, I know...
1078c2ecf20Sopenharmony_ci */
1088c2ecf20Sopenharmony_ci#define __TCGETSTAT       _IO('T', 200) /* Rutgers specific */
1098c2ecf20Sopenharmony_ci#define __TCSETSTAT       _IO('T', 201) /* Rutgers specific */
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_ci/* Linux specific, no SunOS equivalent. */
1128c2ecf20Sopenharmony_ci#define TIOCLINUX	0x541C
1138c2ecf20Sopenharmony_ci#define TIOCGSERIAL	0x541E
1148c2ecf20Sopenharmony_ci#define TIOCSSERIAL	0x541F
1158c2ecf20Sopenharmony_ci#define TCSBRKP		0x5425
1168c2ecf20Sopenharmony_ci#define TIOCSERCONFIG	0x5453
1178c2ecf20Sopenharmony_ci#define TIOCSERGWILD	0x5454
1188c2ecf20Sopenharmony_ci#define TIOCSERSWILD	0x5455
1198c2ecf20Sopenharmony_ci#define TIOCGLCKTRMIOS	0x5456
1208c2ecf20Sopenharmony_ci#define TIOCSLCKTRMIOS	0x5457
1218c2ecf20Sopenharmony_ci#define TIOCSERGSTRUCT	0x5458 /* For debugging only */
1228c2ecf20Sopenharmony_ci#define TIOCSERGETLSR   0x5459 /* Get line status register */
1238c2ecf20Sopenharmony_ci#define TIOCSERGETMULTI 0x545A /* Get multiport config  */
1248c2ecf20Sopenharmony_ci#define TIOCSERSETMULTI 0x545B /* Set multiport config */
1258c2ecf20Sopenharmony_ci#define TIOCMIWAIT	0x545C /* Wait for change on serial input line(s) */
1268c2ecf20Sopenharmony_ci#define TIOCGICOUNT	0x545D /* Read serial port inline interrupt counts */
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ci/* Kernel definitions */
1298c2ecf20Sopenharmony_ci
1308c2ecf20Sopenharmony_ci/* Used for packet mode */
1318c2ecf20Sopenharmony_ci#define TIOCPKT_DATA		 0
1328c2ecf20Sopenharmony_ci#define TIOCPKT_FLUSHREAD	 1
1338c2ecf20Sopenharmony_ci#define TIOCPKT_FLUSHWRITE	 2
1348c2ecf20Sopenharmony_ci#define TIOCPKT_STOP		 4
1358c2ecf20Sopenharmony_ci#define TIOCPKT_START		 8
1368c2ecf20Sopenharmony_ci#define TIOCPKT_NOSTOP		16
1378c2ecf20Sopenharmony_ci#define TIOCPKT_DOSTOP		32
1388c2ecf20Sopenharmony_ci#define TIOCPKT_IOCTL		64
1398c2ecf20Sopenharmony_ci
1408c2ecf20Sopenharmony_ci#endif /* _UAPI_ASM_SPARC_IOCTLS_H */
141