Skip to content

Commit 3bcb0bf

Browse files
committed
Merge tag 'tty-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty / serial driver updates from Greg KH: "Here is the big set of TTY/Serial driver updates and cleanups for 6.9-rc1. Included in here are: - more tty cleanups from Jiri - loads of 8250 driver cleanups from Andy - max310x driver updates - samsung serial driver updates - uart_prepare_sysrq_char() updates for many drivers - platform driver remove callback void cleanups - stm32 driver updates - other small tty/serial driver updates All of these have been in linux-next for a long time with no reported issues" * tag 'tty-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (199 commits) dt-bindings: serial: stm32: add power-domains property serial: 8250_dw: Replace ACPI device check by a quirk serial: Lock console when calling into driver before registration serial: 8250_uniphier: Switch to use uart_read_port_properties() serial: 8250_tegra: Switch to use uart_read_port_properties() serial: 8250_pxa: Switch to use uart_read_port_properties() serial: 8250_omap: Switch to use uart_read_port_properties() serial: 8250_of: Switch to use uart_read_port_properties() serial: 8250_lpc18xx: Switch to use uart_read_port_properties() serial: 8250_ingenic: Switch to use uart_read_port_properties() serial: 8250_dw: Switch to use uart_read_port_properties() serial: 8250_bcm7271: Switch to use uart_read_port_properties() serial: 8250_bcm2835aux: Switch to use uart_read_port_properties() serial: 8250_aspeed_vuart: Switch to use uart_read_port_properties() serial: port: Introduce a common helper to read properties serial: core: Add UPIO_UNKNOWN constant for unknown port type serial: core: Move struct uart_port::quirks closer to possible values serial: sh-sci: Call sci_serial_{in,out}() directly serial: core: only stop transmit when HW fifo is empty serial: pch: Use uart_prepare_sysrq_char(). ...
2 parents e09bf86 + d6c0d89 commit 3bcb0bf

File tree

122 files changed

+3545
-2524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+3545
-2524
lines changed

Documentation/devicetree/bindings/serial/cdns,uart.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ required:
5555

5656
allOf:
5757
- $ref: serial.yaml#
58+
- $ref: rs485.yaml#
5859
- if:
5960
properties:
6061
compatible:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ properties:
3030
- items:
3131
- enum:
3232
- fsl,imx93-lpuart
33+
- fsl,imx95-lpuart
3334
- const: fsl,imx8ulp-lpuart
3435
- const: fsl,imx7ulp-lpuart
3536
- items:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ properties:
5959
- renesas,hscif-r8a779a0 # R-Car V3U
6060
- renesas,hscif-r8a779f0 # R-Car S4-8
6161
- renesas,hscif-r8a779g0 # R-Car V4H
62+
- renesas,hscif-r8a779h0 # R-Car V4M
6263
- const: renesas,rcar-gen4-hscif # R-Car Gen4
6364
- const: renesas,hscif # generic HSCIF compatible UART
6465

Documentation/devicetree/bindings/serial/samsung_uart.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ allOf:
143143
then:
144144
required:
145145
- samsung,uart-fifosize
146+
properties:
147+
reg-io-width: false
146148

147149
unevaluatedProperties: false
148150

Documentation/devicetree/bindings/serial/serial.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ properties:
8888
TX FIFO threshold configuration (in bytes).
8989

9090
patternProperties:
91-
"^(bluetooth|bluetooth-gnss|gnss|gps|mcu)$":
91+
"^(bluetooth|bluetooth-gnss|gnss|gps|mcu|onewire)$":
9292
if:
9393
type: object
9494
then:
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/serial/st,asc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: STMicroelectronics STi SoCs Serial Port
8+
9+
maintainers:
10+
- Patrice Chotard <[email protected]>
11+
12+
allOf:
13+
- $ref: serial.yaml#
14+
15+
properties:
16+
compatible:
17+
const: st,asc
18+
19+
reg:
20+
maxItems: 1
21+
22+
interrupts:
23+
maxItems: 1
24+
25+
clocks:
26+
maxItems: 1
27+
28+
st,hw-flow-ctrl:
29+
description: When set, enable hardware flow control.
30+
type: boolean
31+
32+
st,force-m1:
33+
description: When set, force asc to be in Mode-1. This is recommended for
34+
high bit rates above 19.2K.
35+
type: boolean
36+
37+
required:
38+
- compatible
39+
- reg
40+
- interrupts
41+
- clocks
42+
43+
unevaluatedProperties: false
44+
45+
examples:
46+
- |
47+
#include <dt-bindings/clock/stih407-clks.h>
48+
#include <dt-bindings/interrupt-controller/arm-gic.h>
49+
serial@9830000 {
50+
compatible = "st,asc";
51+
reg = <0x9830000 0x2c>;
52+
interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
53+
clocks = <&clk_s_c0_flexgen CLK_EXT2F_A9>;
54+
};
55+
...

Documentation/devicetree/bindings/serial/st,stm32-uart.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ properties:
5858

5959
wakeup-source: true
6060

61+
power-domains:
62+
maxItems: 1
63+
6164
rx-threshold:
6265
description:
6366
If value is set to 1, RX FIFO threshold is disabled.

Documentation/devicetree/bindings/serial/st-asc.txt

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/w1/w1-uart.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: UART 1-Wire Bus
8+
9+
maintainers:
10+
- Christoph Winklhofer <[email protected]>
11+
12+
description: |
13+
UART 1-wire bus. Utilizes the UART interface via the Serial Device Bus
14+
to create the 1-Wire timing patterns.
15+
16+
The UART peripheral must support full-duplex and operate in open-drain
17+
mode. The timing patterns are generated by a specific combination of
18+
baud-rate and transmitted byte, which corresponds to a 1-Wire read bit,
19+
write bit or reset pulse.
20+
21+
The default baud-rate for reset and presence detection is 9600 and for
22+
a 1-Wire read or write operation 115200. In case the actual baud-rate
23+
is different from the requested one, the transmitted byte is adapted
24+
to generate the 1-Wire timing patterns.
25+
26+
https://www.analog.com/en/technical-articles/using-a-uart-to-implement-a-1wire-bus-master.html
27+
28+
properties:
29+
compatible:
30+
const: w1-uart
31+
32+
reset-bps:
33+
default: 9600
34+
description:
35+
The baud rate for the 1-Wire reset and presence detect.
36+
37+
write-0-bps:
38+
default: 115200
39+
description:
40+
The baud rate for the 1-Wire write-0 cycle.
41+
42+
write-1-bps:
43+
default: 115200
44+
description:
45+
The baud rate for the 1-Wire write-1 and read cycle.
46+
47+
required:
48+
- compatible
49+
50+
additionalProperties:
51+
type: object
52+
53+
examples:
54+
- |
55+
serial {
56+
onewire {
57+
compatible = "w1-uart";
58+
};
59+
};
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
=======
4+
Console
5+
=======
6+
7+
.. contents:: :local:
8+
9+
Struct Console
10+
==============
11+
12+
.. kernel-doc:: include/linux/console.h
13+
:identifiers: console cons_flags
14+
15+
Internals
16+
---------
17+
18+
.. kernel-doc:: include/linux/console.h
19+
:identifiers: nbcon_state nbcon_prio nbcon_context nbcon_write_context
20+
21+
Struct Consw
22+
============
23+
24+
.. kernel-doc:: include/linux/console.h
25+
:identifiers: consw
26+
27+
Console functions
28+
=================
29+
30+
.. kernel-doc:: include/linux/console.h
31+
:identifiers: console_srcu_read_flags console_srcu_write_flags
32+
console_is_registered for_each_console_srcu for_each_console
33+
34+
.. kernel-doc:: drivers/tty/vt/selection.c
35+
:export:
36+
.. kernel-doc:: drivers/tty/vt/vt.c
37+
:export:
38+
39+
Internals
40+
---------
41+
42+
.. kernel-doc:: drivers/tty/vt/selection.c
43+
:internal:
44+
.. kernel-doc:: drivers/tty/vt/vt.c
45+
:internal:

Documentation/driver-api/tty/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ In-detail description of the named TTY structures is in separate documents:
3838
tty_buffer
3939
tty_ioctl
4040
tty_internals
41+
console
4142

4243
Writing TTY Driver
4344
==================

Documentation/w1/masters/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
mxc-w1
1313
omap-hdq
1414
w1-gpio
15+
w1-uart

Documentation/w1/masters/w1-uart.rst

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
.. SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
=====================
4+
Kernel driver w1-uart
5+
=====================
6+
7+
Author: Christoph Winklhofer <[email protected]>
8+
9+
10+
Description
11+
-----------
12+
13+
UART 1-Wire bus driver. The driver utilizes the UART interface via the
14+
Serial Device Bus to create the 1-Wire timing patterns as described in
15+
the document `"Using a UART to Implement a 1-Wire Bus Master"`_.
16+
17+
.. _"Using a UART to Implement a 1-Wire Bus Master": https://www.analog.com/en/technical-articles/using-a-uart-to-implement-a-1wire-bus-master.html
18+
19+
In short, the UART peripheral must support full-duplex and operate in
20+
open-drain mode. The timing patterns are generated by a specific
21+
combination of baud-rate and transmitted byte, which corresponds to a
22+
1-Wire read bit, write bit or reset pulse.
23+
24+
For instance the timing pattern for a 1-Wire reset and presence detect uses
25+
the baud-rate 9600, i.e. 104.2 us per bit. The transmitted byte 0xf0 over
26+
UART (least significant bit first, start-bit low) sets the reset low time
27+
for 1-Wire to 521 us. A present 1-Wire device changes the received byte by
28+
pulling the line low, which is used by the driver to evaluate the result of
29+
the 1-Wire operation.
30+
31+
Similar for a 1-Wire read bit or write bit, which uses the baud-rate
32+
115200, i.e. 8.7 us per bit. The transmitted byte 0x80 is used for a
33+
Write-0 operation (low time 69.6us) and the byte 0xff for Read-0, Read-1
34+
and Write-1 (low time 8.7us).
35+
36+
The default baud-rate for reset and presence detection is 9600 and for
37+
a 1-Wire read or write operation 115200. In case the actual baud-rate
38+
is different from the requested one, the transmitted byte is adapted
39+
to generate the 1-Wire timing patterns.
40+
41+
42+
Usage
43+
-----
44+
45+
Specify the UART 1-wire bus in the device tree by adding the single child
46+
onewire to the serial node (e.g. uart0). For example:
47+
::
48+
49+
@uart0 {
50+
...
51+
onewire {
52+
compatible = "w1-uart";
53+
};
54+
};

arch/m68k/amiga/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,6 @@ static void amiga_get_hardware_list(struct seq_file *m)
846846
* The Amiga keyboard driver needs key_maps, but we cannot export it in
847847
* drivers/char/defkeymap.c, as it is autogenerated
848848
*/
849-
#ifdef CONFIG_HW_CONSOLE
849+
#ifdef CONFIG_VT
850850
EXPORT_SYMBOL_GPL(key_maps);
851851
#endif

arch/m68k/hp300/config.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <linux/module.h>
1212
#include <linux/init.h>
13+
#include <linux/serial_8250.h>
1314
#include <linux/string.h>
1415
#include <linux/kernel.h>
1516
#include <linux/console.h>
@@ -67,9 +68,6 @@ static char *hp300_models[] __initdata = {
6768
static char hp300_model_name[13] = "HP9000/";
6869

6970
extern void hp300_reset(void);
70-
#ifdef CONFIG_SERIAL_8250_CONSOLE
71-
extern int hp300_setup_serial_console(void) __init;
72-
#endif
7371

7472
int __init hp300_parse_bootinfo(const struct bi_record *record)
7573
{
@@ -263,7 +261,5 @@ void __init config_hp300(void)
263261
} else {
264262
panic("Unknown HP9000 Model");
265263
}
266-
#ifdef CONFIG_SERIAL_8250_CONSOLE
267264
hp300_setup_serial_console();
268-
#endif
269265
}

drivers/bluetooth/btmtkuart.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,8 @@ static void btmtkuart_recv(struct hci_dev *hdev, const u8 *data, size_t count)
383383
}
384384
}
385385

386-
static ssize_t btmtkuart_receive_buf(struct serdev_device *serdev,
387-
const u8 *data, size_t count)
386+
static size_t btmtkuart_receive_buf(struct serdev_device *serdev,
387+
const u8 *data, size_t count)
388388
{
389389
struct btmtkuart_dev *bdev = serdev_device_get_drvdata(serdev);
390390

drivers/bluetooth/btnxpuart.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,8 +1285,8 @@ static const struct h4_recv_pkt nxp_recv_pkts[] = {
12851285
{ NXP_RECV_FW_REQ_V3, .recv = nxp_recv_fw_req_v3 },
12861286
};
12871287

1288-
static ssize_t btnxpuart_receive_buf(struct serdev_device *serdev,
1289-
const u8 *data, size_t count)
1288+
static size_t btnxpuart_receive_buf(struct serdev_device *serdev,
1289+
const u8 *data, size_t count)
12901290
{
12911291
struct btnxpuart_dev *nxpdev = serdev_device_get_drvdata(serdev);
12921292

drivers/bluetooth/hci_serdev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ static void hci_uart_write_wakeup(struct serdev_device *serdev)
271271
*
272272
* Return: number of processed bytes
273273
*/
274-
static ssize_t hci_uart_receive_buf(struct serdev_device *serdev,
275-
const u8 *data, size_t count)
274+
static size_t hci_uart_receive_buf(struct serdev_device *serdev,
275+
const u8 *data, size_t count)
276276
{
277277
struct hci_uart *hu = serdev_device_get_drvdata(serdev);
278278

drivers/gnss/serial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static const struct gnss_operations gnss_serial_gnss_ops = {
8080
.write_raw = gnss_serial_write_raw,
8181
};
8282

83-
static ssize_t gnss_serial_receive_buf(struct serdev_device *serdev,
83+
static size_t gnss_serial_receive_buf(struct serdev_device *serdev,
8484
const u8 *buf, size_t count)
8585
{
8686
struct gnss_serial *gserial = serdev_device_get_drvdata(serdev);

drivers/gnss/sirf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static const struct gnss_operations sirf_gnss_ops = {
160160
.write_raw = sirf_write_raw,
161161
};
162162

163-
static ssize_t sirf_receive_buf(struct serdev_device *serdev,
163+
static size_t sirf_receive_buf(struct serdev_device *serdev,
164164
const u8 *buf, size_t count)
165165
{
166166
struct sirf_data *data = serdev_device_get_drvdata(serdev);

0 commit comments

Comments
 (0)