Arnd Bergmann | 6103ec5 | 2009-05-13 22:56:27 +0000 | [diff] [blame] | 1 | #ifndef __ASM_GENERIC_IOCTLS_H |
| 2 | #define __ASM_GENERIC_IOCTLS_H |
| 3 | |
| 4 | #include <linux/ioctl.h> |
| 5 | |
| 6 | /* |
| 7 | * These are the most common definitions for tty ioctl numbers. |
| 8 | * Most of them do not use the recommended _IOC(), but there is |
| 9 | * probably some source code out there hardcoding the number, |
| 10 | * so we might as well use them for all new platforms. |
| 11 | * |
| 12 | * The architectures that use different values here typically |
| 13 | * try to be compatible with some Unix variants for the same |
| 14 | * architecture. |
| 15 | */ |
| 16 | |
| 17 | /* 0x54 is just a magic number to make these relatively unique ('T') */ |
| 18 | |
| 19 | #define TCGETS 0x5401 |
| 20 | #define TCSETS 0x5402 |
| 21 | #define TCSETSW 0x5403 |
| 22 | #define TCSETSF 0x5404 |
| 23 | #define TCGETA 0x5405 |
| 24 | #define TCSETA 0x5406 |
| 25 | #define TCSETAW 0x5407 |
| 26 | #define TCSETAF 0x5408 |
| 27 | #define TCSBRK 0x5409 |
| 28 | #define TCXONC 0x540A |
| 29 | #define TCFLSH 0x540B |
| 30 | #define TIOCEXCL 0x540C |
| 31 | #define TIOCNXCL 0x540D |
| 32 | #define TIOCSCTTY 0x540E |
| 33 | #define TIOCGPGRP 0x540F |
| 34 | #define TIOCSPGRP 0x5410 |
| 35 | #define TIOCOUTQ 0x5411 |
| 36 | #define TIOCSTI 0x5412 |
| 37 | #define TIOCGWINSZ 0x5413 |
| 38 | #define TIOCSWINSZ 0x5414 |
| 39 | #define TIOCMGET 0x5415 |
| 40 | #define TIOCMBIS 0x5416 |
| 41 | #define TIOCMBIC 0x5417 |
| 42 | #define TIOCMSET 0x5418 |
| 43 | #define TIOCGSOFTCAR 0x5419 |
| 44 | #define TIOCSSOFTCAR 0x541A |
| 45 | #define FIONREAD 0x541B |
| 46 | #define TIOCINQ FIONREAD |
| 47 | #define TIOCLINUX 0x541C |
| 48 | #define TIOCCONS 0x541D |
| 49 | #define TIOCGSERIAL 0x541E |
| 50 | #define TIOCSSERIAL 0x541F |
| 51 | #define TIOCPKT 0x5420 |
| 52 | #define FIONBIO 0x5421 |
| 53 | #define TIOCNOTTY 0x5422 |
| 54 | #define TIOCSETD 0x5423 |
| 55 | #define TIOCGETD 0x5424 |
| 56 | #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ |
| 57 | #define TIOCSBRK 0x5427 /* BSD compatibility */ |
| 58 | #define TIOCCBRK 0x5428 /* BSD compatibility */ |
| 59 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ |
| 60 | #define TCGETS2 _IOR('T', 0x2A, struct termios2) |
| 61 | #define TCSETS2 _IOW('T', 0x2B, struct termios2) |
| 62 | #define TCSETSW2 _IOW('T', 0x2C, struct termios2) |
| 63 | #define TCSETSF2 _IOW('T', 0x2D, struct termios2) |
| 64 | #define TIOCGRS485 0x542E |
Jeff Mahoney | 8bc3372 | 2010-08-20 17:14:04 -0400 | [diff] [blame] | 65 | #ifndef TIOCSRS485 |
Arnd Bergmann | 6103ec5 | 2009-05-13 22:56:27 +0000 | [diff] [blame] | 66 | #define TIOCSRS485 0x542F |
Jeff Mahoney | 8bc3372 | 2010-08-20 17:14:04 -0400 | [diff] [blame] | 67 | #endif |
Arnd Bergmann | 6103ec5 | 2009-05-13 22:56:27 +0000 | [diff] [blame] | 68 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
| 69 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ |
Werner Fink | b7b8de0 | 2010-12-03 12:48:23 +0100 | [diff] [blame] | 70 | #define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */ |
Arnd Bergmann | 6103ec5 | 2009-05-13 22:56:27 +0000 | [diff] [blame] | 71 | #define TCGETX 0x5432 /* SYS5 TCGETX compatibility */ |
| 72 | #define TCSETX 0x5433 |
| 73 | #define TCSETXF 0x5434 |
| 74 | #define TCSETXW 0x5435 |
hyc@symas.com | 26df6d1 | 2010-06-22 10:14:49 -0700 | [diff] [blame] | 75 | #define TIOCSIG _IOW('T', 0x36, int) /* pty: generate signal */ |
Kay Sievers | 3c95c98 | 2011-02-17 18:39:28 +0100 | [diff] [blame] | 76 | #define TIOCVHANGUP 0x5437 |
Cyrill Gorcunov | c629803 | 2012-10-24 23:43:21 +0400 | [diff] [blame] | 77 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ |
| 78 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ |
| 79 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ |
Arnd Bergmann | 6103ec5 | 2009-05-13 22:56:27 +0000 | [diff] [blame] | 80 | |
| 81 | #define FIONCLEX 0x5450 |
| 82 | #define FIOCLEX 0x5451 |
| 83 | #define FIOASYNC 0x5452 |
| 84 | #define TIOCSERCONFIG 0x5453 |
| 85 | #define TIOCSERGWILD 0x5454 |
| 86 | #define TIOCSERSWILD 0x5455 |
| 87 | #define TIOCGLCKTRMIOS 0x5456 |
| 88 | #define TIOCSLCKTRMIOS 0x5457 |
| 89 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ |
| 90 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ |
| 91 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ |
| 92 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ |
| 93 | |
| 94 | #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ |
| 95 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ |
| 96 | |
| 97 | /* |
Jeff Dike | 39e5322 | 2010-06-17 15:15:16 -0400 | [diff] [blame] | 98 | * Some arches already define FIOQSIZE due to a historical |
| 99 | * conflict with a Hayes modem-specific ioctl value. |
Arnd Bergmann | 6103ec5 | 2009-05-13 22:56:27 +0000 | [diff] [blame] | 100 | */ |
| 101 | #ifndef FIOQSIZE |
Arnd Bergmann | 6103ec5 | 2009-05-13 22:56:27 +0000 | [diff] [blame] | 102 | # define FIOQSIZE 0x5460 |
| 103 | #endif |
| 104 | |
| 105 | /* Used for packet mode */ |
| 106 | #define TIOCPKT_DATA 0 |
| 107 | #define TIOCPKT_FLUSHREAD 1 |
| 108 | #define TIOCPKT_FLUSHWRITE 2 |
| 109 | #define TIOCPKT_STOP 4 |
| 110 | #define TIOCPKT_START 8 |
| 111 | #define TIOCPKT_NOSTOP 16 |
| 112 | #define TIOCPKT_DOSTOP 32 |
hyc@symas.com | 26df6d1 | 2010-06-22 10:14:49 -0700 | [diff] [blame] | 113 | #define TIOCPKT_IOCTL 64 |
Arnd Bergmann | 6103ec5 | 2009-05-13 22:56:27 +0000 | [diff] [blame] | 114 | |
| 115 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
| 116 | |
| 117 | #endif /* __ASM_GENERIC_IOCTLS_H */ |