162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 262306a36Sopenharmony_ci#ifndef _UAPI_ASM_SPARC_IOCTLS_H 362306a36Sopenharmony_ci#define _UAPI_ASM_SPARC_IOCTLS_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#include <asm/ioctl.h> 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci/* Big T */ 862306a36Sopenharmony_ci#define TCGETA _IOR('T', 1, struct termio) 962306a36Sopenharmony_ci#define TCSETA _IOW('T', 2, struct termio) 1062306a36Sopenharmony_ci#define TCSETAW _IOW('T', 3, struct termio) 1162306a36Sopenharmony_ci#define TCSETAF _IOW('T', 4, struct termio) 1262306a36Sopenharmony_ci#define TCSBRK _IO('T', 5) 1362306a36Sopenharmony_ci#define TCXONC _IO('T', 6) 1462306a36Sopenharmony_ci#define TCFLSH _IO('T', 7) 1562306a36Sopenharmony_ci#define TCGETS _IOR('T', 8, struct termios) 1662306a36Sopenharmony_ci#define TCSETS _IOW('T', 9, struct termios) 1762306a36Sopenharmony_ci#define TCSETSW _IOW('T', 10, struct termios) 1862306a36Sopenharmony_ci#define TCSETSF _IOW('T', 11, struct termios) 1962306a36Sopenharmony_ci#define TCGETS2 _IOR('T', 12, struct termios2) 2062306a36Sopenharmony_ci#define TCSETS2 _IOW('T', 13, struct termios2) 2162306a36Sopenharmony_ci#define TCSETSW2 _IOW('T', 14, struct termios2) 2262306a36Sopenharmony_ci#define TCSETSF2 _IOW('T', 15, struct termios2) 2362306a36Sopenharmony_ci#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ 2462306a36Sopenharmony_ci#define TIOCVHANGUP _IO('T', 0x37) 2562306a36Sopenharmony_ci#define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ 2662306a36Sopenharmony_ci#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ 2762306a36Sopenharmony_ci#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ 2862306a36Sopenharmony_ci#define TIOCGRS485 _IOR('T', 0x41, struct serial_rs485) 2962306a36Sopenharmony_ci#define TIOCSRS485 _IOWR('T', 0x42, struct serial_rs485) 3062306a36Sopenharmony_ci#define TIOCGISO7816 _IOR('T', 0x43, struct serial_iso7816) 3162306a36Sopenharmony_ci#define TIOCSISO7816 _IOWR('T', 0x44, struct serial_iso7816) 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci/* Note that all the ioctls that are not available in Linux have a 3462306a36Sopenharmony_ci * double underscore on the front to: a) avoid some programs to 3562306a36Sopenharmony_ci * think we support some ioctls under Linux (autoconfiguration stuff) 3662306a36Sopenharmony_ci */ 3762306a36Sopenharmony_ci/* Little t */ 3862306a36Sopenharmony_ci#define TIOCGETD _IOR('t', 0, int) 3962306a36Sopenharmony_ci#define TIOCSETD _IOW('t', 1, int) 4062306a36Sopenharmony_ci#define __TIOCHPCL _IO('t', 2) /* SunOS Specific */ 4162306a36Sopenharmony_ci#define __TIOCMODG _IOR('t', 3, int) /* SunOS Specific */ 4262306a36Sopenharmony_ci#define __TIOCMODS _IOW('t', 4, int) /* SunOS Specific */ 4362306a36Sopenharmony_ci#define __TIOCGETP _IOR('t', 8, struct sgttyb) /* SunOS Specific */ 4462306a36Sopenharmony_ci#define __TIOCSETP _IOW('t', 9, struct sgttyb) /* SunOS Specific */ 4562306a36Sopenharmony_ci#define __TIOCSETN _IOW('t', 10, struct sgttyb) /* SunOS Specific */ 4662306a36Sopenharmony_ci#define TIOCEXCL _IO('t', 13) 4762306a36Sopenharmony_ci#define TIOCNXCL _IO('t', 14) 4862306a36Sopenharmony_ci#define __TIOCFLUSH _IOW('t', 16, int) /* SunOS Specific */ 4962306a36Sopenharmony_ci#define __TIOCSETC _IOW('t', 17, struct tchars) /* SunOS Specific */ 5062306a36Sopenharmony_ci#define __TIOCGETC _IOR('t', 18, struct tchars) /* SunOS Specific */ 5162306a36Sopenharmony_ci#define __TIOCTCNTL _IOW('t', 32, int) /* SunOS Specific */ 5262306a36Sopenharmony_ci#define __TIOCSIGNAL _IOW('t', 33, int) /* SunOS Specific */ 5362306a36Sopenharmony_ci#define __TIOCSETX _IOW('t', 34, int) /* SunOS Specific */ 5462306a36Sopenharmony_ci#define __TIOCGETX _IOR('t', 35, int) /* SunOS Specific */ 5562306a36Sopenharmony_ci#define TIOCCONS _IO('t', 36) 5662306a36Sopenharmony_ci#define TIOCGSOFTCAR _IOR('t', 100, int) 5762306a36Sopenharmony_ci#define TIOCSSOFTCAR _IOW('t', 101, int) 5862306a36Sopenharmony_ci#define __TIOCUCNTL _IOW('t', 102, int) /* SunOS Specific */ 5962306a36Sopenharmony_ci#define TIOCSWINSZ _IOW('t', 103, struct winsize) 6062306a36Sopenharmony_ci#define TIOCGWINSZ _IOR('t', 104, struct winsize) 6162306a36Sopenharmony_ci#define __TIOCREMOTE _IOW('t', 105, int) /* SunOS Specific */ 6262306a36Sopenharmony_ci#define TIOCMGET _IOR('t', 106, int) 6362306a36Sopenharmony_ci#define TIOCMBIC _IOW('t', 107, int) 6462306a36Sopenharmony_ci#define TIOCMBIS _IOW('t', 108, int) 6562306a36Sopenharmony_ci#define TIOCMSET _IOW('t', 109, int) 6662306a36Sopenharmony_ci#define TIOCSTART _IO('t', 110) 6762306a36Sopenharmony_ci#define TIOCSTOP _IO('t', 111) 6862306a36Sopenharmony_ci#define TIOCPKT _IOW('t', 112, int) 6962306a36Sopenharmony_ci#define TIOCNOTTY _IO('t', 113) 7062306a36Sopenharmony_ci#define TIOCSTI _IOW('t', 114, char) 7162306a36Sopenharmony_ci#define TIOCOUTQ _IOR('t', 115, int) 7262306a36Sopenharmony_ci#define __TIOCGLTC _IOR('t', 116, struct ltchars) /* SunOS Specific */ 7362306a36Sopenharmony_ci#define __TIOCSLTC _IOW('t', 117, struct ltchars) /* SunOS Specific */ 7462306a36Sopenharmony_ci/* 118 is the non-posix setpgrp tty ioctl */ 7562306a36Sopenharmony_ci/* 119 is the non-posix getpgrp tty ioctl */ 7662306a36Sopenharmony_ci#define __TIOCCDTR _IO('t', 120) /* SunOS Specific */ 7762306a36Sopenharmony_ci#define __TIOCSDTR _IO('t', 121) /* SunOS Specific */ 7862306a36Sopenharmony_ci#define TIOCCBRK _IO('t', 122) 7962306a36Sopenharmony_ci#define TIOCSBRK _IO('t', 123) 8062306a36Sopenharmony_ci#define __TIOCLGET _IOW('t', 124, int) /* SunOS Specific */ 8162306a36Sopenharmony_ci#define __TIOCLSET _IOW('t', 125, int) /* SunOS Specific */ 8262306a36Sopenharmony_ci#define __TIOCLBIC _IOW('t', 126, int) /* SunOS Specific */ 8362306a36Sopenharmony_ci#define __TIOCLBIS _IOW('t', 127, int) /* SunOS Specific */ 8462306a36Sopenharmony_ci#define __TIOCISPACE _IOR('t', 128, int) /* SunOS Specific */ 8562306a36Sopenharmony_ci#define __TIOCISIZE _IOR('t', 129, int) /* SunOS Specific */ 8662306a36Sopenharmony_ci#define TIOCSPGRP _IOW('t', 130, int) 8762306a36Sopenharmony_ci#define TIOCGPGRP _IOR('t', 131, int) 8862306a36Sopenharmony_ci#define TIOCSCTTY _IO('t', 132) 8962306a36Sopenharmony_ci#define TIOCGSID _IOR('t', 133, int) 9062306a36Sopenharmony_ci/* Get minor device of a pty master's FD -- Solaris equiv is ISPTM */ 9162306a36Sopenharmony_ci#define TIOCGPTN _IOR('t', 134, unsigned int) /* Get Pty Number */ 9262306a36Sopenharmony_ci#define TIOCSPTLCK _IOW('t', 135, int) /* Lock/unlock PTY */ 9362306a36Sopenharmony_ci#define TIOCSIG _IOW('t', 136, int) /* Generate signal on Pty slave */ 9462306a36Sopenharmony_ci#define TIOCGPTPEER _IO('t', 137) /* Safely open the slave */ 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci/* Little f */ 9762306a36Sopenharmony_ci#define FIOCLEX _IO('f', 1) 9862306a36Sopenharmony_ci#define FIONCLEX _IO('f', 2) 9962306a36Sopenharmony_ci#define FIOASYNC _IOW('f', 125, int) 10062306a36Sopenharmony_ci#define FIONBIO _IOW('f', 126, int) 10162306a36Sopenharmony_ci#define FIONREAD _IOR('f', 127, int) 10262306a36Sopenharmony_ci#define TIOCINQ FIONREAD 10362306a36Sopenharmony_ci#define FIOQSIZE _IOR('f', 128, loff_t) 10462306a36Sopenharmony_ci 10562306a36Sopenharmony_ci/* SCARY Rutgers local SunOS kernel hackery, perhaps I will support it 10662306a36Sopenharmony_ci * someday. This is completely bogus, I know... 10762306a36Sopenharmony_ci */ 10862306a36Sopenharmony_ci#define __TCGETSTAT _IO('T', 200) /* Rutgers specific */ 10962306a36Sopenharmony_ci#define __TCSETSTAT _IO('T', 201) /* Rutgers specific */ 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ci/* Linux specific, no SunOS equivalent. */ 11262306a36Sopenharmony_ci#define TIOCLINUX 0x541C 11362306a36Sopenharmony_ci#define TIOCGSERIAL 0x541E 11462306a36Sopenharmony_ci#define TIOCSSERIAL 0x541F 11562306a36Sopenharmony_ci#define TCSBRKP 0x5425 11662306a36Sopenharmony_ci#define TIOCSERCONFIG 0x5453 11762306a36Sopenharmony_ci#define TIOCSERGWILD 0x5454 11862306a36Sopenharmony_ci#define TIOCSERSWILD 0x5455 11962306a36Sopenharmony_ci#define TIOCGLCKTRMIOS 0x5456 12062306a36Sopenharmony_ci#define TIOCSLCKTRMIOS 0x5457 12162306a36Sopenharmony_ci#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ 12262306a36Sopenharmony_ci#define TIOCSERGETLSR 0x5459 /* Get line status register */ 12362306a36Sopenharmony_ci#define TIOCSERGETMULTI 0x545A /* Get multiport config */ 12462306a36Sopenharmony_ci#define TIOCSERSETMULTI 0x545B /* Set multiport config */ 12562306a36Sopenharmony_ci#define TIOCMIWAIT 0x545C /* Wait for change on serial input line(s) */ 12662306a36Sopenharmony_ci#define TIOCGICOUNT 0x545D /* Read serial port inline interrupt counts */ 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ci/* Kernel definitions */ 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ci/* Used for packet mode */ 13162306a36Sopenharmony_ci#define TIOCPKT_DATA 0 13262306a36Sopenharmony_ci#define TIOCPKT_FLUSHREAD 1 13362306a36Sopenharmony_ci#define TIOCPKT_FLUSHWRITE 2 13462306a36Sopenharmony_ci#define TIOCPKT_STOP 4 13562306a36Sopenharmony_ci#define TIOCPKT_START 8 13662306a36Sopenharmony_ci#define TIOCPKT_NOSTOP 16 13762306a36Sopenharmony_ci#define TIOCPKT_DOSTOP 32 13862306a36Sopenharmony_ci#define TIOCPKT_IOCTL 64 13962306a36Sopenharmony_ci 14062306a36Sopenharmony_ci#endif /* _UAPI_ASM_SPARC_IOCTLS_H */ 141