diff options
author | Alan Cox <alan@redhat.com> | 2008-07-22 06:09:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 16:03:22 -0400 |
commit | 80359a9c5c03d585686e2596c9ee46703eb03047 (patch) | |
tree | dcf823d8b97c50c0a0f310936c351af3516574ac /drivers/usb/serial/whiteheat.h | |
parent | 95da310e66ee8090119596c70ca8432e57f9a97f (diff) |
whiteheat: coding style
Bring ezusb and whiteheat into line with the coding style
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/serial/whiteheat.h')
-rw-r--r-- | drivers/usb/serial/whiteheat.h | 78 |
1 files changed, 51 insertions, 27 deletions
diff --git a/drivers/usb/serial/whiteheat.h b/drivers/usb/serial/whiteheat.h index f16079705664..38065df4d2d8 100644 --- a/drivers/usb/serial/whiteheat.h +++ b/drivers/usb/serial/whiteheat.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * USB ConnectTech WhiteHEAT driver | 2 | * USB ConnectTech WhiteHEAT driver |
3 | * | 3 | * |
4 | * Copyright (C) 2002 | 4 | * Copyright (C) 2002 |
5 | * Connect Tech Inc. | 5 | * Connect Tech Inc. |
6 | * | 6 | * |
7 | * Copyright (C) 1999, 2000 | 7 | * Copyright (C) 1999, 2000 |
8 | * Greg Kroah-Hartman (greg@kroah.com) | 8 | * Greg Kroah-Hartman (greg@kroah.com) |
@@ -12,7 +12,8 @@ | |||
12 | * the Free Software Foundation; either version 2 of the License, or | 12 | * the Free Software Foundation; either version 2 of the License, or |
13 | * (at your option) any later version. | 13 | * (at your option) any later version. |
14 | * | 14 | * |
15 | * See Documentation/usb/usb-serial.txt for more information on using this driver | 15 | * See Documentation/usb/usb-serial.txt for more information on using this |
16 | * driver | ||
16 | * | 17 | * |
17 | */ | 18 | */ |
18 | 19 | ||
@@ -30,13 +31,16 @@ | |||
30 | #define WHITEHEAT_DUMP 7 /* dump memory */ | 31 | #define WHITEHEAT_DUMP 7 /* dump memory */ |
31 | #define WHITEHEAT_STATUS 8 /* get status */ | 32 | #define WHITEHEAT_STATUS 8 /* get status */ |
32 | #define WHITEHEAT_PURGE 9 /* clear the UART fifos */ | 33 | #define WHITEHEAT_PURGE 9 /* clear the UART fifos */ |
33 | #define WHITEHEAT_GET_DTR_RTS 10 /* get the state of DTR and RTS for a port */ | 34 | #define WHITEHEAT_GET_DTR_RTS 10 /* get the state of DTR and RTS |
34 | #define WHITEHEAT_GET_HW_INFO 11 /* get EEPROM info and hardware ID */ | 35 | for a port */ |
36 | #define WHITEHEAT_GET_HW_INFO 11 /* get EEPROM info and | ||
37 | hardware ID */ | ||
35 | #define WHITEHEAT_REPORT_TX_DONE 12 /* get the next TX done */ | 38 | #define WHITEHEAT_REPORT_TX_DONE 12 /* get the next TX done */ |
36 | #define WHITEHEAT_EVENT 13 /* unsolicited status events */ | 39 | #define WHITEHEAT_EVENT 13 /* unsolicited status events */ |
37 | #define WHITEHEAT_ECHO 14 /* send data to the indicated IN endpoint */ | 40 | #define WHITEHEAT_ECHO 14 /* send data to the indicated |
38 | #define WHITEHEAT_DO_TEST 15 /* perform the specified test */ | 41 | IN endpoint */ |
39 | #define WHITEHEAT_CMD_COMPLETE 16 /* reply for certain commands */ | 42 | #define WHITEHEAT_DO_TEST 15 /* perform specified test */ |
43 | #define WHITEHEAT_CMD_COMPLETE 16 /* reply for some commands */ | ||
40 | #define WHITEHEAT_CMD_FAILURE 17 /* reply for failed commands */ | 44 | #define WHITEHEAT_CMD_FAILURE 17 /* reply for failed commands */ |
41 | 45 | ||
42 | 46 | ||
@@ -67,20 +71,28 @@ struct whiteheat_simple { | |||
67 | #define WHITEHEAT_PAR_MARK '1' /* mark (force 1) parity */ | 71 | #define WHITEHEAT_PAR_MARK '1' /* mark (force 1) parity */ |
68 | 72 | ||
69 | #define WHITEHEAT_SFLOW_NONE 'n' /* no software flow control */ | 73 | #define WHITEHEAT_SFLOW_NONE 'n' /* no software flow control */ |
70 | #define WHITEHEAT_SFLOW_RX 'r' /* XOFF/ON is sent when RX fills/empties */ | 74 | #define WHITEHEAT_SFLOW_RX 'r' /* XOFF/ON is sent when RX |
71 | #define WHITEHEAT_SFLOW_TX 't' /* when received XOFF/ON will stop/start TX */ | 75 | fills/empties */ |
76 | #define WHITEHEAT_SFLOW_TX 't' /* when received XOFF/ON will | ||
77 | stop/start TX */ | ||
72 | #define WHITEHEAT_SFLOW_RXTX 'b' /* both SFLOW_RX and SFLOW_TX */ | 78 | #define WHITEHEAT_SFLOW_RXTX 'b' /* both SFLOW_RX and SFLOW_TX */ |
73 | 79 | ||
74 | #define WHITEHEAT_HFLOW_NONE 0x00 /* no hardware flow control */ | 80 | #define WHITEHEAT_HFLOW_NONE 0x00 /* no hardware flow control */ |
75 | #define WHITEHEAT_HFLOW_RTS_TOGGLE 0x01 /* RTS is on during transmit, off otherwise */ | 81 | #define WHITEHEAT_HFLOW_RTS_TOGGLE 0x01 /* RTS is on during transmit, |
76 | #define WHITEHEAT_HFLOW_DTR 0x02 /* DTR is off/on when RX fills/empties */ | 82 | off otherwise */ |
77 | #define WHITEHEAT_HFLOW_CTS 0x08 /* when received CTS off/on will stop/start TX */ | 83 | #define WHITEHEAT_HFLOW_DTR 0x02 /* DTR is off/on when RX |
78 | #define WHITEHEAT_HFLOW_DSR 0x10 /* when received DSR off/on will stop/start TX */ | 84 | fills/empties */ |
79 | #define WHITEHEAT_HFLOW_RTS 0x80 /* RTS is off/on when RX fills/empties */ | 85 | #define WHITEHEAT_HFLOW_CTS 0x08 /* when received CTS off/on |
86 | will stop/start TX */ | ||
87 | #define WHITEHEAT_HFLOW_DSR 0x10 /* when received DSR off/on | ||
88 | will stop/start TX */ | ||
89 | #define WHITEHEAT_HFLOW_RTS 0x80 /* RTS is off/on when RX | ||
90 | fills/empties */ | ||
80 | 91 | ||
81 | struct whiteheat_port_settings { | 92 | struct whiteheat_port_settings { |
82 | __u8 port; /* port number (1 to N) */ | 93 | __u8 port; /* port number (1 to N) */ |
83 | __u32 baud; /* any value 7 - 460800, firmware calculates best fit; arrives little endian */ | 94 | __u32 baud; /* any value 7 - 460800, firmware calculates |
95 | best fit; arrives little endian */ | ||
84 | __u8 bits; /* 5, 6, 7, or 8 */ | 96 | __u8 bits; /* 5, 6, 7, or 8 */ |
85 | __u8 stop; /* 1 or 2, default 1 (2 = 1.5 if bits = 5) */ | 97 | __u8 stop; /* 1 or 2, default 1 (2 = 1.5 if bits = 5) */ |
86 | __u8 parity; /* see WHITEHEAT_PAR_* above */ | 98 | __u8 parity; /* see WHITEHEAT_PAR_* above */ |
@@ -167,12 +179,14 @@ struct whiteheat_echo { | |||
167 | */ | 179 | */ |
168 | #define WHITEHEAT_TEST_UART_RW 0x01 /* read/write uart registers */ | 180 | #define WHITEHEAT_TEST_UART_RW 0x01 /* read/write uart registers */ |
169 | #define WHITEHEAT_TEST_UART_INTR 0x02 /* uart interrupt */ | 181 | #define WHITEHEAT_TEST_UART_INTR 0x02 /* uart interrupt */ |
170 | #define WHITEHEAT_TEST_SETUP_CONT 0x03 /* setup for PORT_CONT/PORT_DISCONT */ | 182 | #define WHITEHEAT_TEST_SETUP_CONT 0x03 /* setup for |
183 | PORT_CONT/PORT_DISCONT */ | ||
171 | #define WHITEHEAT_TEST_PORT_CONT 0x04 /* port connect */ | 184 | #define WHITEHEAT_TEST_PORT_CONT 0x04 /* port connect */ |
172 | #define WHITEHEAT_TEST_PORT_DISCONT 0x05 /* port disconnect */ | 185 | #define WHITEHEAT_TEST_PORT_DISCONT 0x05 /* port disconnect */ |
173 | #define WHITEHEAT_TEST_UART_CLK_START 0x06 /* uart clock test start */ | 186 | #define WHITEHEAT_TEST_UART_CLK_START 0x06 /* uart clock test start */ |
174 | #define WHITEHEAT_TEST_UART_CLK_STOP 0x07 /* uart clock test stop */ | 187 | #define WHITEHEAT_TEST_UART_CLK_STOP 0x07 /* uart clock test stop */ |
175 | #define WHITEHEAT_TEST_MODEM_FT 0x08 /* modem signals, requires a loopback cable/connector */ | 188 | #define WHITEHEAT_TEST_MODEM_FT 0x08 /* modem signals, requires a |
189 | loopback cable/connector */ | ||
176 | #define WHITEHEAT_TEST_ERASE_EEPROM 0x09 /* erase eeprom */ | 190 | #define WHITEHEAT_TEST_ERASE_EEPROM 0x09 /* erase eeprom */ |
177 | #define WHITEHEAT_TEST_READ_EEPROM 0x0a /* read eeprom */ | 191 | #define WHITEHEAT_TEST_READ_EEPROM 0x0a /* read eeprom */ |
178 | #define WHITEHEAT_TEST_PROGRAM_EEPROM 0x0b /* program eeprom */ | 192 | #define WHITEHEAT_TEST_PROGRAM_EEPROM 0x0b /* program eeprom */ |
@@ -198,19 +212,27 @@ struct whiteheat_test { | |||
198 | #define WHITEHEAT_EVENT_CONNECT 0x08 /* connect field is valid */ | 212 | #define WHITEHEAT_EVENT_CONNECT 0x08 /* connect field is valid */ |
199 | 213 | ||
200 | #define WHITEHEAT_FLOW_NONE 0x00 /* no flow control active */ | 214 | #define WHITEHEAT_FLOW_NONE 0x00 /* no flow control active */ |
201 | #define WHITEHEAT_FLOW_HARD_OUT 0x01 /* TX is stopped by CTS (waiting for CTS to go on) */ | 215 | #define WHITEHEAT_FLOW_HARD_OUT 0x01 /* TX is stopped by CTS |
202 | #define WHITEHEAT_FLOW_HARD_IN 0x02 /* remote TX is stopped by RTS */ | 216 | (waiting for CTS to go on) */ |
203 | #define WHITEHEAT_FLOW_SOFT_OUT 0x04 /* TX is stopped by XOFF received (waiting for XON) */ | 217 | #define WHITEHEAT_FLOW_HARD_IN 0x02 /* remote TX is stopped |
204 | #define WHITEHEAT_FLOW_SOFT_IN 0x08 /* remote TX is stopped by XOFF transmitted */ | 218 | by RTS */ |
219 | #define WHITEHEAT_FLOW_SOFT_OUT 0x04 /* TX is stopped by XOFF | ||
220 | received (waiting for XON) */ | ||
221 | #define WHITEHEAT_FLOW_SOFT_IN 0x08 /* remote TX is stopped by XOFF | ||
222 | transmitted */ | ||
205 | #define WHITEHEAT_FLOW_TX_DONE 0x80 /* TX has completed */ | 223 | #define WHITEHEAT_FLOW_TX_DONE 0x80 /* TX has completed */ |
206 | 224 | ||
207 | struct whiteheat_status_info { | 225 | struct whiteheat_status_info { |
208 | __u8 port; /* port number (1 to N) */ | 226 | __u8 port; /* port number (1 to N) */ |
209 | __u8 event; /* indicates what the current event is, see WHITEHEAT_EVENT_* above */ | 227 | __u8 event; /* indicates what the current event is, |
210 | __u8 modem; /* modem signal status (copy of uart's MSR register) */ | 228 | see WHITEHEAT_EVENT_* above */ |
229 | __u8 modem; /* modem signal status (copy of uart's | ||
230 | MSR register) */ | ||
211 | __u8 error; /* line status (copy of uart's LSR register) */ | 231 | __u8 error; /* line status (copy of uart's LSR register) */ |
212 | __u8 flow; /* flow control state, see WHITEHEAT_FLOW_* above */ | 232 | __u8 flow; /* flow control state, see WHITEHEAT_FLOW_* |
213 | __u8 connect; /* 0 means not connected, non-zero means connected */ | 233 | above */ |
234 | __u8 connect; /* 0 means not connected, non-zero means | ||
235 | connected */ | ||
214 | }; | 236 | }; |
215 | 237 | ||
216 | 238 | ||
@@ -256,7 +278,8 @@ struct whiteheat_hw_info { | |||
256 | struct whiteheat_event_info { | 278 | struct whiteheat_event_info { |
257 | __u8 port; /* port number (1 to N) */ | 279 | __u8 port; /* port number (1 to N) */ |
258 | __u8 event; /* see whiteheat_status_info.event */ | 280 | __u8 event; /* see whiteheat_status_info.event */ |
259 | __u8 info; /* see whiteheat_status_info.modem, .error, .flow, .connect */ | 281 | __u8 info; /* see whiteheat_status_info.modem, .error, |
282 | .flow, .connect */ | ||
260 | }; | 283 | }; |
261 | 284 | ||
262 | 285 | ||
@@ -269,7 +292,8 @@ struct whiteheat_event_info { | |||
269 | 292 | ||
270 | struct whiteheat_test_info { | 293 | struct whiteheat_test_info { |
271 | __u8 port; /* port number (1 to N) */ | 294 | __u8 port; /* port number (1 to N) */ |
272 | __u8 test; /* indicates which test this is a response for, see WHITEHEAT_DO_TEST above */ | 295 | __u8 test; /* indicates which test this is a response for, |
296 | see WHITEHEAT_DO_TEST above */ | ||
273 | __u8 status; /* see WHITEHEAT_TEST_* above */ | 297 | __u8 status; /* see WHITEHEAT_TEST_* above */ |
274 | __u8 results[32]; /* test-dependent results */ | 298 | __u8 results[32]; /* test-dependent results */ |
275 | }; | 299 | }; |