greybus: uart: Implement flush_buffer
authorAxel Haslam <ahaslam@baylibre.com>
Tue, 31 May 2016 12:36:12 +0000 (14:36 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 1 Jun 2016 00:18:18 +0000 (17:18 -0700)
commit2b3b87f056b276b688cb0429faf682cac33dbf7b
tree87195edc1814cc9c28ae3d3c8194f305e999d1eb
parenta8bc00fb88037e0107a0682478f47396a073be5c
greybus: uart: Implement flush_buffer

Data may be held pening in the hardware because of flow
control mechanisms. When the port is closed, we need to flush
all data that was not sent.

For this, use the greybus message GB_UART_TYPE_FLUSH_FIFOS
which will flush all data queued on the module but not
yet sent on the data line.

Suggested-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/greybus_protocols.h
drivers/staging/greybus/uart.c