mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
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().
...
This commit is contained in:
@@ -55,6 +55,7 @@ required:
|
||||
|
||||
allOf:
|
||||
- $ref: serial.yaml#
|
||||
- $ref: rs485.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
|
||||
@@ -30,6 +30,7 @@ properties:
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx93-lpuart
|
||||
- fsl,imx95-lpuart
|
||||
- const: fsl,imx8ulp-lpuart
|
||||
- const: fsl,imx7ulp-lpuart
|
||||
- items:
|
||||
|
||||
@@ -59,6 +59,7 @@ properties:
|
||||
- renesas,hscif-r8a779a0 # R-Car V3U
|
||||
- renesas,hscif-r8a779f0 # R-Car S4-8
|
||||
- renesas,hscif-r8a779g0 # R-Car V4H
|
||||
- renesas,hscif-r8a779h0 # R-Car V4M
|
||||
- const: renesas,rcar-gen4-hscif # R-Car Gen4
|
||||
- const: renesas,hscif # generic HSCIF compatible UART
|
||||
|
||||
|
||||
@@ -143,6 +143,8 @@ allOf:
|
||||
then:
|
||||
required:
|
||||
- samsung,uart-fifosize
|
||||
properties:
|
||||
reg-io-width: false
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ properties:
|
||||
TX FIFO threshold configuration (in bytes).
|
||||
|
||||
patternProperties:
|
||||
"^(bluetooth|bluetooth-gnss|gnss|gps|mcu)$":
|
||||
"^(bluetooth|bluetooth-gnss|gnss|gps|mcu|onewire)$":
|
||||
if:
|
||||
type: object
|
||||
then:
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/serial/st,asc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: STMicroelectronics STi SoCs Serial Port
|
||||
|
||||
maintainers:
|
||||
- Patrice Chotard <patrice.chotard@foss.st.com>
|
||||
|
||||
allOf:
|
||||
- $ref: serial.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: st,asc
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
st,hw-flow-ctrl:
|
||||
description: When set, enable hardware flow control.
|
||||
type: boolean
|
||||
|
||||
st,force-m1:
|
||||
description: When set, force asc to be in Mode-1. This is recommended for
|
||||
high bit rates above 19.2K.
|
||||
type: boolean
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/stih407-clks.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
serial@9830000 {
|
||||
compatible = "st,asc";
|
||||
reg = <0x9830000 0x2c>;
|
||||
interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk_s_c0_flexgen CLK_EXT2F_A9>;
|
||||
};
|
||||
...
|
||||
@@ -58,6 +58,9 @@ properties:
|
||||
|
||||
wakeup-source: true
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
rx-threshold:
|
||||
description:
|
||||
If value is set to 1, RX FIFO threshold is disabled.
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
*st-asc(Serial Port)
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "st,asc".
|
||||
- reg, reg-names, interrupts, interrupt-names : Standard way to define device
|
||||
resources with names. look in
|
||||
Documentation/devicetree/bindings/resource-names.txt
|
||||
|
||||
Optional properties:
|
||||
- st,hw-flow-ctrl bool flag to enable hardware flow control.
|
||||
- st,force-m1 bool flat to force asc to be in Mode-1 recommended
|
||||
for high bit rates (above 19.2K)
|
||||
Example:
|
||||
serial@fe440000{
|
||||
compatible = "st,asc";
|
||||
reg = <0xfe440000 0x2c>;
|
||||
interrupts = <0 209 0>;
|
||||
};
|
||||
@@ -0,0 +1,59 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/w1/w1-uart.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: UART 1-Wire Bus
|
||||
|
||||
maintainers:
|
||||
- Christoph Winklhofer <cj.winklhofer@gmail.com>
|
||||
|
||||
description: |
|
||||
UART 1-wire bus. Utilizes the UART interface via the Serial Device Bus
|
||||
to create the 1-Wire timing patterns.
|
||||
|
||||
The UART peripheral must support full-duplex and operate in open-drain
|
||||
mode. The timing patterns are generated by a specific combination of
|
||||
baud-rate and transmitted byte, which corresponds to a 1-Wire read bit,
|
||||
write bit or reset pulse.
|
||||
|
||||
The default baud-rate for reset and presence detection is 9600 and for
|
||||
a 1-Wire read or write operation 115200. In case the actual baud-rate
|
||||
is different from the requested one, the transmitted byte is adapted
|
||||
to generate the 1-Wire timing patterns.
|
||||
|
||||
https://www.analog.com/en/technical-articles/using-a-uart-to-implement-a-1wire-bus-master.html
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: w1-uart
|
||||
|
||||
reset-bps:
|
||||
default: 9600
|
||||
description:
|
||||
The baud rate for the 1-Wire reset and presence detect.
|
||||
|
||||
write-0-bps:
|
||||
default: 115200
|
||||
description:
|
||||
The baud rate for the 1-Wire write-0 cycle.
|
||||
|
||||
write-1-bps:
|
||||
default: 115200
|
||||
description:
|
||||
The baud rate for the 1-Wire write-1 and read cycle.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
additionalProperties:
|
||||
type: object
|
||||
|
||||
examples:
|
||||
- |
|
||||
serial {
|
||||
onewire {
|
||||
compatible = "w1-uart";
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
=======
|
||||
Console
|
||||
=======
|
||||
|
||||
.. contents:: :local:
|
||||
|
||||
Struct Console
|
||||
==============
|
||||
|
||||
.. kernel-doc:: include/linux/console.h
|
||||
:identifiers: console cons_flags
|
||||
|
||||
Internals
|
||||
---------
|
||||
|
||||
.. kernel-doc:: include/linux/console.h
|
||||
:identifiers: nbcon_state nbcon_prio nbcon_context nbcon_write_context
|
||||
|
||||
Struct Consw
|
||||
============
|
||||
|
||||
.. kernel-doc:: include/linux/console.h
|
||||
:identifiers: consw
|
||||
|
||||
Console functions
|
||||
=================
|
||||
|
||||
.. kernel-doc:: include/linux/console.h
|
||||
:identifiers: console_srcu_read_flags console_srcu_write_flags
|
||||
console_is_registered for_each_console_srcu for_each_console
|
||||
|
||||
.. kernel-doc:: drivers/tty/vt/selection.c
|
||||
:export:
|
||||
.. kernel-doc:: drivers/tty/vt/vt.c
|
||||
:export:
|
||||
|
||||
Internals
|
||||
---------
|
||||
|
||||
.. kernel-doc:: drivers/tty/vt/selection.c
|
||||
:internal:
|
||||
.. kernel-doc:: drivers/tty/vt/vt.c
|
||||
:internal:
|
||||
@@ -38,6 +38,7 @@ In-detail description of the named TTY structures is in separate documents:
|
||||
tty_buffer
|
||||
tty_ioctl
|
||||
tty_internals
|
||||
console
|
||||
|
||||
Writing TTY Driver
|
||||
==================
|
||||
|
||||
@@ -12,3 +12,4 @@
|
||||
mxc-w1
|
||||
omap-hdq
|
||||
w1-gpio
|
||||
w1-uart
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
=====================
|
||||
Kernel driver w1-uart
|
||||
=====================
|
||||
|
||||
Author: Christoph Winklhofer <cj.winklhofer@gmail.com>
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
UART 1-Wire bus driver. The driver utilizes the UART interface via the
|
||||
Serial Device Bus to create the 1-Wire timing patterns as described in
|
||||
the document `"Using a UART to Implement a 1-Wire Bus Master"`_.
|
||||
|
||||
.. _"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
|
||||
|
||||
In short, the UART peripheral must support full-duplex and operate in
|
||||
open-drain mode. The timing patterns are generated by a specific
|
||||
combination of baud-rate and transmitted byte, which corresponds to a
|
||||
1-Wire read bit, write bit or reset pulse.
|
||||
|
||||
For instance the timing pattern for a 1-Wire reset and presence detect uses
|
||||
the baud-rate 9600, i.e. 104.2 us per bit. The transmitted byte 0xf0 over
|
||||
UART (least significant bit first, start-bit low) sets the reset low time
|
||||
for 1-Wire to 521 us. A present 1-Wire device changes the received byte by
|
||||
pulling the line low, which is used by the driver to evaluate the result of
|
||||
the 1-Wire operation.
|
||||
|
||||
Similar for a 1-Wire read bit or write bit, which uses the baud-rate
|
||||
115200, i.e. 8.7 us per bit. The transmitted byte 0x80 is used for a
|
||||
Write-0 operation (low time 69.6us) and the byte 0xff for Read-0, Read-1
|
||||
and Write-1 (low time 8.7us).
|
||||
|
||||
The default baud-rate for reset and presence detection is 9600 and for
|
||||
a 1-Wire read or write operation 115200. In case the actual baud-rate
|
||||
is different from the requested one, the transmitted byte is adapted
|
||||
to generate the 1-Wire timing patterns.
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
Specify the UART 1-wire bus in the device tree by adding the single child
|
||||
onewire to the serial node (e.g. uart0). For example:
|
||||
::
|
||||
|
||||
@uart0 {
|
||||
...
|
||||
onewire {
|
||||
compatible = "w1-uart";
|
||||
};
|
||||
};
|
||||
@@ -846,6 +846,6 @@ static void amiga_get_hardware_list(struct seq_file *m)
|
||||
* The Amiga keyboard driver needs key_maps, but we cannot export it in
|
||||
* drivers/char/defkeymap.c, as it is autogenerated
|
||||
*/
|
||||
#ifdef CONFIG_HW_CONSOLE
|
||||
#ifdef CONFIG_VT
|
||||
EXPORT_SYMBOL_GPL(key_maps);
|
||||
#endif
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/serial_8250.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/console.h>
|
||||
@@ -67,9 +68,6 @@ static char *hp300_models[] __initdata = {
|
||||
static char hp300_model_name[13] = "HP9000/";
|
||||
|
||||
extern void hp300_reset(void);
|
||||
#ifdef CONFIG_SERIAL_8250_CONSOLE
|
||||
extern int hp300_setup_serial_console(void) __init;
|
||||
#endif
|
||||
|
||||
int __init hp300_parse_bootinfo(const struct bi_record *record)
|
||||
{
|
||||
@@ -263,7 +261,5 @@ void __init config_hp300(void)
|
||||
} else {
|
||||
panic("Unknown HP9000 Model");
|
||||
}
|
||||
#ifdef CONFIG_SERIAL_8250_CONSOLE
|
||||
hp300_setup_serial_console();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -383,8 +383,8 @@ static void btmtkuart_recv(struct hci_dev *hdev, const u8 *data, size_t count)
|
||||
}
|
||||
}
|
||||
|
||||
static ssize_t btmtkuart_receive_buf(struct serdev_device *serdev,
|
||||
const u8 *data, size_t count)
|
||||
static size_t btmtkuart_receive_buf(struct serdev_device *serdev,
|
||||
const u8 *data, size_t count)
|
||||
{
|
||||
struct btmtkuart_dev *bdev = serdev_device_get_drvdata(serdev);
|
||||
|
||||
|
||||
@@ -1285,8 +1285,8 @@ static const struct h4_recv_pkt nxp_recv_pkts[] = {
|
||||
{ NXP_RECV_FW_REQ_V3, .recv = nxp_recv_fw_req_v3 },
|
||||
};
|
||||
|
||||
static ssize_t btnxpuart_receive_buf(struct serdev_device *serdev,
|
||||
const u8 *data, size_t count)
|
||||
static size_t btnxpuart_receive_buf(struct serdev_device *serdev,
|
||||
const u8 *data, size_t count)
|
||||
{
|
||||
struct btnxpuart_dev *nxpdev = serdev_device_get_drvdata(serdev);
|
||||
|
||||
|
||||
@@ -271,8 +271,8 @@ static void hci_uart_write_wakeup(struct serdev_device *serdev)
|
||||
*
|
||||
* Return: number of processed bytes
|
||||
*/
|
||||
static ssize_t hci_uart_receive_buf(struct serdev_device *serdev,
|
||||
const u8 *data, size_t count)
|
||||
static size_t hci_uart_receive_buf(struct serdev_device *serdev,
|
||||
const u8 *data, size_t count)
|
||||
{
|
||||
struct hci_uart *hu = serdev_device_get_drvdata(serdev);
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ static const struct gnss_operations gnss_serial_gnss_ops = {
|
||||
.write_raw = gnss_serial_write_raw,
|
||||
};
|
||||
|
||||
static ssize_t gnss_serial_receive_buf(struct serdev_device *serdev,
|
||||
static size_t gnss_serial_receive_buf(struct serdev_device *serdev,
|
||||
const u8 *buf, size_t count)
|
||||
{
|
||||
struct gnss_serial *gserial = serdev_device_get_drvdata(serdev);
|
||||
|
||||
+1
-1
@@ -160,7 +160,7 @@ static const struct gnss_operations sirf_gnss_ops = {
|
||||
.write_raw = sirf_write_raw,
|
||||
};
|
||||
|
||||
static ssize_t sirf_receive_buf(struct serdev_device *serdev,
|
||||
static size_t sirf_receive_buf(struct serdev_device *serdev,
|
||||
const u8 *buf, size_t count)
|
||||
{
|
||||
struct sirf_data *data = serdev_device_get_drvdata(serdev);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user