| 1 |
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 |
#ifndef _UAPI_ASM_SPARC_IOCTLS_H |
| 3 |
#define _UAPI_ASM_SPARC_IOCTLS_H |
| 4 |
|
| 5 |
#include <asm/ioctl.h> |
| 6 |
|
| 7 |
/* Big T */ |
| 8 |
#define TCGETA 0x40125401 /* _IOR('T', 1, struct termio) */ |
| 9 |
#define TCSETA 0x80125402 /* _IOW('T', 2, struct termio) */ |
| 10 |
#define TCSETAW 0x80125403 /* _IOW('T', 3, struct termio) */ |
| 11 |
#define TCSETAF 0x80125404 /* _IOW('T', 4, struct termio) */ |
| 12 |
#define TCSBRK _IO('T', 5) |
| 13 |
#define TCXONC _IO('T', 6) |
| 14 |
#define TCFLSH _IO('T', 7) |
| 15 |
#define TCGETS _IOR('T', 8, struct termios) |
| 16 |
#define TCSETS _IOW('T', 9, struct termios) |
| 17 |
#define TCSETSW _IOW('T', 10, struct termios) |
| 18 |
#define TCSETSF _IOW('T', 11, struct termios) |
| 19 |
#define TCGETS2 _IOR('T', 12, struct termios2) |
| 20 |
#define TCSETS2 _IOW('T', 13, struct termios2) |
| 21 |
#define TCSETSW2 _IOW('T', 14, struct termios2) |
| 22 |
#define TCSETSF2 _IOW('T', 15, struct termios2) |
| 23 |
#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ |
| 24 |
#define TIOCVHANGUP _IO('T', 0x37) |
| 25 |
#define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ |
| 26 |
#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ |
| 27 |
#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ |
| 28 |
#define TIOCGRS485 _IOR('T', 0x41, struct serial_rs485) |
| 29 |
#define TIOCSRS485 _IOWR('T', 0x42, struct serial_rs485) |
| 30 |
#define TIOCGISO7816 _IOR('T', 0x43, struct serial_iso7816) |
| 31 |
#define TIOCSISO7816 _IOWR('T', 0x44, struct serial_iso7816) |
| 32 |
|
| 33 |
/* Note that all the ioctls that are not available in Linux have a |
| 34 |
* double underscore on the front to: a) avoid some programs to |
| 35 |
* think we support some ioctls under Linux (autoconfiguration stuff) |
| 36 |
*/ |
| 37 |
/* Little t */ |
| 38 |
#define TIOCGETD _IOR('t', 0, int) |
| 39 |
#define TIOCSETD _IOW('t', 1, int) |
| 40 |
#define __TIOCHPCL _IO('t', 2) /* SunOS Specific */ |
| 41 |
#define __TIOCMODG _IOR('t', 3, int) /* SunOS Specific */ |
| 42 |
#define __TIOCMODS _IOW('t', 4, int) /* SunOS Specific */ |
| 43 |
#define __TIOCGETP _IOR('t', 8, struct sgttyb) /* SunOS Specific */ |
| 44 |
#define __TIOCSETP _IOW('t', 9, struct sgttyb) /* SunOS Specific */ |
| 45 |
#define __TIOCSETN _IOW('t', 10, struct sgttyb) /* SunOS Specific */ |
| 46 |
#define TIOCEXCL _IO('t', 13) |
| 47 |
#define TIOCNXCL _IO('t', 14) |
| 48 |
#define __TIOCFLUSH _IOW('t', 16, int) /* SunOS Specific */ |
| 49 |
#define __TIOCSETC _IOW('t', 17, struct tchars) /* SunOS Specific */ |
| 50 |
#define __TIOCGETC _IOR('t', 18, struct tchars) /* SunOS Specific */ |
| 51 |
#define __TIOCTCNTL _IOW('t', 32, int) /* SunOS Specific */ |
| 52 |
#define __TIOCSIGNAL _IOW('t', 33, int) /* SunOS Specific */ |
| 53 |
#define __TIOCSETX _IOW('t', 34, int) /* SunOS Specific */ |
| 54 |
#define __TIOCGETX _IOR('t', 35, int) /* SunOS Specific */ |
| 55 |
#define TIOCCONS _IO('t', 36) |
| 56 |
#define TIOCGSOFTCAR _IOR('t', 100, int) |
| 57 |
#define TIOCSSOFTCAR _IOW('t', 101, int) |
| 58 |
#define __TIOCUCNTL _IOW('t', 102, int) /* SunOS Specific */ |
| 59 |
#define TIOCSWINSZ _IOW('t', 103, struct winsize) |
| 60 |
#define TIOCGWINSZ _IOR('t', 104, struct winsize) |
| 61 |
#define __TIOCREMOTE _IOW('t', 105, int) /* SunOS Specific */ |
| 62 |
#define TIOCMGET _IOR('t', 106, int) |
| 63 |
#define TIOCMBIC _IOW('t', 107, int) |
| 64 |
#define TIOCMBIS _IOW('t', 108, int) |
| 65 |
#define TIOCMSET _IOW('t', 109, int) |
| 66 |
#define TIOCSTART _IO('t', 110) |
| 67 |
#define TIOCSTOP _IO('t', 111) |
| 68 |
#define TIOCPKT _IOW('t', 112, int) |
| 69 |
#define TIOCNOTTY _IO('t', 113) |
| 70 |
#define TIOCSTI _IOW('t', 114, char) |
| 71 |
#define TIOCOUTQ _IOR('t', 115, int) |
| 72 |
#define __TIOCGLTC _IOR('t', 116, struct ltchars) /* SunOS Specific */ |
| 73 |
#define __TIOCSLTC _IOW('t', 117, struct ltchars) /* SunOS Specific */ |
| 74 |
/* 118 is the non-posix setpgrp tty ioctl */ |
| 75 |
/* 119 is the non-posix getpgrp tty ioctl */ |
| 76 |
#define __TIOCCDTR _IO('t', 120) /* SunOS Specific */ |
| 77 |
#define __TIOCSDTR _IO('t', 121) /* SunOS Specific */ |
| 78 |
#define TIOCCBRK _IO('t', 122) |
| 79 |
#define TIOCSBRK _IO('t', 123) |
| 80 |
#define __TIOCLGET _IOW('t', 124, int) /* SunOS Specific */ |
| 81 |
#define __TIOCLSET _IOW('t', 125, int) /* SunOS Specific */ |
| 82 |
#define __TIOCLBIC _IOW('t', 126, int) /* SunOS Specific */ |
| 83 |
#define __TIOCLBIS _IOW('t', 127, int) /* SunOS Specific */ |
| 84 |
#define __TIOCISPACE _IOR('t', 128, int) /* SunOS Specific */ |
| 85 |
#define __TIOCISIZE _IOR('t', 129, int) /* SunOS Specific */ |
| 86 |
#define TIOCSPGRP _IOW('t', 130, int) |
| 87 |
#define TIOCGPGRP _IOR('t', 131, int) |
| 88 |
#define TIOCSCTTY _IO('t', 132) |
| 89 |
#define TIOCGSID _IOR('t', 133, int) |
| 90 |
/* Get minor device of a pty master's FD -- Solaris equiv is ISPTM */ |
| 91 |
#define TIOCGPTN _IOR('t', 134, unsigned int) /* Get Pty Number */ |
| 92 |
#define TIOCSPTLCK _IOW('t', 135, int) /* Lock/unlock PTY */ |
| 93 |
#define TIOCSIG _IOW('t', 136, int) /* Generate signal on Pty slave */ |
| 94 |
#define TIOCGPTPEER _IO('t', 137) /* Safely open the slave */ |
| 95 |
|
| 96 |
/* Little f */ |
| 97 |
#define FIOCLEX _IO('f', 1) |
| 98 |
#define FIONCLEX _IO('f', 2) |
| 99 |
#define FIOASYNC _IOW('f', 125, int) |
| 100 |
#define FIONBIO _IOW('f', 126, int) |
| 101 |
#define FIONREAD _IOR('f', 127, int) |
| 102 |
#define TIOCINQ FIONREAD |
| 103 |
#define FIOQSIZE _IOR('f', 128, loff_t) |
| 104 |
|
| 105 |
/* SCARY Rutgers local SunOS kernel hackery, perhaps I will support it |
| 106 |
* someday. This is completely bogus, I know... |
| 107 |
*/ |
| 108 |
#define __TCGETSTAT _IO('T', 200) /* Rutgers specific */ |
| 109 |
#define __TCSETSTAT _IO('T', 201) /* Rutgers specific */ |
| 110 |
|
| 111 |
/* Linux specific, no SunOS equivalent. */ |
| 112 |
#define TIOCLINUX 0x541C |
| 113 |
#define TIOCGSERIAL 0x541E |
| 114 |
#define TIOCSSERIAL 0x541F |
| 115 |
#define TCSBRKP 0x5425 |
| 116 |
#define TIOCSERCONFIG 0x5453 |
| 117 |
#define TIOCSERGWILD 0x5454 |
| 118 |
#define TIOCSERSWILD 0x5455 |
| 119 |
#define TIOCGLCKTRMIOS 0x5456 |
| 120 |
#define TIOCSLCKTRMIOS 0x5457 |
| 121 |
#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ |
| 122 |
#define TIOCSERGETLSR 0x5459 /* Get line status register */ |
| 123 |
#define TIOCSERGETMULTI 0x545A /* Get multiport config */ |
| 124 |
#define TIOCSERSETMULTI 0x545B /* Set multiport config */ |
| 125 |
#define TIOCMIWAIT 0x545C /* Wait for change on serial input line(s) */ |
| 126 |
#define TIOCGICOUNT 0x545D /* Read serial port inline interrupt counts */ |
| 127 |
|
| 128 |
/* Kernel definitions */ |
| 129 |
|
| 130 |
/* Used for packet mode */ |
| 131 |
#define TIOCPKT_DATA 0 |
| 132 |
#define TIOCPKT_FLUSHREAD 1 |
| 133 |
#define TIOCPKT_FLUSHWRITE 2 |
| 134 |
#define TIOCPKT_STOP 4 |
| 135 |
#define TIOCPKT_START 8 |
| 136 |
#define TIOCPKT_NOSTOP 16 |
| 137 |
#define TIOCPKT_DOSTOP 32 |
| 138 |
#define TIOCPKT_IOCTL 64 |
| 139 |
|
| 140 |
#endif /* _UAPI_ASM_SPARC_IOCTLS_H */ |