projects/linux·commit 932c2989

Merge tag 'tty-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

932c2989 · Linus Torvalds <[email protected]> · 2022-06-03 11:08:40 -07:00

Pull tty and serial driver updates from Greg KH:
 "Here is the big set of tty and serial driver updates for 5.19-rc1.

  Lots of tiny cleanups in here, the major stuff is:

   - termbit cleanups and unification by Ilpo. A much needed change that
     goes a long way to making things simpler for all of the different
     arches

   - tty documentation cleanups and movements to their own place in the
     documentation tree

   - old tty driver cleanups and fixes from Jiri to bring some existing
     drivers into the modern world

   - RS485 cleanups and unifications to make it easier for individual
     drivers to support this mode instead of having to duplicate logic
     in each driver

   - Lots of 8250 driver updates and additions

   - new device id additions

   - n_gsm continued fixes and cleanups

   - other minor serial driver updates and cleanups

  All of these have been in linux-next for weeks with no reported issues"

* tag 'tty-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (166 commits)
  tty: Rework receive flow control char logic
  pcmcia: synclink_cs: Don't allow CS5-6
  serial: stm32-usart: Correct CSIZE, bits, and parity
  serial: st-asc: Sanitize CSIZE and correct PARENB for CS7
  serial: sifive: Sanitize CSIZE and c_iflag
  serial: sh-sci: Don't allow CS5-6
  serial: txx9: Don't allow CS5-6
  serial: rda-uart: Don't allow CS5-6
  serial: digicolor-usart: Don't allow CS5-6
  serial: uartlite: Fix BRKINT clearing
  serial: cpm_uart: Fix build error without CONFIG_SERIAL_CPM_CONSOLE
  serial: core: Do stop_rx in suspend path for console if console_suspend is disabled
  tty: serial: qcom-geni-serial: Remove uart frequency table. Instead, find suitable frequency with call to clk_round_rate.
  dt-bindings: serial: renesas,em-uart: Add RZ/V2M clock to access the registers
  serial: 8250_fintek: Check SER_RS485_RTS_* only with RS485
  Revert "serial: 8250_mtk: Make sure to select the right FEATURE_SEL"
  serial: msm_serial: disable interrupts in __msm_console_write()
  serial: meson: acquire port->lock in startup()
  serial: 8250_dw: Use dev_err_probe()
  serial: 8250_dw: Use devm_add_action_or_reset()
  ...
Commit
932c2989b59008e530ffcc7c7e6ef507a28b28ca
Parents
4ad680f0 · 25e02ba6

Merge commit. Changes below are compared with the first parent: 4ad680f0.

Changes

113 files changed · +3085 −2372

FileStatusAddDelContent
Documentation/devicetree/bindings/serial/fsl-lpuart.yamlmodified+3−1View file
Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yamladded+86−0View file
Documentation/devicetree/bindings/serial/renesas,em-uart.yamlmodified+31−6View file
Documentation/devicetree/bindings/serial/renesas,hscif.yamlmodified+8−1View file
Documentation/devicetree/bindings/serial/renesas,scif.yamlmodified+1−1View file
Documentation/devicetree/bindings/serial/rs485.yamlmodified+5−0View file
Documentation/devicetree/bindings/serial/socionext,uniphier-uart.yamlmodified+4−1View file
Documentation/driver-api/index.rstmodified+1−0View file
Documentation/driver-api/serial/driver.rstmodified+1−1View file
Documentation/driver-api/serial/index.rstmodified+0−2View file
Documentation/tty/index.rst → Documentation/driver-api/tty/index.rstrenamed+16−6View file
Documentation/driver-api/serial/moxa-smartio.rst → Documentation/driver-api/tty/moxa-smartio.rstrenamed+0−0View file
Documentation/driver-api/serial/n_gsm.rst → Documentation/driver-api/tty/n_gsm.rstrenamed+74−80View file
Documentation/tty/n_tty.rst → Documentation/driver-api/tty/n_tty.rstrenamed+0−0View file
Documentation/tty/tty_buffer.rst → Documentation/driver-api/tty/tty_buffer.rstrenamed+0−0View file
Documentation/tty/tty_driver.rst → Documentation/driver-api/tty/tty_driver.rstrenamed+0−0View file
Documentation/tty/tty_internals.rst → Documentation/driver-api/tty/tty_internals.rstrenamed+0−0View file
Documentation/tty/tty_ldisc.rst → Documentation/driver-api/tty/tty_ldisc.rstrenamed+0−0View file
Documentation/tty/tty_port.rst → Documentation/driver-api/tty/tty_port.rstrenamed+0−0View file
Documentation/tty/tty_struct.rst → Documentation/driver-api/tty/tty_struct.rstrenamed+0−0View file
Documentation/firmware-guide/acpi/enumeration.rstmodified+25−0View file
Documentation/index.rstmodified+0−1View file
Documentation/misc-devices/index.rstmodified+1−0View file
Documentation/misc-devices/oxsemi-tornado.rstadded+131−0View file
MAINTAINERSmodified+1−1View file
arch/alpha/include/uapi/asm/termbits.hmodified+79−135View file
arch/mips/include/uapi/asm/termbits.hmodified+99−150View file
arch/parisc/include/uapi/asm/termbits.hmodified+94−147View file
arch/powerpc/include/uapi/asm/termbits.hmodified+64−118View file
arch/sparc/include/uapi/asm/termbits.hmodified+84−139View file
drivers/char/Kconfigmodified+2−1View file
drivers/char/pcmcia/synclink_cs.cmodified+5−3View file
drivers/char/ttyprintk.cmodified+16−0View file
drivers/tty/amiserial.cmodified+0−2View file
drivers/tty/goldfish.cmodified+2−0View file
drivers/tty/hvc/Kconfigmodified+19−0View file
drivers/tty/hvc/hvc_dcc.cmodified+190−4View file
drivers/tty/hvc/hvc_opal.cmodified+3−3View file
drivers/tty/hvc/hvc_vio.cmodified+1−1View file
drivers/tty/hvc/hvcs.cmodified+2−3View file
drivers/tty/hvc/hvsi.cmodified+1−1View file
drivers/tty/mxser.cmodified+2−3View file
drivers/tty/n_gsm.cmodified+24−13View file
drivers/tty/n_tty.cmodified+61−12View file
drivers/tty/serial/8250/8250.hmodified+41−0View file
drivers/tty/serial/8250/8250_aspeed_vuart.cmodified+2−0View file
drivers/tty/serial/8250/8250_core.cmodified+0−1View file
drivers/tty/serial/8250/8250_dma.cmodified+5−2View file
drivers/tty/serial/8250/8250_dw.cmodified+149−80View file
drivers/tty/serial/8250/8250_dwlib.cmodified+96−20View file
drivers/tty/serial/8250/8250_dwlib.hmodified+51−0View file
drivers/tty/serial/8250/8250_fintek.cmodified+4−4View file
drivers/tty/serial/8250/8250_mtk.cmodified+0−7View file
drivers/tty/serial/8250/8250_of.cmodified+2−0View file
drivers/tty/serial/8250/8250_pci.cmodified+335−145View file
drivers/tty/serial/8250/8250_port.cmodified+98−42View file
drivers/tty/serial/8250/8250_pxa.cmodified+0−1View file
drivers/tty/serial/8250/Kconfigmodified+1−1View file
drivers/tty/serial/Kconfigmodified+5−4View file
drivers/tty/serial/altera_jtaguart.cmodified+2−4View file
drivers/tty/serial/amba-pl011.cmodified+31−17View file
drivers/tty/serial/amba-pl011.hdeleted+0−35View before deletion
drivers/tty/serial/atmel_serial.cmodified+1−3View file
drivers/tty/serial/cpm_uart/cpm_uart.hmodified+2−0View file
drivers/tty/serial/cpm_uart/cpm_uart_core.cmodified+1−1View file
drivers/tty/serial/cpm_uart/cpm_uart_cpm2.cmodified+0−1View file
drivers/tty/serial/digicolor-usart.cmodified+2−0View file
drivers/tty/serial/fsl_lpuart.cmodified+8−58View file
drivers/tty/serial/icom.cmodified+386−152View file
drivers/tty/serial/icom.hdeleted+0−274View before deletion
drivers/tty/serial/imx.cmodified+0−2View file
drivers/tty/serial/jsm/jsm_cls.cmodified+1−7View file
drivers/tty/serial/jsm/jsm_neo.cmodified+1−7View file
drivers/tty/serial/max310x.cmodified+0−1View file
drivers/tty/serial/men_z135_uart.cmodified+0−1View file
drivers/tty/serial/meson_uart.cmodified+37−3View file
drivers/tty/serial/mpc52xx_uart.cmodified+2−3View file
drivers/tty/serial/msm_serial.cmodified+5−0View file
drivers/tty/serial/omap-serial.cmodified+3−10View file
drivers/tty/serial/owl-uart.cmodified+4−3View file
drivers/tty/serial/pch_uart.cmodified+12−65View file
drivers/tty/serial/pic32_uart.cmodified+116−43View file
drivers/tty/serial/pic32_uart.hdeleted+0−125View before deletion
drivers/tty/serial/pmac_zilog.cmodified+2−67View file
drivers/tty/serial/pmac_zilog.hmodified+0−11View file
drivers/tty/serial/qcom_geni_serial.cmodified+37−21View file
drivers/tty/serial/rda-uart.cmodified+2−0View file
drivers/tty/serial/sa1100.cmodified+2−2View file
drivers/tty/serial/samsung_tty.cmodified+13−0View file
drivers/tty/serial/sc16is7xx.cmodified+0−10View file
drivers/tty/serial/serial_core.cmodified+69−20View file
drivers/tty/serial/serial_txx9.cmodified+2−0View file
drivers/tty/serial/sh-sci.cmodified+5−1View file
drivers/tty/serial/sifive.cmodified+11−9View file
drivers/tty/serial/st-asc.cmodified+4−0View file
drivers/tty/serial/stm32-usart.cmodified+187−38View file
drivers/tty/serial/stm32-usart.hmodified+3−0View file
drivers/tty/serial/sunplus-uart.cmodified+1−1View file
drivers/tty/serial/sunsu.cmodified+0−2View file
drivers/tty/serial/uartlite.cmodified+2−1View file
drivers/tty/serial/xilinx_uartps.cmodified+16−30View file
drivers/tty/serial/zs.cmodified+1−1View file
drivers/tty/synclink_gt.cmodified+2−0View file
drivers/tty/sysrq.cmodified+15−12View file
drivers/tty/tty_baudrate.cmodified+8−27View file
drivers/tty/tty_ioctl.cmodified+0−2View file
drivers/usb/class/cdc-acm.hmodified+0−8View file
drivers/usb/serial/ark3116.cmodified+1−2View file
drivers/usb/serial/whiteheat.cmodified+0−4View file
include/linux/serial_core.hmodified+1−0View file
include/linux/serial_s3c.hmodified+3−0View file
include/uapi/asm-generic/termbits-common.hadded+65−0View file
include/uapi/asm-generic/termbits.hmodified+94−145View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/serial/fsl-lpuart.yaml

View file
diff --git a/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml b/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
index ff364bd..30eaa62 100644
--- a/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
+++ b/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
@@ -23,7 +23,9 @@ properties:
- fsl,imx8qxp-lpuart
- fsl,imxrt1050-lpuart
- items:
- - const: fsl,imx8ulp-lpuart
+ - enum:
+ - fsl,imx93-lpuart
+ - fsl,imx8ulp-lpuart
- const: fsl,imx7ulp-lpuart
- items:
- enum:

Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml

View file
diff --git a/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml b/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml
new file mode 100644
index 0000000..05a6999
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/serial/qcom,serial-geni-qcom.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm Geni based QUP UART interface
+
+maintainers:
+ - Andy Gross <[email protected]>
+ - Bjorn Andersson <[email protected]>
+
+allOf:
+ - $ref: /schemas/serial/serial.yaml#
+
+properties:
+ compatible:
+ enum:
+ - qcom,geni-uart
+ - qcom,geni-debug-uart
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ const: se
+
+ interconnects:
+ maxItems: 2
+
+ interconnect-names:
+ items:
+ - const: qup-core
+ - const: qup-config
+
+ interrupts:
+ minItems: 1
+ items:
+ - description: UART core irq
+ - description: Wakeup irq (RX GPIO)
+
+ operating-points-v2: true
+
+ pinctrl-0: true
+ pinctrl-1: true
+
+ pinctrl-names:
+ minItems: 1
+ items:
+ - const: default
+ - const: sleep
+
+ power-domains:
+ maxItems: 1
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - clocks
+ - clock-names
+ - interrupts
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/qcom,gcc-sc7180.h>
+ #include <dt-bindings/interconnect/qcom,sc7180.h>
+
+ serial@a88000 {
+ compatible = "qcom,geni-uart";
+ reg = <0xa88000 0x7000>;
+ interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+ clock-names = "se";
+ clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>;
+ pinctrl-0 = <&qup_uart0_default>;
+ pinctrl-names = "default";
+ interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+ <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_0 0>;
+ interconnect-names = "qup-core", "qup-config";
+ };
+...

Documentation/devicetree/bindings/serial/renesas,em-uart.yaml

View file
diff --git a/Documentation/devicetree/bindings/serial/renesas,em-uart.yaml b/Documentation/devicetree/bindings/serial/renesas,em-uart.yaml
index e98ec48..b25aca7 100644
--- a/Documentation/devicetree/bindings/serial/renesas,em-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/renesas,em-uart.yaml
@@ -9,12 +9,16 @@ title: Renesas EMMA Mobile UART Interface
maintainers:
- Magnus Damm <[email protected]>
-allOf:
- - $ref: serial.yaml#
-
properties:
compatible:
- const: renesas,em-uart
+ oneOf:
+ - items:
+ - enum:
+ - renesas,r9a09g011-uart # RZ/V2M
+ - const: renesas,em-uart # generic EMMA Mobile compatible UART
+
+ - items:
+ - const: renesas,em-uart # generic EMMA Mobile compatible UART
reg:
maxItems: 1
@@ -23,10 +27,31 @@ properties:
maxItems: 1
clocks:
- maxItems: 1
+ minItems: 1
+ items:
+ - description: UART functional clock
+ - description: Internal clock to access the registers
clock-names:
- const: sclk
+ minItems: 1
+ items:
+ - const: sclk
+ - const: pclk
+
+allOf:
+ - $ref: serial.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r9a09g011-uart
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ clock-names:
+ minItems: 2
required:
- compatible

Documentation/devicetree/bindings/serial/renesas,hscif.yaml

View file
diff --git a/Documentation/devicetree/bindings/serial/renesas,hscif.yaml b/Documentation/devicetree/bindings/serial/renesas,hscif.yaml
index ee9804c..87180d9 100644
--- a/Documentation/devicetree/bindings/serial/renesas,hscif.yaml
+++ b/Documentation/devicetree/bindings/serial/renesas,hscif.yaml
@@ -51,10 +51,16 @@ properties:
- renesas,hscif-r8a77980 # R-Car V3H
- renesas,hscif-r8a77990 # R-Car E3
- renesas,hscif-r8a77995 # R-Car D3
- - renesas,hscif-r8a779a0 # R-Car V3U
- const: renesas,rcar-gen3-hscif # R-Car Gen3 and RZ/G2
- const: renesas,hscif # generic HSCIF compatible UART
+ - items:
+ - enum:
+ - renesas,hscif-r8a779a0 # R-Car V3U
+ - renesas,hscif-r8a779g0 # R-Car V4H
+ - const: renesas,rcar-gen4-hscif # R-Car Gen4
+ - const: renesas,hscif # generic HSCIF compatible UART
+
reg:
maxItems: 1
@@ -113,6 +119,7 @@ if:
enum:
- renesas,rcar-gen2-hscif
- renesas,rcar-gen3-hscif
+ - renesas,rcar-gen4-hscif
then:
required:
- resets

Documentation/devicetree/bindings/serial/renesas,scif.yaml

View file
diff --git a/Documentation/devicetree/bindings/serial/renesas,scif.yaml b/Documentation/devicetree/bindings/serial/renesas,scif.yaml
index 5d37f8f..90fe452 100644
--- a/Documentation/devicetree/bindings/serial/renesas,scif.yaml
+++ b/Documentation/devicetree/bindings/serial/renesas,scif.yaml
@@ -60,12 +60,12 @@ properties:
- renesas,scif-r8a77980 # R-Car V3H
- renesas,scif-r8a77990 # R-Car E3
- renesas,scif-r8a77995 # R-Car D3
- - renesas,scif-r8a779a0 # R-Car V3U
- const: renesas,rcar-gen3-scif # R-Car Gen3 and RZ/G2
- const: renesas,scif # generic SCIF compatible UART
- items:
- enum:
+ - renesas,scif-r8a779a0 # R-Car V3U
- renesas,scif-r8a779f0 # R-Car S4-8
- const: renesas,rcar-gen4-scif # R-Car Gen4
- const: renesas,scif # generic SCIF compatible UART

Documentation/devicetree/bindings/serial/rs485.yaml

View file
diff --git a/Documentation/devicetree/bindings/serial/rs485.yaml b/Documentation/devicetree/bindings/serial/rs485.yaml
index 0c9fa69..f2c9c9f 100644
--- a/Documentation/devicetree/bindings/serial/rs485.yaml
+++ b/Documentation/devicetree/bindings/serial/rs485.yaml
@@ -33,6 +33,11 @@ properties:
description: drive RTS low when sending (default is high).
$ref: /schemas/types.yaml#/definitions/flag
+ rs485-rx-active-high:
+ description: Polarity of receiver enable signal (when separate from RTS).
+ True indicates active high (default is low).
+ $ref: /schemas/types.yaml#/definitions/flag
+
linux,rs485-enabled-at-boot-time:
description: enables the rs485 feature at boot time. It can be disabled
later with proper ioctl.

Documentation/devicetree/bindings/serial/socionext,uniphier-uart.yaml

View file
diff --git a/Documentation/devicetree/bindings/serial/socionext,uniphier-uart.yaml b/Documentation/devicetree/bindings/serial/socionext,uniphier-uart.yaml
index d490c7c..3d01cc3 100644
--- a/Documentation/devicetree/bindings/serial/socionext,uniphier-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/socionext,uniphier-uart.yaml
@@ -20,7 +20,10 @@ properties:
maxItems: 1
clocks:
- minItems: 1
+ maxItems: 1
+
+ resets:
+ maxItems: 1
auto-flow-control:
description: enable automatic flow control support.

Documentation/driver-api/index.rst

View file
diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst
index a7b0223..d76a60d 100644
--- a/Documentation/driver-api/index.rst
+++ b/Documentation/driver-api/index.rst
@@ -101,6 +101,7 @@ available subsections can be seen below.
surface_aggregator/index
switchtec
sync_file
+ tty/index
vfio-mediated-device
vfio
vfio-pci-device-specific-driver-acceptance

Documentation/driver-api/serial/driver.rst

View file
diff --git a/Documentation/driver-api/serial/driver.rst b/Documentation/driver-api/serial/driver.rst
index 06ec04b..7ef83fd 100644
--- a/Documentation/driver-api/serial/driver.rst
+++ b/Documentation/driver-api/serial/driver.rst
@@ -311,7 +311,7 @@ hardware.
This call must not sleep
set_ldisc(port,termios)
- Notifier for discipline change. See Documentation/tty/tty_ldisc.rst.
+ Notifier for discipline change. See ../tty/tty_ldisc.rst.
Locking: caller holds tty_port->mutex

Documentation/driver-api/serial/index.rst

View file
diff --git a/Documentation/driver-api/serial/index.rst b/Documentation/driver-api/serial/index.rst
index 7eb21a6..03a55b9 100644
--- a/Documentation/driver-api/serial/index.rst
+++ b/Documentation/driver-api/serial/index.rst
@@ -16,8 +16,6 @@ Serial drivers
.. toctree::
:maxdepth: 1
- moxa-smartio
- n_gsm
serial-iso7816
serial-rs485

Documentation/driver-api/tty/index.rst

View file
diff --git a/Documentation/tty/index.rst b/Documentation/driver-api/tty/index.rst
similarity index 84%
rename from Documentation/tty/index.rst
rename to Documentation/driver-api/tty/index.rst
index 21ea0cb..2d32606 100644
--- a/Documentation/tty/index.rst
+++ b/Documentation/driver-api/tty/index.rst
@@ -36,18 +36,16 @@ In-detail description of the named TTY structures is in separate documents:
tty_struct
tty_ldisc
tty_buffer
- n_tty
tty_internals
Writing TTY Driver
==================
Before one starts writing a TTY driver, they must consider
-:doc:`Serial <../driver-api/serial/driver>` and :doc:`USB Serial
-<../usb/usb-serial>` layers
-first. Drivers for serial devices can often use one of these specific layers to
-implement a serial driver. Only special devices should be handled directly by
-the TTY Layer. If you are about to write such a driver, read on.
+:doc:`Serial <../serial/driver>` and :doc:`USB Serial <../../usb/usb-serial>`
+layers first. Drivers for serial devices can often use one of these specific
+layers to implement a serial driver. Only special devices should be handled
+directly by the TTY Layer. If you are about to write such a driver, read on.
A *typical* sequence a TTY driver performs is as follows:
@@ -61,3 +59,15 @@ A *typical* sequence a TTY driver performs is as follows:
Steps regarding driver, i.e. 1., 3., and 5. are described in detail in
:doc:`tty_driver`. For the other two (devices handling), look into
:doc:`tty_port`.
+
+Other Documentation
+===================
+
+Miscellaneous documentation can be further found in these documents:
+
+.. toctree::
+ :maxdepth: 2
+
+ moxa-smartio
+ n_gsm
+ n_tty

Documentation/driver-api/tty/moxa-smartio.rst

View file
diff --git a/Documentation/driver-api/serial/moxa-smartio.rst b/Documentation/driver-api/tty/moxa-smartio.rst
similarity index 100%
rename from Documentation/driver-api/serial/moxa-smartio.rst
rename to Documentation/driver-api/tty/moxa-smartio.rst

Documentation/driver-api/tty/n_gsm.rst

View file
diff --git a/Documentation/driver-api/serial/n_gsm.rst b/Documentation/driver-api/tty/n_gsm.rst
similarity index 75%
rename from Documentation/driver-api/serial/n_gsm.rst
rename to Documentation/driver-api/tty/n_gsm.rst
index 4995650..35d7381 100644
--- a/Documentation/driver-api/serial/n_gsm.rst
+++ b/Documentation/driver-api/tty/n_gsm.rst
@@ -2,6 +2,8 @@
GSM 0710 tty multiplexor HOWTO
==============================
+.. contents:: :local:
+
This line discipline implements the GSM 07.10 multiplexing protocol
detailed in the following 3GPP document:
@@ -11,79 +13,81 @@ This document give some hints on how to use this driver with GPRS and 3G
modems connected to a physical serial port.
How to use it
--------------
-1. config initiator
-^^^^^^^^^^^^^^^^^^^^^
+=============
-1.1 initialize the modem in 0710 mux mode (usually AT+CMUX= command) through
- its serial port. Depending on the modem used, you can pass more or less
- parameters to this command.
+Config Initiator
+----------------
-1.2 switch the serial line to using the n_gsm line discipline by using
- TIOCSETD ioctl.
+#. Initialize the modem in 0710 mux mode (usually ``AT+CMUX=`` command) through
+ its serial port. Depending on the modem used, you can pass more or less
+ parameters to this command.
-1.3 configure the mux using GSMIOC_GETCONF / GSMIOC_SETCONF ioctl.
+#. Switch the serial line to using the n_gsm line discipline by using
+ ``TIOCSETD`` ioctl.
-1.4 obtain base gsmtty number for the used serial port.
+#. Configure the mux using ``GSMIOC_GETCONF``/``GSMIOC_SETCONF`` ioctl.
-Major parts of the initialization program :
-(a good starting point is util-linux-ng/sys-utils/ldattach.c)::
+#. Obtain base gsmtty number for the used serial port.
- #include <stdio.h>
- #include <stdint.h>
- #include <linux/gsmmux.h>
- #include <linux/tty.h>
- #define DEFAULT_SPEED B115200
- #define SERIAL_PORT /dev/ttyS0
+ Major parts of the initialization program
+ (a good starting point is util-linux-ng/sys-utils/ldattach.c)::
- int ldisc = N_GSM0710;
- struct gsm_config c;
- struct termios configuration;
- uint32_t first;
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <linux/gsmmux.h>
+ #include <linux/tty.h>
- /* open the serial port connected to the modem */
- fd = open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY);
+ #define DEFAULT_SPEED B115200
+ #define SERIAL_PORT /dev/ttyS0
- /* configure the serial port : speed, flow control ... */
+ int ldisc = N_GSM0710;
+ struct gsm_config c;
+ struct termios configuration;
+ uint32_t first;
- /* send the AT commands to switch the modem to CMUX mode
- and check that it's successful (should return OK) */
- write(fd, "AT+CMUX=0\r", 10);
+ /* open the serial port connected to the modem */
+ fd = open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY);
- /* experience showed that some modems need some time before
- being able to answer to the first MUX packet so a delay
- may be needed here in some case */
- sleep(3);
+ /* configure the serial port : speed, flow control ... */
- /* use n_gsm line discipline */
- ioctl(fd, TIOCSETD, &ldisc);
+ /* send the AT commands to switch the modem to CMUX mode
+ and check that it's successful (should return OK) */
+ write(fd, "AT+CMUX=0\r", 10);
- /* get n_gsm configuration */
- ioctl(fd, GSMIOC_GETCONF, &c);
- /* we are initiator and need encoding 0 (basic) */
- c.initiator = 1;
- c.encapsulation = 0;
- /* our modem defaults to a maximum size of 127 bytes */
- c.mru = 127;
- c.mtu = 127;
- /* set the new configuration */
- ioctl(fd, GSMIOC_SETCONF, &c);
- /* get first gsmtty device node */
- ioctl(fd, GSMIOC_GETFIRST, &first);
- printf("first muxed line: /dev/gsmtty%i\n", first);
+ /* experience showed that some modems need some time before
+ being able to answer to the first MUX packet so a delay
+ may be needed here in some case */
+ sleep(3);
- /* and wait for ever to keep the line discipline enabled */
- daemon(0,0);
- pause();
+ /* use n_gsm line discipline */
+ ioctl(fd, TIOCSETD, &ldisc);
+
+ /* get n_gsm configuration */
+ ioctl(fd, GSMIOC_GETCONF, &c);
+ /* we are initiator and need encoding 0 (basic) */
+ c.initiator = 1;
+ c.encapsulation = 0;
+ /* our modem defaults to a maximum size of 127 bytes */
+ c.mru = 127;
+ c.mtu = 127;
+ /* set the new configuration */
+ ioctl(fd, GSMIOC_SETCONF, &c);
+ /* get first gsmtty device node */
+ ioctl(fd, GSMIOC_GETFIRST, &first);
+ printf("first muxed line: /dev/gsmtty%i\n", first);
-1.5 use these devices as plain serial ports.
+ /* and wait for ever to keep the line discipline enabled */
+ daemon(0,0);
+ pause();
- for example, it's possible:
+#. Use these devices as plain serial ports.
- - and to use gnokii to send / receive SMS on ttygsm1
- - to use ppp to establish a datalink on ttygsm2
+ For example, it's possible:
-1.6 first close all virtual ports before closing the physical port.
+ - to use *gnokii* to send / receive SMS on ``ttygsm1``
+ - to use *ppp* to establish a datalink on ``ttygsm2``
+
+#. First close all virtual ports before closing the physical port.
Note that after closing the physical port the modem is still in multiplexing
mode. This may prevent a successful re-opening of the port later. To avoid
@@ -91,27 +95,27 @@ Major parts of the initialization program :
a disconnect command frame manually before initializing the multiplexing mode
for the second time. The byte sequence for the disconnect command frame is::
- 0xf9, 0x03, 0xef, 0x03, 0xc3, 0x16, 0xf9.
+ 0xf9, 0x03, 0xef, 0x03, 0xc3, 0x16, 0xf9
-2. config requester
-^^^^^^^^^^^^^^^^^^^^^
+Config Requester
+----------------
-2.1 receive string "AT+CMUX= command" through its serial port,initialize
- mux mode config
+#. Receive ``AT+CMUX=`` command through its serial port, initialize mux mode
+ config.
-2.2 switch the serial line to using the n_gsm line discipline by using
- TIOCSETD ioctl.
+#. Switch the serial line to using the *n_gsm* line discipline by using
+ ``TIOCSETD`` ioctl.
-2.3 configure the mux using GSMIOC_GETCONF / GSMIOC_SETCONF ioctl.
+#. Configure the mux using ``GSMIOC_GETCONF``/``GSMIOC_SETCONF`` ioctl.
-2.4 obtain base gsmtty number for the used serial port::
+#. Obtain base gsmtty number for the used serial port::
- #include <stdio.h>
- #include <stdint.h>
- #include <linux/gsmmux.h>
- #include <linux/tty.h>
- #define DEFAULT_SPEED B115200
- #define SERIAL_PORT /dev/ttyS0
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <linux/gsmmux.h>
+ #include <linux/tty.h>
+ #define DEFAULT_SPEED B115200
+ #define SERIAL_PORT /dev/ttyS0
int ldisc = N_GSM0710;
struct gsm_config c;
@@ -146,14 +150,4 @@ Major parts of the initialization program :
daemon(0,0);
pause();
-Additional Documentation
-------------------------
-More practical details on the protocol and how it's supported by industrial
-modems can be found in the following documents :
-
-- http://www.telit.com/module/infopool/download.php?id=616
-- http://www.u-blox.com/images/downloads/Product_Docs/LEON-G100-G200-MuxImplementation_ApplicationNote_%28GSM%20G1-CS-10002%29.pdf
-- http://www.sierrawireless.com/Support/Downloads/AirPrime/WMP_Series/~/media/Support_Downloads/AirPrime/Application_notes/CMUX_Feature_Application_Note-Rev004.ashx
-- http://wm.sim.com/sim/News/photo/2010721161442.pdf
-
11-03-08 - Eric Bénard - <[email protected]>

Documentation/driver-api/tty/n_tty.rst

View file
diff --git a/Documentation/tty/n_tty.rst b/Documentation/driver-api/tty/n_tty.rst
similarity index 100%
rename from Documentation/tty/n_tty.rst
rename to Documentation/driver-api/tty/n_tty.rst

Documentation/driver-api/tty/tty_buffer.rst

View file
diff --git a/Documentation/tty/tty_buffer.rst b/Documentation/driver-api/tty/tty_buffer.rst
similarity index 100%
rename from Documentation/tty/tty_buffer.rst
rename to Documentation/driver-api/tty/tty_buffer.rst

Documentation/driver-api/tty/tty_driver.rst

View file
diff --git a/Documentation/tty/tty_driver.rst b/Documentation/driver-api/tty/tty_driver.rst
similarity index 100%
rename from Documentation/tty/tty_driver.rst
rename to Documentation/driver-api/tty/tty_driver.rst

Documentation/driver-api/tty/tty_internals.rst

View file
diff --git a/Documentation/tty/tty_internals.rst b/Documentation/driver-api/tty/tty_internals.rst
similarity index 100%
rename from Documentation/tty/tty_internals.rst
rename to Documentation/driver-api/tty/tty_internals.rst

Documentation/driver-api/tty/tty_ldisc.rst

View file
diff --git a/Documentation/tty/tty_ldisc.rst b/Documentation/driver-api/tty/tty_ldisc.rst
similarity index 100%
rename from Documentation/tty/tty_ldisc.rst
rename to Documentation/driver-api/tty/tty_ldisc.rst

Documentation/driver-api/tty/tty_port.rst

View file
diff --git a/Documentation/tty/tty_port.rst b/Documentation/driver-api/tty/tty_port.rst
similarity index 100%
rename from Documentation/tty/tty_port.rst
rename to Documentation/driver-api/tty/tty_port.rst

Documentation/driver-api/tty/tty_struct.rst

View file
diff --git a/Documentation/tty/tty_struct.rst b/Documentation/driver-api/tty/tty_struct.rst
similarity index 100%
rename from Documentation/tty/tty_struct.rst
rename to Documentation/driver-api/tty/tty_struct.rst

Documentation/firmware-guide/acpi/enumeration.rst

View file
diff --git a/Documentation/firmware-guide/acpi/enumeration.rst b/Documentation/firmware-guide/acpi/enumeration.rst
index 6b62425..dbb0302 100644
--- a/Documentation/firmware-guide/acpi/enumeration.rst
+++ b/Documentation/firmware-guide/acpi/enumeration.rst
@@ -389,6 +389,31 @@ descriptors once the device is released.
See Documentation/firmware-guide/acpi/gpio-properties.rst for more information
about the _DSD binding related to GPIOs.
+RS-485 support
+==============
+
+ACPI _DSD (Device Specific Data) can be used to describe RS-485 capability
+of UART.
+
+For example::
+
+ Device (DEV)
+ {
+ ...
+
+ // ACPI 5.1 _DSD used for RS-485 capabilities
+ Name (_DSD, Package ()
+ {
+ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package ()
+ {
+ Package () {"rs485-rts-active-low", Zero},

This diff is incomplete. Download the complete patch.

Documentation/index.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/misc-devices/index.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/misc-devices/oxsemi-tornado.rst

View file

This diff is incomplete. Download the complete patch.

MAINTAINERS

View file

This diff is incomplete. Download the complete patch.

arch/alpha/include/uapi/asm/termbits.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/uapi/asm/termbits.h

View file

This diff is incomplete. Download the complete patch.

arch/parisc/include/uapi/asm/termbits.h

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/include/uapi/asm/termbits.h

View file

This diff is incomplete. Download the complete patch.

arch/sparc/include/uapi/asm/termbits.h

View file

This diff is incomplete. Download the complete patch.

drivers/char/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/char/pcmcia/synclink_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/ttyprintk.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/amiserial.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/goldfish.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/hvc/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/tty/hvc/hvc_dcc.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/hvc/hvc_opal.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/hvc/hvc_vio.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/hvc/hvcs.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/hvc/hvsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/mxser.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/n_gsm.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/n_tty.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250.h

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_aspeed_vuart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_dma.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_dw.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_dwlib.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_dwlib.h

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_fintek.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_mtk.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_of.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_pci.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_port.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_pxa.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/altera_jtaguart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/amba-pl011.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/amba-pl011.h

View before deletion

This diff is incomplete. Download the complete patch.

drivers/tty/serial/atmel_serial.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/cpm_uart/cpm_uart.h

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/cpm_uart/cpm_uart_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/digicolor-usart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/fsl_lpuart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/icom.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/icom.h

View before deletion

This diff is incomplete. Download the complete patch.

drivers/tty/serial/imx.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/jsm/jsm_cls.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/jsm/jsm_neo.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/max310x.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/men_z135_uart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/meson_uart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/mpc52xx_uart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/msm_serial.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/omap-serial.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/owl-uart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/pch_uart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/pic32_uart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/pic32_uart.h

View before deletion

This diff is incomplete. Download the complete patch.

drivers/tty/serial/pmac_zilog.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/pmac_zilog.h

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/qcom_geni_serial.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/rda-uart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/sa1100.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/samsung_tty.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/sc16is7xx.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/serial_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/serial_txx9.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/sh-sci.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/sifive.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/st-asc.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/stm32-usart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/stm32-usart.h

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/sunplus-uart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/sunsu.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/uartlite.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/xilinx_uartps.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/zs.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/synclink_gt.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/sysrq.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/tty_baudrate.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/tty_ioctl.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/class/cdc-acm.h

View file

This diff is incomplete. Download the complete patch.

drivers/usb/serial/ark3116.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/serial/whiteheat.c

View file

This diff is incomplete. Download the complete patch.

include/linux/serial_core.h

View file

This diff is incomplete. Download the complete patch.

include/linux/serial_s3c.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/asm-generic/termbits-common.h

View file

This diff is incomplete. Download the complete patch.

include/uapi/asm-generic/termbits.h

View file

This diff is incomplete. Download the complete patch.