From f3df69322166f01f8b5f2555dbd448d144f2b3c9 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 13 Oct 2008 10:37:48 +0100 Subject: [PATCH] --- yaml --- r: 113440 b: refs/heads/master c: c26c56c0f40e200e61d1390629c806f6adaffbcc h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/asm-x86/ioctls.h | 2 ++ trunk/include/linux/serial.h | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index f7a7c316cc01..0b07a8a363e2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6f967f7891076abc09e12ce952f85825e7ee8caf +refs/heads/master: c26c56c0f40e200e61d1390629c806f6adaffbcc diff --git a/trunk/include/asm-x86/ioctls.h b/trunk/include/asm-x86/ioctls.h index 336603512399..1a8ac45b28be 100644 --- a/trunk/include/asm-x86/ioctls.h +++ b/trunk/include/asm-x86/ioctls.h @@ -51,6 +51,8 @@ #define TCSETS2 _IOW('T', 0x2B, struct termios2) #define TCSETSW2 _IOW('T', 0x2C, struct termios2) #define TCSETSF2 _IOW('T', 0x2D, struct termios2) +#define TIOCGRS485 0x542E +#define TIOCSRS485 0x542F #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ diff --git a/trunk/include/linux/serial.h b/trunk/include/linux/serial.h index deb714314fb1..1ea8d9265bf6 100644 --- a/trunk/include/linux/serial.h +++ b/trunk/include/linux/serial.h @@ -173,6 +173,22 @@ struct serial_icounter_struct { int reserved[9]; }; +/* + * Serial interface for controlling RS485 settings on chips with suitable + * support. Set with TIOCSRS485 and get with TIOCGRS485 if supported by your + * platform. The set function returns the new state, with any unsupported bits + * reverted appropriately. + */ + +struct serial_rs485 { + __u32 flags; /* RS485 feature flags */ +#define SER_RS485_ENABLED (1 << 0) +#define SER_RS485_RTS_ON_SEND (1 << 1) +#define SER_RS485_RTS_AFTER_SEND (1 << 2) + __u32 delay_rts_before_send; /* Milliseconds */ + __u32 padding[6]; /* Memory is cheap, new structs + are a royal PITA .. */ +}; #ifdef __KERNEL__ #include