OSDN Git Service

greybus: uart: Relocate UART parity/overrun/framing/break signals
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Mon, 29 Jun 2015 17:09:13 +0000 (18:09 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 1 Jul 2015 02:34:47 +0000 (19:34 -0700)
Parity/overrun/framing and break signals have been moved to the
receive-data message to more easily associate the signals with the TTY API.
Update the definitions in the protocol header and add a flags field to the
receive-data structure to facilitate transmission of those signal with the
receive-data message.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/greybus_protocols.h

index 83f8dc2..44522b0 100644 (file)
@@ -606,9 +606,16 @@ struct gb_uart_send_data_request {
        __u8    data[0];
 };
 
+/* recv-data-request flags */
+#define GB_UART_RECV_FLAG_FRAMING              0x01    /* Framing error */
+#define GB_UART_RECV_FLAG_PARITY               0x02    /* Parity error */
+#define GB_UART_RECV_FLAG_OVERRUN              0x04    /* Overrun error */
+#define GB_UART_RECV_FLAG_BREAK                        0x08    /* Break */
+
 /* Represents data from Module -> AP */
 struct gb_uart_recv_data_request {
        __le16  size;
+       __u8    flags;
        __u8    data[0];
 };
 
@@ -644,12 +651,7 @@ struct gb_uart_set_break_request {
 /* input control lines and line errors */
 #define GB_UART_CTRL_DCD                       0x01
 #define GB_UART_CTRL_DSR                       0x02
-#define GB_UART_CTRL_BRK                       0x04
-#define GB_UART_CTRL_RI                                0x08
-
-#define GB_UART_CTRL_FRAMING                   0x10
-#define GB_UART_CTRL_PARITY                    0x20
-#define GB_UART_CTRL_OVERRUN                   0x40
+#define GB_UART_CTRL_RI                                0x04
 
 struct gb_uart_serial_state_request {
        __le16  control;