Commit 67ab7f59 authored by Russell King's avatar Russell King Committed by Russell King

[SERIAL] Update serial driver documentation

Improve serial driver documentation:
- Remove CVS id.
- Update pointer to reference driver documentation.
- Add comments about new uart_write_console function.
- Add TIOCM_LOOP modem control bit description.
- Add commentry about enable_ms method being called multiple times.
- Add commentry about startup/shutdown method calling.
- Mention that dereferencing port->info after shutdown is invalid.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 2c536200
...@@ -3,14 +3,11 @@ ...@@ -3,14 +3,11 @@
-------------------- --------------------
$Id: driver,v 1.10 2002/07/22 15:27:30 rmk Exp $
This document is meant as a brief overview of some aspects of the new serial This document is meant as a brief overview of some aspects of the new serial
driver. It is not complete, any questions you have should be directed to driver. It is not complete, any questions you have should be directed to
<rmk@arm.linux.org.uk> <rmk@arm.linux.org.uk>
The reference implementation is contained within serial_amba.c. The reference implementation is contained within amba_pl011.c.
...@@ -31,6 +28,11 @@ The serial core provides a few helper functions. This includes identifing ...@@ -31,6 +28,11 @@ The serial core provides a few helper functions. This includes identifing
the correct port structure (via uart_get_console) and decoding command line the correct port structure (via uart_get_console) and decoding command line
arguments (uart_parse_options). arguments (uart_parse_options).
There is also a helper function (uart_write_console) which performs a
character by character write, translating newlines to CRLF sequences.
Driver writers are recommended to use this function rather than implementing
their own version.
Locking Locking
------- -------
...@@ -86,6 +88,7 @@ hardware. ...@@ -86,6 +88,7 @@ hardware.
- TIOCM_DTR DTR signal. - TIOCM_DTR DTR signal.
- TIOCM_OUT1 OUT1 signal. - TIOCM_OUT1 OUT1 signal.
- TIOCM_OUT2 OUT2 signal. - TIOCM_OUT2 OUT2 signal.
- TIOCM_LOOP Set the port into loopback mode.
If the appropriate bit is set, the signal should be driven If the appropriate bit is set, the signal should be driven
active. If the bit is clear, the signal should be driven active. If the bit is clear, the signal should be driven
inactive. inactive.
...@@ -141,6 +144,10 @@ hardware. ...@@ -141,6 +144,10 @@ hardware.
enable_ms(port) enable_ms(port)
Enable the modem status interrupts. Enable the modem status interrupts.
This method may be called multiple times. Modem status
interrupts should be disabled when the shutdown method is
called.
Locking: port->lock taken. Locking: port->lock taken.
Interrupts: locally disabled. Interrupts: locally disabled.
This call must not sleep This call must not sleep
...@@ -160,6 +167,8 @@ hardware. ...@@ -160,6 +167,8 @@ hardware.
state. Enable the port for reception. It should not activate state. Enable the port for reception. It should not activate
RTS nor DTR; this will be done via a separate call to set_mctrl. RTS nor DTR; this will be done via a separate call to set_mctrl.
This method will only be called when the port is initially opened.
Locking: port_sem taken. Locking: port_sem taken.
Interrupts: globally disabled. Interrupts: globally disabled.
...@@ -169,6 +178,11 @@ hardware. ...@@ -169,6 +178,11 @@ hardware.
RTS nor DTR; this will have already been done via a separate RTS nor DTR; this will have already been done via a separate
call to set_mctrl. call to set_mctrl.
Drivers must not access port->info once this call has completed.
This method will only be called when there are no more users of
this port.
Locking: port_sem taken. Locking: port_sem taken.
Interrupts: caller dependent. Interrupts: caller dependent.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment