16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 254579826SDavid Howells #ifndef _UAPI_ASM_SPARC_IOCTLS_H 354579826SDavid Howells #define _UAPI_ASM_SPARC_IOCTLS_H 454579826SDavid Howells 554579826SDavid Howells #include <asm/ioctl.h> 654579826SDavid Howells 754579826SDavid Howells /* Big T */ 854579826SDavid Howells #define TCGETA _IOR('T', 1, struct termio) 954579826SDavid Howells #define TCSETA _IOW('T', 2, struct termio) 1054579826SDavid Howells #define TCSETAW _IOW('T', 3, struct termio) 1154579826SDavid Howells #define TCSETAF _IOW('T', 4, struct termio) 1254579826SDavid Howells #define TCSBRK _IO('T', 5) 1354579826SDavid Howells #define TCXONC _IO('T', 6) 1454579826SDavid Howells #define TCFLSH _IO('T', 7) 1554579826SDavid Howells #define TCGETS _IOR('T', 8, struct termios) 1654579826SDavid Howells #define TCSETS _IOW('T', 9, struct termios) 1754579826SDavid Howells #define TCSETSW _IOW('T', 10, struct termios) 1854579826SDavid Howells #define TCSETSF _IOW('T', 11, struct termios) 1954579826SDavid Howells #define TCGETS2 _IOR('T', 12, struct termios2) 2054579826SDavid Howells #define TCSETS2 _IOW('T', 13, struct termios2) 2154579826SDavid Howells #define TCSETSW2 _IOW('T', 14, struct termios2) 2254579826SDavid Howells #define TCSETSF2 _IOW('T', 15, struct termios2) 2354579826SDavid Howells #define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ 2454579826SDavid Howells #define TIOCVHANGUP _IO('T', 0x37) 25c6298038SCyrill Gorcunov #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ 26c6298038SCyrill Gorcunov #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ 27c6298038SCyrill Gorcunov #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ 28999156adSRicardo Ribalda Delgado #define TIOCGRS485 _IOR('T', 0x41, struct serial_rs485) 29999156adSRicardo Ribalda Delgado #define TIOCSRS485 _IOWR('T', 0x42, struct serial_rs485) 30*ad8c0eaaSNicolas Ferre #define TIOCGISO7816 _IOR('T', 0x43, struct serial_iso7816) 31*ad8c0eaaSNicolas Ferre #define TIOCSISO7816 _IOWR('T', 0x44, struct serial_iso7816) 3254579826SDavid Howells 3354579826SDavid Howells /* Note that all the ioctls that are not available in Linux have a 3454579826SDavid Howells * double underscore on the front to: a) avoid some programs to 3554579826SDavid Howells * think we support some ioctls under Linux (autoconfiguration stuff) 3654579826SDavid Howells */ 3754579826SDavid Howells /* Little t */ 3854579826SDavid Howells #define TIOCGETD _IOR('t', 0, int) 3954579826SDavid Howells #define TIOCSETD _IOW('t', 1, int) 4054579826SDavid Howells #define __TIOCHPCL _IO('t', 2) /* SunOS Specific */ 4154579826SDavid Howells #define __TIOCMODG _IOR('t', 3, int) /* SunOS Specific */ 4254579826SDavid Howells #define __TIOCMODS _IOW('t', 4, int) /* SunOS Specific */ 4354579826SDavid Howells #define __TIOCGETP _IOR('t', 8, struct sgttyb) /* SunOS Specific */ 4454579826SDavid Howells #define __TIOCSETP _IOW('t', 9, struct sgttyb) /* SunOS Specific */ 4554579826SDavid Howells #define __TIOCSETN _IOW('t', 10, struct sgttyb) /* SunOS Specific */ 4654579826SDavid Howells #define TIOCEXCL _IO('t', 13) 4754579826SDavid Howells #define TIOCNXCL _IO('t', 14) 4854579826SDavid Howells #define __TIOCFLUSH _IOW('t', 16, int) /* SunOS Specific */ 4954579826SDavid Howells #define __TIOCSETC _IOW('t', 17, struct tchars) /* SunOS Specific */ 5054579826SDavid Howells #define __TIOCGETC _IOR('t', 18, struct tchars) /* SunOS Specific */ 5154579826SDavid Howells #define __TIOCTCNTL _IOW('t', 32, int) /* SunOS Specific */ 5254579826SDavid Howells #define __TIOCSIGNAL _IOW('t', 33, int) /* SunOS Specific */ 5354579826SDavid Howells #define __TIOCSETX _IOW('t', 34, int) /* SunOS Specific */ 5454579826SDavid Howells #define __TIOCGETX _IOR('t', 35, int) /* SunOS Specific */ 5554579826SDavid Howells #define TIOCCONS _IO('t', 36) 5654579826SDavid Howells #define TIOCGSOFTCAR _IOR('t', 100, int) 5754579826SDavid Howells #define TIOCSSOFTCAR _IOW('t', 101, int) 5854579826SDavid Howells #define __TIOCUCNTL _IOW('t', 102, int) /* SunOS Specific */ 5954579826SDavid Howells #define TIOCSWINSZ _IOW('t', 103, struct winsize) 6054579826SDavid Howells #define TIOCGWINSZ _IOR('t', 104, struct winsize) 6154579826SDavid Howells #define __TIOCREMOTE _IOW('t', 105, int) /* SunOS Specific */ 6254579826SDavid Howells #define TIOCMGET _IOR('t', 106, int) 6354579826SDavid Howells #define TIOCMBIC _IOW('t', 107, int) 6454579826SDavid Howells #define TIOCMBIS _IOW('t', 108, int) 6554579826SDavid Howells #define TIOCMSET _IOW('t', 109, int) 6654579826SDavid Howells #define TIOCSTART _IO('t', 110) 6754579826SDavid Howells #define TIOCSTOP _IO('t', 111) 6854579826SDavid Howells #define TIOCPKT _IOW('t', 112, int) 6954579826SDavid Howells #define TIOCNOTTY _IO('t', 113) 7054579826SDavid Howells #define TIOCSTI _IOW('t', 114, char) 7154579826SDavid Howells #define TIOCOUTQ _IOR('t', 115, int) 7254579826SDavid Howells #define __TIOCGLTC _IOR('t', 116, struct ltchars) /* SunOS Specific */ 7354579826SDavid Howells #define __TIOCSLTC _IOW('t', 117, struct ltchars) /* SunOS Specific */ 7454579826SDavid Howells /* 118 is the non-posix setpgrp tty ioctl */ 7554579826SDavid Howells /* 119 is the non-posix getpgrp tty ioctl */ 7654579826SDavid Howells #define __TIOCCDTR _IO('t', 120) /* SunOS Specific */ 7754579826SDavid Howells #define __TIOCSDTR _IO('t', 121) /* SunOS Specific */ 7854579826SDavid Howells #define TIOCCBRK _IO('t', 122) 7954579826SDavid Howells #define TIOCSBRK _IO('t', 123) 8054579826SDavid Howells #define __TIOCLGET _IOW('t', 124, int) /* SunOS Specific */ 8154579826SDavid Howells #define __TIOCLSET _IOW('t', 125, int) /* SunOS Specific */ 8254579826SDavid Howells #define __TIOCLBIC _IOW('t', 126, int) /* SunOS Specific */ 8354579826SDavid Howells #define __TIOCLBIS _IOW('t', 127, int) /* SunOS Specific */ 8454579826SDavid Howells #define __TIOCISPACE _IOR('t', 128, int) /* SunOS Specific */ 8554579826SDavid Howells #define __TIOCISIZE _IOR('t', 129, int) /* SunOS Specific */ 8654579826SDavid Howells #define TIOCSPGRP _IOW('t', 130, int) 8754579826SDavid Howells #define TIOCGPGRP _IOR('t', 131, int) 8854579826SDavid Howells #define TIOCSCTTY _IO('t', 132) 8954579826SDavid Howells #define TIOCGSID _IOR('t', 133, int) 9054579826SDavid Howells /* Get minor device of a pty master's FD -- Solaris equiv is ISPTM */ 9154579826SDavid Howells #define TIOCGPTN _IOR('t', 134, unsigned int) /* Get Pty Number */ 9254579826SDavid Howells #define TIOCSPTLCK _IOW('t', 135, int) /* Lock/unlock PTY */ 9354579826SDavid Howells #define TIOCSIG _IOW('t', 136, int) /* Generate signal on Pty slave */ 94c6325179SGleb Fotengauer-Malinovskiy #define TIOCGPTPEER _IO('t', 137) /* Safely open the slave */ 9554579826SDavid Howells 9654579826SDavid Howells /* Little f */ 9754579826SDavid Howells #define FIOCLEX _IO('f', 1) 9854579826SDavid Howells #define FIONCLEX _IO('f', 2) 9954579826SDavid Howells #define FIOASYNC _IOW('f', 125, int) 10054579826SDavid Howells #define FIONBIO _IOW('f', 126, int) 10154579826SDavid Howells #define FIONREAD _IOR('f', 127, int) 10254579826SDavid Howells #define TIOCINQ FIONREAD 10354579826SDavid Howells #define FIOQSIZE _IOR('f', 128, loff_t) 10454579826SDavid Howells 10554579826SDavid Howells /* SCARY Rutgers local SunOS kernel hackery, perhaps I will support it 10654579826SDavid Howells * someday. This is completely bogus, I know... 10754579826SDavid Howells */ 10854579826SDavid Howells #define __TCGETSTAT _IO('T', 200) /* Rutgers specific */ 10954579826SDavid Howells #define __TCSETSTAT _IO('T', 201) /* Rutgers specific */ 11054579826SDavid Howells 11154579826SDavid Howells /* Linux specific, no SunOS equivalent. */ 11254579826SDavid Howells #define TIOCLINUX 0x541C 11354579826SDavid Howells #define TIOCGSERIAL 0x541E 11454579826SDavid Howells #define TIOCSSERIAL 0x541F 11554579826SDavid Howells #define TCSBRKP 0x5425 11654579826SDavid Howells #define TIOCSERCONFIG 0x5453 11754579826SDavid Howells #define TIOCSERGWILD 0x5454 11854579826SDavid Howells #define TIOCSERSWILD 0x5455 11954579826SDavid Howells #define TIOCGLCKTRMIOS 0x5456 12054579826SDavid Howells #define TIOCSLCKTRMIOS 0x5457 12154579826SDavid Howells #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ 12254579826SDavid Howells #define TIOCSERGETLSR 0x5459 /* Get line status register */ 12354579826SDavid Howells #define TIOCSERGETMULTI 0x545A /* Get multiport config */ 12454579826SDavid Howells #define TIOCSERSETMULTI 0x545B /* Set multiport config */ 12554579826SDavid Howells #define TIOCMIWAIT 0x545C /* Wait for change on serial input line(s) */ 12654579826SDavid Howells #define TIOCGICOUNT 0x545D /* Read serial port inline interrupt counts */ 12754579826SDavid Howells 12854579826SDavid Howells /* Kernel definitions */ 12954579826SDavid Howells 13054579826SDavid Howells /* Used for packet mode */ 13154579826SDavid Howells #define TIOCPKT_DATA 0 13254579826SDavid Howells #define TIOCPKT_FLUSHREAD 1 13354579826SDavid Howells #define TIOCPKT_FLUSHWRITE 2 13454579826SDavid Howells #define TIOCPKT_STOP 4 13554579826SDavid Howells #define TIOCPKT_START 8 13654579826SDavid Howells #define TIOCPKT_NOSTOP 16 13754579826SDavid Howells #define TIOCPKT_DOSTOP 32 13854579826SDavid Howells #define TIOCPKT_IOCTL 64 13954579826SDavid Howells 14054579826SDavid Howells #endif /* _UAPI_ASM_SPARC_IOCTLS_H */ 141