diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-15 19:02:04 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-15 19:02:04 -0400 |
| commit | c19f7a9e1ac45b57375d51f033b02deca50f4d3f (patch) | |
| tree | aa6eeb6a48bd89b2ef1b8fc7f127a6f2f3ec804f | |
| parent | 63d39fe88ffabbd82d9db42e9b603c58532fc918 (diff) | |
| parent | 67ab7f596b6adbaef5abc539dbee822e298a36e1 (diff) | |
Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial:
[SERIAL] Update serial driver documentation
| -rw-r--r-- | Documentation/serial/driver | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/Documentation/serial/driver b/Documentation/serial/driver index 42ef9970bc86..df82116a9f26 100644 --- a/Documentation/serial/driver +++ b/Documentation/serial/driver | |||
| @@ -3,14 +3,11 @@ | |||
| 3 | -------------------- | 3 | -------------------- |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | $Id: driver,v 1.10 2002/07/22 15:27:30 rmk Exp $ | ||
| 7 | |||
| 8 | |||
| 9 | This document is meant as a brief overview of some aspects of the new serial | 6 | This document is meant as a brief overview of some aspects of the new serial |
| 10 | driver. It is not complete, any questions you have should be directed to | 7 | driver. It is not complete, any questions you have should be directed to |
| 11 | <rmk@arm.linux.org.uk> | 8 | <rmk@arm.linux.org.uk> |
| 12 | 9 | ||
| 13 | The reference implementation is contained within serial_amba.c. | 10 | The reference implementation is contained within amba_pl011.c. |
| 14 | 11 | ||
| 15 | 12 | ||
| 16 | 13 | ||
| @@ -31,6 +28,11 @@ The serial core provides a few helper functions. This includes identifing | |||
| 31 | the correct port structure (via uart_get_console) and decoding command line | 28 | the correct port structure (via uart_get_console) and decoding command line |
| 32 | arguments (uart_parse_options). | 29 | arguments (uart_parse_options). |
| 33 | 30 | ||
| 31 | There is also a helper function (uart_write_console) which performs a | ||
| 32 | character by character write, translating newlines to CRLF sequences. | ||
| 33 | Driver writers are recommended to use this function rather than implementing | ||
| 34 | their own version. | ||
| 35 | |||
| 34 | 36 | ||
| 35 | Locking | 37 | Locking |
| 36 | ------- | 38 | ------- |
| @@ -86,6 +88,7 @@ hardware. | |||
| 86 | - TIOCM_DTR DTR signal. | 88 | - TIOCM_DTR DTR signal. |
| 87 | - TIOCM_OUT1 OUT1 signal. | 89 | - TIOCM_OUT1 OUT1 signal. |
| 88 | - TIOCM_OUT2 OUT2 signal. | 90 | - TIOCM_OUT2 OUT2 signal. |
| 91 | - TIOCM_LOOP Set the port into loopback mode. | ||
| 89 | If the appropriate bit is set, the signal should be driven | 92 | If the appropriate bit is set, the signal should be driven |
| 90 | active. If the bit is clear, the signal should be driven | 93 | active. If the bit is clear, the signal should be driven |
| 91 | inactive. | 94 | inactive. |
| @@ -141,6 +144,10 @@ hardware. | |||
| 141 | enable_ms(port) | 144 | enable_ms(port) |
| 142 | Enable the modem status interrupts. | 145 | Enable the modem status interrupts. |
| 143 | 146 | ||
| 147 | This method may be called multiple times. Modem status | ||
| 148 | interrupts should be disabled when the shutdown method is | ||
| 149 | called. | ||
| 150 | |||
| 144 | Locking: port->lock taken. | 151 | Locking: port->lock taken. |
| 145 | Interrupts: locally disabled. | 152 | Interrupts: locally disabled. |
| 146 | This call must not sleep | 153 | This call must not sleep |
| @@ -160,6 +167,8 @@ hardware. | |||
| 160 | state. Enable the port for reception. It should not activate | 167 | state. Enable the port for reception. It should not activate |
| 161 | RTS nor DTR; this will be done via a separate call to set_mctrl. | 168 | RTS nor DTR; this will be done via a separate call to set_mctrl. |
| 162 | 169 | ||
| 170 | This method will only be called when the port is initially opened. | ||
| 171 | |||
| 163 | Locking: port_sem taken. | 172 | Locking: port_sem taken. |
| 164 | Interrupts: globally disabled. | 173 | Interrupts: globally disabled. |
| 165 | 174 | ||
| @@ -169,6 +178,11 @@ hardware. | |||
| 169 | RTS nor DTR; this will have already been done via a separate | 178 | RTS nor DTR; this will have already been done via a separate |
| 170 | call to set_mctrl. | 179 | call to set_mctrl. |
| 171 | 180 | ||
| 181 | Drivers must not access port->info once this call has completed. | ||
| 182 | |||
| 183 | This method will only be called when there are no more users of | ||
| 184 | this port. | ||
| 185 | |||
| 172 | Locking: port_sem taken. | 186 | Locking: port_sem taken. |
| 173 | Interrupts: caller dependent. | 187 | Interrupts: caller dependent. |
| 174 | 188 | ||
