aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/serial_sci.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-12-02 20:09:48 +0900
committerPaul Mundt <lethal@linux-sh.org>2011-12-02 20:09:48 +0900
commit50f0959ad4f9ac1c5ee208bb820de299a1b3730b (patch)
tree3e4965ee4764f98ba3cd840e3733604825475998 /include/linux/serial_sci.h
parentserial: sh-sci: Avoid FIFO clear for MCE toggle. (diff)
downloadlinux-dev-50f0959ad4f9ac1c5ee208bb820de299a1b3730b.tar.xz
linux-dev-50f0959ad4f9ac1c5ee208bb820de299a1b3730b.zip
serial: sh-sci: Handle GPIO function requests.
This adds initial support for requesting the various GPIO functions necessary for certain ports. This just plugs in dumb request/free logic, but serves as a building block for migrating off of the ->init_pins mess to a wholly gpiolib backed solution (primarily parts with external RTS/CTS pins, but will also allow us to clean up RXD pin testing). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/linux/serial_sci.h')
-rw-r--r--include/linux/serial_sci.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h
index 15b1bdcaa9f5..78779074f6e8 100644
--- a/include/linux/serial_sci.h
+++ b/include/linux/serial_sci.h
@@ -64,6 +64,17 @@ enum {
SCIx_MUX_IRQ = SCIx_NR_IRQS, /* special case */
};
+/* Offsets into the sci_port->gpios array */
+enum {
+ SCIx_SCK,
+ SCIx_RXD,
+ SCIx_TXD,
+ SCIx_CTS,
+ SCIx_RTS,
+
+ SCIx_NR_FNS,
+};
+
enum {
SCIx_PROBE_REGTYPE,
@@ -123,6 +134,7 @@ struct plat_sci_port_ops {
struct plat_sci_port {
unsigned long mapbase; /* resource base */
unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */
+ unsigned int gpios[SCIx_NR_FNS]; /* SCK, RXD, TXD, CTS, RTS */
unsigned int type; /* SCI / SCIF / IRDA */
upf_t flags; /* UPF_* flags */
unsigned long capabilities; /* Port features/capabilities */