Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 12107
b: refs/heads/master
c: 6a8f8d7
h: refs/heads/master
i:
  12105: 631deb8
  12103: e120a5b
v: v3
  • Loading branch information
Russell King authored and Russell King committed Oct 31, 2005
1 parent 9bb5cd9 commit 232ec8c
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0cf669d5c5d08eb827df9867429df21cf030eba6
refs/heads/master: 6a8f8d72bd2fe9964ee10c0f58b14d6370e49769
66 changes: 57 additions & 9 deletions trunk/Documentation/serial/driver
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,15 @@ hardware.
line becoming inactive or the tty layer indicating we want
to stop transmission due to an XOFF character.

The driver should stop transmitting characters as soon as
possible.

Locking: port->lock taken.
Interrupts: locally disabled.
This call must not sleep

start_tx(port)
start transmitting characters.
Start transmitting characters.

Locking: port->lock taken.
Interrupts: locally disabled.
Expand Down Expand Up @@ -281,33 +284,78 @@ hardware.
Other functions
---------------

uart_update_timeout(port,cflag,quot)
uart_update_timeout(port,cflag,baud)
Update the FIFO drain timeout, port->timeout, according to the
number of bits, parity, stop bits and quotient.
number of bits, parity, stop bits and baud rate.

Locking: caller is expected to take port->lock
Interrupts: n/a

uart_get_baud_rate(port,termios)
uart_get_baud_rate(port,termios,old,min,max)
Return the numeric baud rate for the specified termios, taking
account of the special 38400 baud "kludge". The B0 baud rate
is mapped to 9600 baud.

If the baud rate is not within min..max, then if old is non-NULL,
the original baud rate will be tried. If that exceeds the
min..max constraint, 9600 baud will be returned. termios will
be updated to the baud rate in use.

Note: min..max must always allow 9600 baud to be selected.

Locking: caller dependent.
Interrupts: n/a

uart_get_divisor(port,termios,oldtermios)
Return the divsor (baud_base / baud) for the selected baud rate
specified by termios. If the baud rate is out of range, try
the original baud rate specified by oldtermios (if non-NULL).
If that fails, try 9600 baud.
uart_get_divisor(port,baud)
Return the divsor (baud_base / baud) for the specified baud
rate, appropriately rounded.

If 38400 baud and custom divisor is selected, return the
custom divisor instead.

Locking: caller dependent.
Interrupts: n/a

uart_match_port(port1,port2)
This utility function can be used to determine whether two
uart_port structures describe the same port.

Locking: n/a
Interrupts: n/a

uart_write_wakeup(port)
A driver is expected to call this function when the number of
characters in the transmit buffer have dropped below a threshold.

Locking: port->lock should be held.
Interrupts: n/a

uart_register_driver(drv)
Register a uart driver with the core driver. We in turn register
with the tty layer, and initialise the core driver per-port state.

drv->port should be NULL, and the per-port structures should be
registered using uart_add_one_port after this call has succeeded.

Locking: none
Interrupts: enabled

uart_unregister_driver()
Remove all references to a driver from the core driver. The low
level driver must have removed all its ports via the
uart_remove_one_port() if it registered them with uart_add_one_port().

Locking: none
Interrupts: enabled

uart_suspend_port()

uart_resume_port()

uart_add_one_port()

uart_remove_one_port()

Other notes
-----------

Expand Down

0 comments on commit 232ec8c

Please sign in to comment.