summaryrefslogtreecommitdiffstats
path: root/drivers/serial/cpm_uart/cpm_uart.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurentp@cse-semaphore.com>2008-07-24 18:36:37 +0200
committerKumar Gala <galak@kernel.crashing.org>2008-07-28 07:48:04 -0500
commit7485d26b7e13ee8ff82adb271ac90a996c1fe830 (patch)
tree13bc7e6f30aa6cfb039e780b597f264eccf9d3df /drivers/serial/cpm_uart/cpm_uart.h
parentdc2380ec8572fcd7f7e9579afc9fb223300d922f (diff)
downloadtalos-obmc-linux-7485d26b7e13ee8ff82adb271ac90a996c1fe830.tar.gz
talos-obmc-linux-7485d26b7e13ee8ff82adb271ac90a996c1fe830.zip
cpm_uart: Modem control lines support
This patch replaces the get_mctrl/set_mctrl stubs with modem control line read/write access through the GPIO lib. Available modem control lines are described in the device tree using GPIO bindings. The driver expect a GPIO pin for each of the CTS, RTS, DCD, DSR, DTR and RI signals. Unused control lines can be left out. Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers/serial/cpm_uart/cpm_uart.h')
-rw-r--r--drivers/serial/cpm_uart/cpm_uart.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart.h b/drivers/serial/cpm_uart/cpm_uart.h
index 5c76e0ae0582..5999ef5ac78e 100644
--- a/drivers/serial/cpm_uart/cpm_uart.h
+++ b/drivers/serial/cpm_uart/cpm_uart.h
@@ -50,6 +50,15 @@
#define SCC_WAIT_CLOSING 100
+#define GPIO_CTS 0
+#define GPIO_RTS 1
+#define GPIO_DCD 2
+#define GPIO_DSR 3
+#define GPIO_DTR 4
+#define GPIO_RI 5
+
+#define NUM_GPIOS (GPIO_RI+1)
+
struct uart_cpm_port {
struct uart_port port;
u16 rx_nrfifos;
@@ -82,6 +91,7 @@ struct uart_cpm_port {
int wait_closing;
/* value to combine with opcode to form cpm command */
u32 command;
+ int gpios[NUM_GPIOS];
};
extern int cpm_uart_nr;
OpenPOWER on IntegriCloud