]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/serial.h
tty: Cris has a nice RS485 ioctl so we should steal it
[linux-2.6-omap-h63xx.git] / include / linux / serial.h
index deb714314fb169de39bf195921c01b2a7e8085a6..1ea8d9265bf67c5bc52d1a43b2557d9ae661c2df 100644 (file)
@@ -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 <linux/compiler.h>