summaryrefslogtreecommitdiffstats
path: root/drivers/serial/bfin_sport_uart.h
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2010-03-09 12:25:33 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-21 09:34:27 -0700
commit1f7d1c85df5b63359e7f7e3fbd1509c1cdd6414f (patch)
treea25db974be00d82156479e705a6ced9f8f84b0e3 /drivers/serial/bfin_sport_uart.h
parentb59588aae8356caf52b653a7c448c3fffdd27628 (diff)
downloadop-kernel-dev-1f7d1c85df5b63359e7f7e3fbd1509c1cdd6414f.zip
op-kernel-dev-1f7d1c85df5b63359e7f7e3fbd1509c1cdd6414f.tar.gz
serial: bfin_sport_uart: add support for CTS/RTS via GPIOs
Some people need flow control on their ports, so now boards can support that via any GPIOs. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/serial/bfin_sport_uart.h')
-rw-r--r--drivers/serial/bfin_sport_uart.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/serial/bfin_sport_uart.h b/drivers/serial/bfin_sport_uart.h
index 9791fcc..9ce253e 100644
--- a/drivers/serial/bfin_sport_uart.h
+++ b/drivers/serial/bfin_sport_uart.h
@@ -72,4 +72,15 @@
#define SPORT_TX_FIFO_SIZE 8
+#define SPORT_UART_GET_CTS(x) gpio_get_value(x->cts_pin)
+#define SPORT_UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define SPORT_UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
+
+#if defined(CONFIG_SERIAL_BFIN_SPORT0_UART_CTSRTS) \
+ || defined(CONFIG_SERIAL_BFIN_SPORT1_UART_CTSRTS) \
+ || defined(CONFIG_SERIAL_BFIN_SPORT2_UART_CTSRTS) \
+ || defined(CONFIG_SERIAL_BFIN_SPORT3_UART_CTSRTS)
+# define CONFIG_SERIAL_BFIN_SPORT_CTSRTS
+#endif
+
#endif /* _BFIN_SPORT_UART_H */
OpenPOWER on IntegriCloud