summaryrefslogtreecommitdiff
path: root/Documentation/serial/driver
AgeCommit message (Collapse)Author
2016-05-14serial: doc: Use port->state instead of infoGeert Uytterhoeven
As of commit ebd2c8f6d2ec4012 ("serial: kill off uart_info"), the circular transmission buffer is part of struct uart_state instead of struct uart_info. Make it clear this structure is pointed to from struct uart_port. Change 'circ' to 'circ_buf' to match the structure name while we're at it. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-05-14serial: doc: Always refer to tty_port->mutexGeert Uytterhoeven
Stop referring to the mutex member of the tty_port struct as 'port->mutex', as 'port' is ambiguous, and usually refers to the uart_port struct in this document. Use 'tty_port->mutex' instead, following the single existing use. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-04-16serial: doc: .break_ctl() may sleepGeert Uytterhoeven
break_ctl() is not called from any sort of atomic context, so there is no problem with it sleeping. Reported-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-04-15serial: doc: .(un)throttle() are serialized by the tty layerGeert Uytterhoeven
Document that .(un)throttle() are serialized with each other, and with termios modification by the tty layer. Reported-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-04-15serial: doc: .(un)throttle() depends on hardware assisted flow controlGeert Uytterhoeven
Document that .throttle() and .unthrottle() are relevant only if hardware assisted flow control is enabled. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-04-15serial: doc: Re-add paragraph documenting uart_console_write()Geert Uytterhoeven
Commit 834392a7d92677ff ("serial: doc: Un-document non-existing uart_write_console()") removed a paragraph about a helper function that seemed to never exist. Peter Hurley pointed out that the function does exist, but is called differently. Re-add the paragraph, with the function name corrected. Fixes: 834392a7d92677ff ("serial: doc: Un-document non-existing uart_write_console()") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-03-31serial: doc: Correct return type of mctrl_gpio_to_gpiod()Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-03-31serial: doc: Grammar s/function are/functions are/Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-03-31serial: doc: Spelling s/divsor/divisor/Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-03-31serial: doc: .break_ctl() is called with port->mutex() heldGeert Uytterhoeven
Note that mutex_lock() should not be called with interrupts disabled. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-03-31serial: doc: Document .set_ldisc()Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-03-31serial: doc: Document .unthrottle()Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-03-31serial: doc: Document .throttle()Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-03-31serial: doc: Un-document obsolete tmpbuf_semGeert Uytterhoeven
uart_info.tmpbuf and uart_info.tmpbuf_sem were removed in v2.6.10, in full-history-linux commit a797ad7e3ae9cad4 ("[SERIAL] Clean up serial_core.c write functions."). Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-03-31serial: doc: Un-document non-existing uart_write_console()Geert Uytterhoeven
uart_write_console() never existed, not even when the "new uart_write_console function" was documented. Fixes: 67ab7f596b6adbae ("[SERIAL] Update serial driver documentation") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2015-10-04serial: mctrl_gpio: implement interrupt handlingUwe Kleine-König
This allows to reduce the per-driver boiler plate considerably. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05serial: Fix locking for uart driver set_termios() methodPeter Hurley
The low-level uart driver may modify termios settings to override settings that are not compatible with the uart, such as CRTSCTS. Thus, callers of the low-level uart driver's set_termios() method must hold termios_rwsem write lock to prevent concurrent access to termios, in case such override occurs. The termios_rwsem lock requirement does not extend to console setup (ie., uart_set_options), as console setup cannot race with tty operations. Nor does this lock requirement extend to functions which cannot be concurrent with tty ioctls (ie., uart_port_startup() and uart_resume_port()). Further, always claim the port mutex to protect hardware re-reprogramming in the set_termios() uart driver method. Note this is unnecessary for console initialization in uart_set_options() which cannot be concurrent with other uart operations. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-08serial: Fix send_xchar() handlersPeter Hurley
START_CHAR() & STOP_CHAR() can be disabled if set to '\0' (__DISABLED_CHAR). UART drivers which define a send_xchar() handler must not transmit __DISABLED_CHAR. Document requirement. Affected drivers: sunsab sunhv cc: David S. Miller <davem@davemloft.net> cc: <sparclinux@vger.kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28tty/serial: Add GPIOLIB helpers for controlling modem linesRichard Genoud
This patch add some helpers to control modem lines (CTS/RTS/DSR...) via GPIO. This will be useful for many boards which have a serial controller that only handle CTS/RTS pins (or even just RX/TX). Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Tested-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16serial: core: delete .set_wake() callbackLinus Walleij
This deletes the .set_wake() callback in the struct uart_ops. Apparently this has been unused since pre-git times. In the old-2.6-bkcvs it is deleted as part of a changeset removing the PM_SET_WAKEUP from pm_request_t which is since also deleted from the kernel. The apropriate way to set wakeups in the kernel is to have a code snippet like this in .suspend() or .runtime_suspend() callbacks: static int foo_suspend(struct device *dev) { if (device_may_wakeup(dev)) { /* Enable wakeups, set internal states */ } } This specific callback is not coming back. Cc: Rafael J. Wysocki <rjw@sisk.pl> Cc: Len Brown <len.brown@intel.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Dmitry Artamonow <mad_soft@inbox.ru> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15tty: Update serial core API documentationKevin Cernekee
Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15tty: serial core: decouple pm states from ACPILinus Walleij
The serial core is using power states lifted from ACPI for no good reason. Remove this reference from the documentation and alter all users to use an enum specific to the serial core instead, and define it in <linux/serial_core.h>. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Alan Cox <alan@linux.intel.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-01-04serial/documentation: fix documented name of DCD cpp symbolUwe Kleine-König
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Alan Cox <alan@linux.intel.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-20Subject: [PATCH 1/2] serial: Add flush_buffer() operation to uart_opsHaavard Skinnemoen
Serial drivers using DMA (like the atmel_serial driver) tend to get very confused when the xmit buffer is flushed and nobody told them. They also tend to spew a lot of garbage since the DMA engine keeps running after the buffer is flushed and possibly refilled with unrelated data. This patch adds a new flush_buffer operation to the uart_ops struct, along with a call to it from uart_flush_buffer() right after the xmit buffer has been cleared. The driver can implement this in order to syncronize its internal DMA state with the xmit buffer when the buffer is flushed. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-06-02[SERIAL] Update parity handling documentationPeter Korsgaard
Update documentation to match reality. INPCK controls whether input parity checking is enabled. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-15[SERIAL] Update serial driver documentationRussell King
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: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-31[SERIAL] Update serial_core documentationRussell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-08-31[SERIAL] Clean up and fix tty transmission start/stopingRussell King
The start_tx and stop_tx methods were passed a flag to indicate whether the start/stop was from the tty start/stop callbacks, and some drivers used this flag to decide whether to ask the UART to immediately stop transmission (where the UART supports such a feature.) There are other cases when we wish this to occur - when CTS is lowered, or if we change from soft to hard flow control and CTS is inactive. In these cases, this flag was false, and we would allow the transmitter to drain before stopping. There is really only one case where we want to let the transmitter drain before disabling, and that's when we run out of characters to send. Hence, re-jig the start_tx and stop_tx methods to eliminate this flag, and introduce new functions for the special "disable and allow transmitter to drain" case. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-06-29[PATCH] Serial: Adjust serial lockingRussell King
This patch changes the way serial ports are locked when getting modem status. This change is necessary because we will need to atomically read the modem status and take action depending on the CTS status. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-04-16Linux-2.6.12-rc2Linus Torvalds
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!