diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-12-02 06:09:48 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-12-02 06:09:48 -0500 |
commit | 50f0959ad4f9ac1c5ee208bb820de299a1b3730b (patch) | |
tree | 3e4965ee4764f98ba3cd840e3733604825475998 /include/linux | |
parent | 73c3d53f38e0a8e6c67b0d12d77a8e77c082cd03 (diff) |
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')
-rw-r--r-- | include/linux/serial_sci.h | 12 |
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 { | |||
64 | SCIx_MUX_IRQ = SCIx_NR_IRQS, /* special case */ | 64 | SCIx_MUX_IRQ = SCIx_NR_IRQS, /* special case */ |
65 | }; | 65 | }; |
66 | 66 | ||
67 | /* Offsets into the sci_port->gpios array */ | ||
68 | enum { | ||
69 | SCIx_SCK, | ||
70 | SCIx_RXD, | ||
71 | SCIx_TXD, | ||
72 | SCIx_CTS, | ||
73 | SCIx_RTS, | ||
74 | |||
75 | SCIx_NR_FNS, | ||
76 | }; | ||
77 | |||
67 | enum { | 78 | enum { |
68 | SCIx_PROBE_REGTYPE, | 79 | SCIx_PROBE_REGTYPE, |
69 | 80 | ||
@@ -123,6 +134,7 @@ struct plat_sci_port_ops { | |||
123 | struct plat_sci_port { | 134 | struct plat_sci_port { |
124 | unsigned long mapbase; /* resource base */ | 135 | unsigned long mapbase; /* resource base */ |
125 | unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */ | 136 | unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */ |
137 | unsigned int gpios[SCIx_NR_FNS]; /* SCK, RXD, TXD, CTS, RTS */ | ||
126 | unsigned int type; /* SCI / SCIF / IRDA */ | 138 | unsigned int type; /* SCI / SCIF / IRDA */ |
127 | upf_t flags; /* UPF_* flags */ | 139 | upf_t flags; /* UPF_* flags */ |
128 | unsigned long capabilities; /* Port features/capabilities */ | 140 | unsigned long capabilities; /* Port features/capabilities */ |