Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KED Linux Kernel Fork
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KED Software Projects
Miscellaneous
KED Linux Kernel Fork
Commits
6a8f8d72
Commit
6a8f8d72
authored
19 years ago
by
Russell King
Committed by
Russell King
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[SERIAL] Update serial_core documentation
Signed-off-by:
Russell King
<
rmk+kernel@arm.linux.org.uk
>
parent
0cf669d5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Documentation/serial/driver
+57
-9
57 additions, 9 deletions
Documentation/serial/driver
with
57 additions
and
9 deletions
Documentation/serial/driver
+
57
−
9
View file @
6a8f8d72
...
@@ -116,12 +116,15 @@ hardware.
...
@@ -116,12 +116,15 @@ hardware.
line becoming inactive or the tty layer indicating we want
line becoming inactive or the tty layer indicating we want
to stop transmission due to an XOFF character.
to stop transmission due to an XOFF character.
The driver should stop transmitting characters as soon as
possible.
Locking: port->lock taken.
Locking: port->lock taken.
Interrupts: locally disabled.
Interrupts: locally disabled.
This call must not sleep
This call must not sleep
start_tx(port)
start_tx(port)
s
tart transmitting characters.
S
tart transmitting characters.
Locking: port->lock taken.
Locking: port->lock taken.
Interrupts: locally disabled.
Interrupts: locally disabled.
...
@@ -281,26 +284,31 @@ hardware.
...
@@ -281,26 +284,31 @@ hardware.
Other functions
Other functions
---------------
---------------
uart_update_timeout(port,cflag,
quot
)
uart_update_timeout(port,cflag,
baud
)
Update the FIFO drain timeout, port->timeout, according to the
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
Locking: caller is expected to take port->lock
Interrupts: n/a
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
Return the numeric baud rate for the specified termios, taking
account of the special 38400 baud "kludge". The B0 baud rate
account of the special 38400 baud "kludge". The B0 baud rate
is mapped to 9600 baud.
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.
Locking: caller dependent.
Interrupts: n/a
Interrupts: n/a
uart_get_divisor(port,termios,oldtermios)
uart_get_divisor(port,baud)
Return the divsor (baud_base / baud) for the selected baud rate
Return the divsor (baud_base / baud) for the specified baud
specified by termios. If the baud rate is out of range, try
rate, appropriately rounded.
the original baud rate specified by oldtermios (if non-NULL).
If that fails, try 9600 baud.
If 38400 baud and custom divisor is selected, return the
If 38400 baud and custom divisor is selected, return the
custom divisor instead.
custom divisor instead.
...
@@ -308,6 +316,46 @@ uart_get_divisor(port,termios,oldtermios)
...
@@ -308,6 +316,46 @@ uart_get_divisor(port,termios,oldtermios)
Locking: caller dependent.
Locking: caller dependent.
Interrupts: n/a
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
Other notes
-----------
-----------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment