Skip to contentSkip to conversation

Small cleanups to serial driver organization, configuration, and documentation

PATCH In review Ethan Nelson-Moore 4 participants 9 messages May 5 – Aug 3

Subsystems (18)
lore
Share & tools
lore
#0 lore raw

cover Small cleanups to serial driver organization, configuration, and documentation

This patch series moves some serial drivers into the serial/ directory to improve organization, and removes the SERIAL_NONSTANDARD config option, which adds unnecessary complexity. It also fixes a number of issues in Documentation/driver-api/tty/index.rst, which I noticed while making the above changes. The patch to remove SERIAL_NONSTANDARD touches sections of the tty and serial Kconfig files which are also touched by the patch to move drivers, and therefore the patches would fail to apply separately, so I am sending them as a series.

Ethan Nelson-Moore (3):
tty: move remaining serial drivers into the serial/ directory
tty: remove unnecessary SERIAL_NONSTANDARD config option
docs: driver-api/tty/index.rst: copy-editing; improve organization

 Documentation/driver-api/serial/index.rst     |  1 +
 .../{tty => serial}/moxa-smartio.rst          |  0
 Documentation/driver-api/tty/index.rst        | 47 +++++++++----------
 MAINTAINERS                                   |  4 +-
 arch/arm/configs/footbridge_defconfig         |  1 -
 arch/arm/configs/lpc18xx_defconfig            |  1 -
 arch/arm/configs/mps2_defconfig               |  1 -
 arch/arm/configs/neponset_defconfig           |  1 -
 arch/arm/configs/stm32_defconfig              |  1 -
 arch/csky/configs/defconfig                   |  1 -
 arch/loongarch/configs/loongson32_defconfig   |  1 -
 arch/loongarch/configs/loongson64_defconfig   |  1 -
 arch/mips/configs/bigsur_defconfig            |  1 -
 arch/mips/configs/lemote2f_defconfig          |  1 -
 arch/mips/configs/loongson2k_defconfig        |  1 -
 arch/mips/configs/loongson3_defconfig         |  1 -
 arch/powerpc/configs/cell_defconfig           |  1 -
 arch/powerpc/configs/microwatt_defconfig      |  1 -
 arch/powerpc/configs/ppc6xx_defconfig         |  1 -
 arch/sh/configs/polaris_defconfig             |  1 -
 arch/x86/configs/i386_defconfig               |  1 -
 arch/x86/configs/x86_64_defconfig             |  1 -
 drivers/tty/Kconfig                           | 41 ----------------
 drivers/tty/Makefile                          |  3 --
 drivers/tty/serial/Kconfig                    | 23 +++++++++
 drivers/tty/serial/Makefile                   |  6 ++-
 drivers/tty/{ => serial}/amiserial.c          |  0
 drivers/tty/{ => serial}/moxa.c               |  0
 drivers/tty/{ => serial}/mxser.c              |  0
 tools/testing/selftests/bpf/config.x86_64     |  1 -
 tools/testing/selftests/hid/config.common     |  1 -
 31 files changed, 54 insertions(+), 91 deletions(-)
 rename Documentation/driver-api/{tty => serial}/moxa-smartio.rst (100%)
 rename drivers/tty/{ => serial}/amiserial.c (100%)
 rename drivers/tty/{ => serial}/moxa.c (100%)
 rename drivers/tty/{ => serial}/mxser.c (100%)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/3 tty: move remaining serial drivers into the serial/ directory

A few TTY drivers are outside the serial/ directory despite being for serial devices. Move them and their documentation into the correct directories.

---
 Documentation/driver-api/serial/index.rst     |  1 +
 .../{tty => serial}/moxa-smartio.rst          |  0
 Documentation/driver-api/tty/index.rst        |  1 -
 MAINTAINERS                                   |  4 ++--
 drivers/tty/Kconfig                           | 23 -------------------
 drivers/tty/Makefile                          |  3 ---
 drivers/tty/serial/Kconfig                    | 23 +++++++++++++++++++
 drivers/tty/serial/Makefile                   |  6 ++++-
 drivers/tty/{ => serial}/amiserial.c          |  0
 drivers/tty/{ => serial}/moxa.c               |  0
 drivers/tty/{ => serial}/mxser.c              |  0
 11 files changed, 31 insertions(+), 30 deletions(-)
 rename Documentation/driver-api/{tty => serial}/moxa-smartio.rst (100%)
 rename drivers/tty/{ => serial}/amiserial.c (100%)
 rename drivers/tty/{ => serial}/moxa.c (100%)
 rename drivers/tty/{ => serial}/mxser.c (100%)
Documentation/driver-api/serial/index.rst +1 -0
index 610744df5e8d..f92581fc3478 100644
@@ -18,3 +18,4 @@ Serial drivers
 
     serial-iso7816
     serial-rs485
+    moxa-smartio
Documentation/driver-api/serial/moxa-smartio.rst renamed from Documentation/driver-api/tty/moxa-smartio.rst +0 -0
similarity index 100%
rename from Documentation/driver-api/tty/moxa-smartio.rst
rename to Documentation/driver-api/serial/moxa-smartio.rst
Documentation/driver-api/tty/index.rst +0 -1
index c1ffe3d1ec46..6a08aebbc47c 100644
@@ -70,6 +70,5 @@ Miscellaneous documentation can be further found in these documents:
 .. toctree::
    :maxdepth: 2
 
-   moxa-smartio
    n_gsm
    n_tty
MAINTAINERS +2 -2
index 882214b0e7db..c99671d465af 100644
@@ -18022,8 +18022,8 @@ F:	net/dsa/tag_yt921x.c
 MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD
 M:	Jiri Slaby <[email protected]>
 S:	Maintained
-F:	Documentation/driver-api/tty/moxa-smartio.rst
-F:	drivers/tty/mxser.*
+F:	Documentation/driver-api/serial/moxa-smartio.rst
+F:	drivers/tty/serial/mxser.*
 
 MP3309C BACKLIGHT DRIVER
 M:	Flavio Suligoi <[email protected]>
drivers/tty/Kconfig +0 -23
index df6832a4c237..63b378e44a59 100644
@@ -208,29 +208,6 @@ config SERIAL_NONSTANDARD
 
 	  Most people can say N here.
 
-config MOXA_INTELLIO
-	tristate "Moxa Intellio support"
-	depends on SERIAL_NONSTANDARD && PCI
-	select FW_LOADER
-	help
-	  Say Y here if you have a Moxa Intellio multiport serial card.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called moxa.
-
-config MOXA_SMARTIO
-	tristate "Moxa SmartIO support v. 2.0"
-	depends on SERIAL_NONSTANDARD && PCI && HAS_IOPORT
-	help
-	  Say Y here if you have a Moxa SmartIO multiport serial card and/or
-	  want to help develop a new version of this driver.
-
-	  This is upgraded (1.9.1) driver from original Moxa drivers with
-	  changes finally resulting in PCI probing.
-
-	  This driver can also be built as a module. The module will be called
-	  mxser. If you want to do that, say M here.
-
 config N_HDLC
 	tristate "HDLC line discipline support"
 	depends on SERIAL_NONSTANDARD
drivers/tty/Makefile +0 -3
index 8ca1a0a2229f..fd88830b925d 100644
@@ -16,9 +16,6 @@ obj-y				+= serial/
 obj-$(CONFIG_SERIAL_DEV_BUS)	+= serdev/
 
 # tty drivers
-obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o
-obj-$(CONFIG_MOXA_INTELLIO)	+= moxa.o
-obj-$(CONFIG_MOXA_SMARTIO)	+= mxser.o
 obj-$(CONFIG_NOZOMI)		+= nozomi.o
 obj-$(CONFIG_NULL_TTY)	        += ttynull.o
 obj-$(CONFIG_PPC_EPAPR_HV_BYTECHAN) += ehv_bytechan.o
drivers/tty/serial/Kconfig +23 -0
index 9aa61c93d7bc..999f56307445 100644
@@ -1592,6 +1592,29 @@ config SERIAL_NUVOTON_MA35D1_CONSOLE
 	  but you can alter that using a kernel command line option such as
 	  "console=ttyNVTx".
 
+config MOXA_INTELLIO
+	tristate "Moxa Intellio support"
+	depends on SERIAL_NONSTANDARD && PCI
+	select FW_LOADER
+	help
+	  Say Y here if you have a Moxa Intellio multiport serial card.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called moxa.
+
+config MOXA_SMARTIO
+	tristate "Moxa SmartIO support v. 2.0"
+	depends on SERIAL_NONSTANDARD && PCI && HAS_IOPORT
+	help
+	  Say Y here if you have a Moxa SmartIO multiport serial card and/or
+	  want to help develop a new version of this driver.
+
+	  This is upgraded (1.9.1) driver from original Moxa drivers with
+	  changes finally resulting in PCI probing.
+
+	  This driver can also be built as a module. The module will be called
+	  mxser. If you want to do that, say M here.
+
 endmenu
 
 config SERIAL_MCTRL_GPIO
drivers/tty/serial/Makefile +5 -1
index bba7b21a4a1d..246e0cf29fcc 100644
@@ -10,9 +10,11 @@ obj-$(CONFIG_SERIAL_EARLYCON) += earlycon.o
 obj-$(CONFIG_SERIAL_EARLYCON_SEMIHOST) += earlycon-semihost.o
 obj-$(CONFIG_SERIAL_EARLYCON_RISCV_SBI) += earlycon-riscv-sbi.o
 
-# These Sparc drivers have to appear before others such as 8250
+# These drivers have to appear before others such as 8250
 # which share ttySx minor node space.  Otherwise console device
 # names change and other unplesantries.
+obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o
+
 obj-$(CONFIG_SERIAL_SUNCORE) += suncore.o
 obj-$(CONFIG_SERIAL_SUNHV) += sunhv.o
 obj-$(CONFIG_SERIAL_SUNZILOG) += sunzilog.o
@@ -53,12 +55,14 @@ obj-$(CONFIG_SERIAL_MCF)		+= mcf.o
 obj-$(CONFIG_SERIAL_MEN_Z135)		+= men_z135_uart.o
 obj-$(CONFIG_SERIAL_MILBEAUT_USIO)	+= milbeaut_usio.o
 obj-$(CONFIG_SERIAL_MESON)		+= meson_uart.o
+obj-$(CONFIG_MOXA_INTELLIO)		+= moxa.o
 obj-$(CONFIG_SERIAL_MPC52xx)		+= mpc52xx_uart.o
 obj-$(CONFIG_SERIAL_MPS2_UART)		+= mps2-uart.o
 obj-$(CONFIG_SERIAL_MSM)		+= msm_serial.o
 obj-$(CONFIG_SERIAL_MUX)		+= mux.o
 obj-$(CONFIG_SERIAL_MVEBU_UART)		+= mvebu-uart.o
 obj-$(CONFIG_SERIAL_MXS_AUART)		+= mxs-auart.o
+obj-$(CONFIG_MOXA_SMARTIO)		+= mxser.o
 obj-$(CONFIG_SERIAL_OMAP)		+= omap-serial.o
 obj-$(CONFIG_SERIAL_OWL)		+= owl-uart.o
 obj-$(CONFIG_SERIAL_PCH_UART)		+= pch_uart.o
drivers/tty/serial/amiserial.c renamed from drivers/tty/amiserial.c +0 -0
similarity index 100%
rename from drivers/tty/amiserial.c
rename to drivers/tty/serial/amiserial.c
drivers/tty/serial/moxa.c renamed from drivers/tty/moxa.c +0 -0
similarity index 100%
rename from drivers/tty/moxa.c
rename to drivers/tty/serial/moxa.c
drivers/tty/serial/mxser.c renamed from drivers/tty/mxser.c +0 -0
similarity index 100%
rename from drivers/tty/mxser.c
rename to drivers/tty/serial/mxser.c
Signature · 1 line
2.43.0
maintainer
#2 lore raw

Re: [PATCH 1/3] tty: move remaining serial drivers into the serial/ directory

Quoted 2 lines · Ethan Nelson-Moore

A few TTY drivers are outside the serial/ directory despite being for serial devices.

Yes, but serial/ (historically) contains drivers using serial_core. tty/ contains drivers using tty_driver (which all of three unfortunately do).

There was a patchset from Crescent Hsieh (Moxa) to convert mxser [1]. Amiserial should be likely converted too -- Amiga users still around? There is no MAINTAINERS entry for Amiga, trying to CC m68k...

I am not sure even about users of Moxa Intellio. I think I prompted long time ago. Oh yes, Ray Chen (CCed) from Moxa wrote me back in 2021:
=== 8< ===
For the Intellio cards, we phased them out in 2017.
You may find the discontinuance notification as attached.
We will keep the software support for 5 years, to 2023.
=== 8< ===

I believe we can mark it as BROKEN to let someone convert it to serial_core. Or drop it for good already.

[1] https://lore.kernel.org/all/[email protected]/

thanks,

Signature · 2 lines
js
suse labs
#3 lore raw

Re: [PATCH 1/3] tty: move remaining serial drivers into the serial/ directory

Quoted 8 lines · Jiri Slaby
Quoted 2 lines · Ethan Nelson-Moore

A few TTY drivers are outside the serial/ directory despite being for serial devices.

Yes, but serial/ (historically) contains drivers using serial_core. tty/ contains drivers using tty_driver (which all of three unfortunately do).

There was a patchset from Crescent Hsieh (Moxa) to convert mxser [1].

Yes, I have been working on converting mxser.c into an 8250-based serial driver for some time, and it is still in progress.

Quoted 10 lines

I am not sure even about users of Moxa Intellio. I think I prompted long time ago. Oh yes, Ray Chen (CCed) from Moxa wrote me back in 2021:
=== 8< ===
For the Intellio cards, we phased them out in 2017.
You may find the discontinuance notification as attached.
We will keep the software support for 5 years, to 2023.
=== 8< ===

I believe we can mark it as BROKEN to let someone convert it to serial_core. Or drop it for good already.

As for Moxa Intellio (moxa.c), I have confirmed internally that both the hardware and software support have already been phased out.

Therefore, it would be reasonable to drop it at this point. I can help with preparing a removal patch if this is the preferred direction.

---
Sincerely,
Crescent Hsieh

maintainer
#4 lore raw

Re: [PATCH 1/3] tty: move remaining serial drivers into the serial/ directory

Quoted 8 lines · Crescent Hsieh
Quoted 8 lines

I am not sure even about users of Moxa Intellio. I think I prompted long time ago. Oh yes, Ray Chen (CCed) from Moxa wrote me back in 2021:
=== 8< ===
For the Intellio cards, we phased them out in 2017.
You may find the discontinuance notification as attached.
We will keep the software support for 5 years, to 2023.
=== 8< ===

Quoted 8 lines
Quoted 2 lines

I believe we can mark it as BROKEN to let someone convert it to serial_core. Or drop it for good already.

As for Moxa Intellio (moxa.c), I have confirmed internally that both the hardware and software support have already been phased out.

Therefore, it would be reasonable to drop it at this point. I can help with preparing a removal patch if this is the preferred direction.

Let me revive this one.

I think we should proceed -- so could you remove the intellio driver, please?

thanks,

Signature · 2 lines
js
suse labs
#5 lore raw

PATCH 2/3 tty: remove unnecessary SERIAL_NONSTANDARD config option

In reply to Ethan Nelson-Moore

The SERIAL_NONSTANDARD config option currently only guards the selection of two Moxa multiport serial card drivers and the HDLC line discipline, so it does not significantly simplify configuration. Make the configuration process more straightforward by dropping this option and dependencies on it.

---
 arch/arm/configs/footbridge_defconfig       |  1 -
 arch/arm/configs/lpc18xx_defconfig          |  1 -
 arch/arm/configs/mps2_defconfig             |  1 -
 arch/arm/configs/neponset_defconfig         |  1 -
 arch/arm/configs/stm32_defconfig            |  1 -
 arch/csky/configs/defconfig                 |  1 -
 arch/loongarch/configs/loongson32_defconfig |  1 -
 arch/loongarch/configs/loongson64_defconfig |  1 -
 arch/mips/configs/bigsur_defconfig          |  1 -
 arch/mips/configs/lemote2f_defconfig        |  1 -
 arch/mips/configs/loongson2k_defconfig      |  1 -
 arch/mips/configs/loongson3_defconfig       |  1 -
 arch/powerpc/configs/cell_defconfig         |  1 -
 arch/powerpc/configs/microwatt_defconfig    |  1 -
 arch/powerpc/configs/ppc6xx_defconfig       |  1 -
 arch/sh/configs/polaris_defconfig           |  1 -
 arch/x86/configs/i386_defconfig             |  1 -
 arch/x86/configs/x86_64_defconfig           |  1 -
 drivers/tty/Kconfig                         | 18 ------------------
 drivers/tty/serial/Kconfig                  |  4 ++--
 tools/testing/selftests/bpf/config.x86_64   |  1 -
 tools/testing/selftests/hid/config.common   |  1 -
 22 files changed, 2 insertions(+), 40 deletions(-)
arch/arm/configs/footbridge_defconfig +0 -1
index 5f6963687ee4..58234fd3af4b 100644
@@ -70,7 +70,6 @@ CONFIG_SLIP_SMART=y
 CONFIG_SLIP_MODE_SLIP6=y
 CONFIG_SERIAL_21285=y
 CONFIG_SERIAL_21285_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_PRINTER=m
 CONFIG_DS1620=y
 CONFIG_NWBUTTON=y
arch/arm/configs/lpc18xx_defconfig +0 -1
index f142a6637ede..9ca18939b82a 100644
@@ -92,7 +92,6 @@ CONFIG_KEYBOARD_GPIO_POLLED=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_HW_RANDOM is not set
 CONFIG_I2C_LPC2K=y
 CONFIG_SPI=y
arch/arm/configs/mps2_defconfig +0 -1
index e995e50537ef..a1045dee7e8a 100644
@@ -66,7 +66,6 @@ CONFIG_SMSC911X=y
 # CONFIG_LEGACY_PTYS is not set
 CONFIG_SERIAL_MPS2_UART_CONSOLE=y
 CONFIG_SERIAL_MPS2_UART=y
-CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_HW_RANDOM is not set
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
arch/arm/configs/neponset_defconfig +0 -1
index 8a5dcca743fc..2080e4dfdd6c 100644
@@ -51,7 +51,6 @@ CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CS=y
 CONFIG_SERIAL_SA1100=y
 CONFIG_SERIAL_SA1100_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_WATCHDOG=y
arch/arm/configs/stm32_defconfig +0 -1
index 82190b155b14..919c70107371 100644
@@ -39,7 +39,6 @@ CONFIG_KEYBOARD_GPIO=y
 # CONFIG_LEGACY_PTYS is not set
 CONFIG_SERIAL_STM32=y
 CONFIG_SERIAL_STM32_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_HW_RANDOM is not set
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
arch/csky/configs/defconfig +0 -1
index ff559e5162aa..481b51eadf41 100644
@@ -20,7 +20,6 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=65536
 CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
arch/loongarch/configs/loongson32_defconfig +0 -1
index d5ef396dffe3..5dd7b8cb8957 100644
@@ -723,7 +723,6 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_8250_RSA=y
 CONFIG_SERIAL_8250_LOONGSON=y
 CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_PRINTER=m
 CONFIG_VIRTIO_CONSOLE=y
 CONFIG_HW_RANDOM=y
arch/loongarch/configs/loongson64_defconfig +0 -1
index cba4cdff5acd..80396cd61755 100644
@@ -739,7 +739,6 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_8250_RSA=y
 CONFIG_SERIAL_8250_LOONGSON=y
 CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_PRINTER=m
 CONFIG_VIRTIO_CONSOLE=y
 CONFIG_IPMI_HANDLER=m
arch/mips/configs/bigsur_defconfig +0 -1
index aa63ada62e28..602795e2659c 100644
@@ -121,7 +121,6 @@ CONFIG_SLIP_MODE_SLIP6=y
 # CONFIG_INPUT is not set
 CONFIG_SERIO_RAW=m
 # CONFIG_VT is not set
-CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_HW_RANDOM is not set
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
arch/mips/configs/lemote2f_defconfig +0 -1
index b9f3e1641105..084b569cf8d8 100644
@@ -125,7 +125,6 @@ CONFIG_SERIAL_8250_NR_UARTS=16
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_FOURPORT=y
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_HW_RANDOM=y
 CONFIG_GPIO_LOONGSON=y
 CONFIG_THERMAL=y
arch/mips/configs/loongson2k_defconfig +0 -1
index ca534a6b66de..0b29ad43b62b 100644
@@ -222,7 +222,6 @@ CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_8250_RSA=y
 CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_HW_RANDOM=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_PIIX4=y
arch/mips/configs/loongson3_defconfig +0 -1
index 12cb1a6a1360..00bf6358357f 100644
@@ -254,7 +254,6 @@ CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_8250_RSA=y
 CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_VIRTIO_CONSOLE=y
 CONFIG_HW_RANDOM=y
 CONFIG_I2C_CHARDEV=y
arch/powerpc/configs/cell_defconfig +0 -1
index 7a31b52e92e1..439c03172deb 100644
@@ -135,7 +135,6 @@ CONFIG_GELIC_WIRELESS=y
 # CONFIG_INPUT_MOUSE is not set
 # CONFIG_SERIO_I8042 is not set
 # CONFIG_LEGACY_PTYS is not set
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
arch/powerpc/configs/microwatt_defconfig +0 -1
index d81989a6f59b..60dce8b41f97 100644
@@ -64,7 +64,6 @@ CONFIG_LITEX_LITEETH=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_NVRAM is not set
 CONFIG_SPI=y
 CONFIG_SPI_DEBUG=y
arch/powerpc/configs/ppc6xx_defconfig +0 -1
index 4ddd2c01b8b7..b745965c5215 100644
@@ -550,7 +550,6 @@ CONFIG_GAMEPORT_L4=m
 CONFIG_GAMEPORT_EMU10K1=m
 CONFIG_GAMEPORT_FM801=m
 # CONFIG_LEGACY_PTYS is not set
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_NOZOMI=m
 CONFIG_N_HDLC=m
 CONFIG_SERIAL_8250=y
arch/sh/configs/polaris_defconfig +0 -1
index 4f0396c2ac79..0b51a85300a6 100644
@@ -54,7 +54,6 @@ CONFIG_SMSC911X=y
 # CONFIG_INPUT_MOUSE is not set
 # CONFIG_SERIO is not set
 CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_SERIAL_SH_SCI=y
 CONFIG_SERIAL_SH_SCI_NR_UARTS=3
 CONFIG_SERIAL_SH_SCI_CONSOLE=y
arch/x86/configs/i386_defconfig +0 -1
index 79fa38ca954d..b67e7073da10 100644
@@ -182,7 +182,6 @@ CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_8250_DETECT_IRQ=y
 CONFIG_SERIAL_8250_RSA=y
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_VIRTIO_CONSOLE=y
 CONFIG_HW_RANDOM=y
 CONFIG_NVRAM=y
arch/x86/configs/x86_64_defconfig +0 -1
index 269f7d808be4..5db8acec1e37 100644
@@ -177,7 +177,6 @@ CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_8250_DETECT_IRQ=y
 CONFIG_SERIAL_8250_RSA=y
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_VIRTIO_CONSOLE=y
 CONFIG_HW_RANDOM=y
 # CONFIG_HW_RANDOM_INTEL is not set
drivers/tty/Kconfig +0 -18
index 63b378e44a59..a9ade8bc88b2 100644
@@ -191,26 +191,8 @@ config LDISC_AUTOLOAD
 
 source "drivers/tty/serial/Kconfig"
 
-config SERIAL_NONSTANDARD
-	bool "Non-standard serial port support"
-	depends on HAS_IOMEM
-	help
-	  Say Y here if you have any non-standard serial boards -- boards
-	  which aren't supported using the standard "dumb" serial driver.
-	  This includes intelligent serial boards such as
-	  Digiboards, etc. These are usually used for systems that need many
-	  serial ports because they serve many terminals or dial-in
-	  connections.
-
-	  Note that the answer to this question won't directly affect the
-	  kernel: saying N will just cause the configurator to skip all
-	  the questions about non-standard serial boards.
-
-	  Most people can say N here.
-
 config N_HDLC
 	tristate "HDLC line discipline support"
-	depends on SERIAL_NONSTANDARD
 	help
 	  Allows synchronous HDLC communications with tty device drivers that
 	  support synchronous HDLC.
drivers/tty/serial/Kconfig +2 -2
index 999f56307445..6e448a6f1020 100644
@@ -1594,7 +1594,7 @@ config SERIAL_NUVOTON_MA35D1_CONSOLE
 
 config MOXA_INTELLIO
 	tristate "Moxa Intellio support"
-	depends on SERIAL_NONSTANDARD && PCI
+	depends on PCI
 	select FW_LOADER
 	help
 	  Say Y here if you have a Moxa Intellio multiport serial card.
@@ -1604,7 +1604,7 @@ config MOXA_INTELLIO
 
 config MOXA_SMARTIO
 	tristate "Moxa SmartIO support v. 2.0"
-	depends on SERIAL_NONSTANDARD && PCI && HAS_IOPORT
+	depends on PCI && HAS_IOPORT
 	help
 	  Say Y here if you have a Moxa SmartIO multiport serial card and/or
 	  want to help develop a new version of this driver.
tools/testing/selftests/bpf/config.x86_64 +0 -1
index 42ad817b00ae..2fc3e7e6ae5e 100644
@@ -189,7 +189,6 @@ CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_NR_UARTS=32
 CONFIG_SERIAL_8250_RSA=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_SERIO_LIBPS2=y
 CONFIG_SGI_PARTITION=y
 CONFIG_SMP=y
tools/testing/selftests/hid/config.common +0 -1
index 38c51158adf8..89a83cda737b 100644
@@ -201,7 +201,6 @@ CONFIG_SERIAL_8250_NR_UARTS=32
 CONFIG_SERIAL_8250_RSA=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_SERIO_LIBPS2=y
 CONFIG_SGI_PARTITION=y
 CONFIG_SMP=y
Signature · 1 line
2.43.0
reviewer
#6 lore raw

Re: [PATCH 2/3] tty: remove unnecessary SERIAL_NONSTANDARD config option

Quoted 52 lines · Ethan Nelson-Moore

The SERIAL_NONSTANDARD config option currently only guards the selection of two Moxa multiport serial card drivers and the HDLC line discipline, so it does not significantly simplify configuration. Make the configuration process more straightforward by dropping this option and dependencies on it.

---
 arch/arm/configs/footbridge_defconfig       |  1 -
 arch/arm/configs/lpc18xx_defconfig          |  1 -
 arch/arm/configs/mps2_defconfig             |  1 -
 arch/arm/configs/neponset_defconfig         |  1 -
 arch/arm/configs/stm32_defconfig            |  1 -
 arch/csky/configs/defconfig                 |  1 -
 arch/loongarch/configs/loongson32_defconfig |  1 -
 arch/loongarch/configs/loongson64_defconfig |  1 -
 arch/mips/configs/bigsur_defconfig          |  1 -
 arch/mips/configs/lemote2f_defconfig        |  1 -
 arch/mips/configs/loongson2k_defconfig      |  1 -
 arch/mips/configs/loongson3_defconfig       |  1 -
 arch/powerpc/configs/cell_defconfig         |  1 -
 arch/powerpc/configs/microwatt_defconfig    |  1 -
 arch/powerpc/configs/ppc6xx_defconfig       |  1 -
 arch/sh/configs/polaris_defconfig           |  1 -
 arch/x86/configs/i386_defconfig             |  1 -
 arch/x86/configs/x86_64_defconfig           |  1 -
 drivers/tty/Kconfig                         | 18 ------------------
 drivers/tty/serial/Kconfig                  |  4 ++--
 tools/testing/selftests/bpf/config.x86_64   |  1 -
 tools/testing/selftests/hid/config.common   |  1 -
 22 files changed, 2 insertions(+), 40 deletions(-)
drivers/tty/Kconfig +0 -10
index 63b378e44a59..a9ade8bc88b2 100644
@@ -191,26 +191,8 @@ config LDISC_AUTOLOAD
 
 source "drivers/tty/serial/Kconfig"
 
-config SERIAL_NONSTANDARD
-	bool "Non-standard serial port support"
-	depends on HAS_IOMEM
-	help
-	  Say Y here if you have any non-standard serial boards -- boards
-	  which aren't supported using the standard "dumb" serial driver.
-	  This includes intelligent serial boards such as
-	  Digiboards, etc. These are usually used for systems that need many
-	  serial ports because they serve many terminals or dial-in
-	  connections.

drivers/tty/Kconfig config LDISC_AUTOLOAD · line 213

Quoted 10 lines
drivers/tty/Kconfig +0 -8
-
-	  Note that the answer to this question won't directly affect the
-	  kernel: saying N will just cause the configurator to skip all
-	  the questions about non-standard serial boards.
-
-	  Most people can say N here.
-
 config N_HDLC
 	tristate "HDLC line discipline support"
-	depends on SERIAL_NONSTANDARD

Here, N_HDLC used to depend on HAS_IOMEM (due to SERIAL_NONSTANDARD). It no longer depends on HAS_IOMEM so it can be built for ARCH=um with no build errors.

Just FYI/FWIW. Maybe add that to the commit message.

Signature · 1 line
~Randy
#7 lore raw

PATCH 3/3 docs: driver-api/tty/index.rst: copy-editing; improve organization

In reply to Ethan Nelson-Moore

The TTY driver API intro document contains a number of grammar and capitalization issues. Fix them.

Now that the MOXA Smartio driver documentation is in the serial/ directory, the "Other Documentation" section only contains TTY line disciplines. Rename it to reflect that.

---
 Documentation/driver-api/tty/index.rst | 46 +++++++++++++-------------
 1 file changed, 23 insertions(+), 23 deletions(-)
Documentation/driver-api/tty/index.rst +23 -23
index 6a08aebbc47c..eb5d602450f8 100644
@@ -4,29 +4,30 @@
 TTY
 ===
 
-Teletypewriter (TTY) layer takes care of all those serial devices. Including
-the virtual ones like pseudoterminal (PTY).
+The teletypewriter (TTY) layer handles all serial devices, including
+virtual ones like pseudoterminals (PTYs).
 
-TTY structures
+TTY Structures
 ==============
 
 There are several major TTY structures. Every TTY device in a system has a
 corresponding struct tty_port. These devices are maintained by a TTY driver
-which is struct tty_driver. This structure describes the driver but also
-contains a reference to operations which could be performed on the TTYs. It is
-struct tty_operations. Then, upon open, a struct tty_struct is allocated and
+defined by struct tty_driver. This structure describes the driver but also
+contains a reference to struct tty_operations, which defines operations which
+can be performed on the TTY. Upon open, a struct tty_struct is allocated and
 lives until the final close. During this time, several callbacks from struct
 tty_operations are invoked by the TTY layer.
 
-Every character received by the kernel (both from devices and users) is passed
+Every character received by the kernel (from both devices and users) is passed
 through a preselected :doc:`tty_ldisc` (in
 short ldisc; in C, struct tty_ldisc_ops). Its task is to transform characters
-as defined by a particular ldisc or by user too. The default one is n_tty,
-implementing echoes, signal handling, jobs control, special characters
-processing, and more. The transformed characters are passed further to
-user/device, depending on the source.
+as defined by a particular ldisc or by the user. The default one is n_tty,
+which implements echoes, signal handling, jobs control, special characters
+processing, and more. The transformed characters are passed on further to the
+user or device, depending on the source.
 
-In-detail description of the named TTY structures is in separate documents:
+A detailed description of the named TTY structures is contained in separate
+documents:
 
 .. toctree::
    :maxdepth: 2
@@ -40,14 +41,14 @@ In-detail description of the named TTY structures is in separate documents:
    tty_internals
    console
 
-Writing TTY Driver
-==================
+Writing TTY Drivers
+===================
 
-Before one starts writing a TTY driver, they must consider
-:doc:`Serial <../serial/driver>` and :doc:`USB Serial <../../usb/usb-serial>`
+Before you start writing a TTY driver, you should consider using the
+: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.
+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:
 
@@ -58,14 +59,13 @@ A *typical* sequence a TTY driver performs is as follows:
 #. Remove devices as they are going away (remove function)
 #. Unregister and free the TTY driver (module exit)
 
-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`.
+Steps regarding the driver, i.e., steps 1, 3, and 5, are described in detail in
+:doc:`tty_driver`. For the other two (device handling), see :doc:`tty_port`.
 
-Other Documentation
-===================
+Line Disciplines
+================
 
-Miscellaneous documentation can be further found in these documents:
+Documentation for TTY line disciplines can be found in the following documents:
 
 .. toctree::
    :maxdepth: 2
Signature · 1 line
2.43.0
reviewer Tested-by Acked-by on v1 3/3
#8 lore raw

Re: [PATCH 3/3] docs: driver-api/tty/index.rst: copy-editing; improve organization

Documentation/driver-api/tty/index.rst

Quoted 16 lines · Ethan Nelson-Moore

The TTY driver API intro document contains a number of grammar and capitalization issues. Fix them.

Now that the MOXA Smartio driver documentation is in the serial/ directory, the "Other Documentation" section only contains TTY line disciplines. Rename it to reflect that.

---
 Documentation/driver-api/tty/index.rst | 46 +++++++++++++-------------
 1 file changed, 23 insertions(+), 23 deletions(-)
Documentation/driver-api/tty/index.rst +0 -0
index 6a08aebbc47c..eb5d602450f8 100644

This LGTM.

Signature · 1 line
~Randy