Skip to content

Commit

Permalink
Merge tag 'tty-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/gregkh/tty

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

  Lots of cleanups in here this cycle, and some driver updates. Short
  summary is:

   - Jiri's continued work to make the tty code and apis be a bit more
     sane with regards to modern kernel coding style and types

   - cpm_uart driver updates

   - n_gsm updates and fixes

   - meson driver updates

   - sc16is7xx driver updates

   - 8250 driver updates for different hardware types

   - qcom-geni driver fixes

   - tegra serial driver change

   - stm32 driver updates

   - synclink_gt driver cleanups

   - tty structure size reduction

  All of these have been in linux-next this week with no reported
  issues. The last bit of cleanups from Jiri and the tty structure size
  reduction came in last week, a bit late but as they were just style
  changes and size reductions, I figured they should get into this merge
  cycle so that others can work on top of them with no merge conflicts"

* tag 'tty-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (199 commits)
  tty: shrink the size of struct tty_struct by 40 bytes
  tty: n_tty: deduplicate copy code in n_tty_receive_buf_real_raw()
  tty: n_tty: extract ECHO_OP processing to a separate function
  tty: n_tty: unify counts to size_t
  tty: n_tty: use u8 for chars and flags
  tty: n_tty: simplify chars_in_buffer()
  tty: n_tty: remove unsigned char casts from character constants
  tty: n_tty: move newline handling to a separate function
  tty: n_tty: move canon handling to a separate function
  tty: n_tty: use MASK() for masking out size bits
  tty: n_tty: make n_tty_data::num_overrun unsigned
  tty: n_tty: use time_is_before_jiffies() in n_tty_receive_overrun()
  tty: n_tty: use 'num' for writes' counts
  tty: n_tty: use output character directly
  tty: n_tty: make flow of n_tty_receive_buf_common() a bool
  Revert "tty: serial: meson: Add a earlycon for the T7 SoC"
  Documentation: devices.txt: Fix minors for ttyCPM*
  Documentation: devices.txt: Remove ttySIOC*
  Documentation: devices.txt: Remove ttyIOC*
  serial: 8250_bcm7271: improve bcm7271 8250 port
  ...
  • Loading branch information
torvalds committed Sep 1, 2023
2 parents e925992 + ebf05c7 commit 8e1e495
Show file tree
Hide file tree
Showing 185 changed files with 2,106 additions and 2,175 deletions.
16 changes: 2 additions & 14 deletions Documentation/admin-guide/devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2691,18 +2691,9 @@
45 = /dev/ttyMM1 Marvell MPSC - port 1 (obsolete unused)
46 = /dev/ttyCPM0 PPC CPM (SCC or SMC) - port 0
...
49 = /dev/ttyCPM5 PPC CPM (SCC or SMC) - port 3
50 = /dev/ttyIOC0 Altix serial card
...
81 = /dev/ttyIOC31 Altix serial card
51 = /dev/ttyCPM5 PPC CPM (SCC or SMC) - port 5
82 = /dev/ttyVR0 NEC VR4100 series SIU
83 = /dev/ttyVR1 NEC VR4100 series DSIU
84 = /dev/ttyIOC84 Altix ioc4 serial card
...
115 = /dev/ttyIOC115 Altix ioc4 serial card
116 = /dev/ttySIOC0 Altix ioc3 serial card
...
147 = /dev/ttySIOC31 Altix ioc3 serial card
148 = /dev/ttyPSC0 PPC PSC - port 0
...
153 = /dev/ttyPSC5 PPC PSC - port 5
Expand Down Expand Up @@ -2761,10 +2752,7 @@
43 = /dev/ttycusmx2 Callout device for ttySMX2
46 = /dev/cucpm0 Callout device for ttyCPM0
...
49 = /dev/cucpm5 Callout device for ttyCPM5
50 = /dev/cuioc40 Callout device for ttyIOC40
...
81 = /dev/cuioc431 Callout device for ttyIOC431
51 = /dev/cucpm5 Callout device for ttyCPM5
82 = /dev/cuvr0 Callout device for ttyVR0
83 = /dev/cuvr1 Callout device for ttyVR1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ properties:
- amlogic,meson8b-uart
- amlogic,meson-gx-uart
- amlogic,meson-s4-uart
- amlogic,meson-a1-uart
- const: amlogic,meson-ao-uart
- description: Always-on power domain UART controller on G12A SoCs
items:
Expand All @@ -46,10 +47,15 @@ properties:
- amlogic,meson8b-uart
- amlogic,meson-gx-uart
- amlogic,meson-s4-uart
- amlogic,meson-a1-uart
- description: Everything-Else power domain UART controller on G12A SoCs
items:
- const: amlogic,meson-g12a-uart
- const: amlogic,meson-gx-uart
- description: UART controller on S4 compatible SoCs
items:
- const: amlogic,t7-uart
- const: amlogic,meson-s4-uart

reg:
maxItems: 1
Expand Down
6 changes: 5 additions & 1 deletion Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ properties:
- fsl,imxrt1050-lpuart
- items:
- enum:
- fsl,imx93-lpuart
- fsl,imx8ulp-lpuart
- const: fsl,imx7ulp-lpuart
- items:
- enum:
- fsl,imx93-lpuart
- const: fsl,imx8ulp-lpuart
- const: fsl,imx7ulp-lpuart
- items:
- enum:
- fsl,imx8qm-lpuart
Expand Down
46 changes: 46 additions & 0 deletions Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Optional properties:
1 = active low.
- irda-mode-ports: An array that lists the indices of the port that
should operate in IrDA mode.
- nxp,modem-control-line-ports: An array that lists the indices of the port that
should have shared GPIO lines configured as
modem control lines.

Example:
sc16is750: sc16is750@51 {
Expand All @@ -35,6 +38,26 @@ Example:
#gpio-cells = <2>;
};

sc16is752: sc16is752@53 {
compatible = "nxp,sc16is752";
reg = <0x53>;
clocks = <&clk20m>;
interrupt-parent = <&gpio3>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
nxp,modem-control-line-ports = <1>; /* Port 1 as modem control lines */
gpio-controller; /* Port 0 as GPIOs */
#gpio-cells = <2>;
};

sc16is752: sc16is752@54 {
compatible = "nxp,sc16is752";
reg = <0x54>;
clocks = <&clk20m>;
interrupt-parent = <&gpio3>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
nxp,modem-control-line-ports = <0 1>; /* Ports 0 and 1 as modem control lines */
};

* spi as bus

Required properties:
Expand All @@ -59,6 +82,9 @@ Optional properties:
1 = active low.
- irda-mode-ports: An array that lists the indices of the port that
should operate in IrDA mode.
- nxp,modem-control-line-ports: An array that lists the indices of the port that
should have shared GPIO lines configured as
modem control lines.

Example:
sc16is750: sc16is750@0 {
Expand All @@ -70,3 +96,23 @@ Example:
gpio-controller;
#gpio-cells = <2>;
};

sc16is752: sc16is752@1 {
compatible = "nxp,sc16is752";
reg = <1>;
clocks = <&clk20m>;
interrupt-parent = <&gpio3>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
nxp,modem-control-line-ports = <1>; /* Port 1 as modem control lines */
gpio-controller; /* Port 0 as GPIOs */
#gpio-cells = <2>;
};

sc16is752: sc16is752@2 {
compatible = "nxp,sc16is752";
reg = <2>;
clocks = <&clk20m>;
interrupt-parent = <&gpio3>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
nxp,modem-control-line-ports = <0 1>; /* Ports 0 and 1 as modem control lines */
};
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ properties:
required:
- compatible
- reg
- interrupts

unevaluatedProperties: false

Expand Down
7 changes: 5 additions & 2 deletions Documentation/driver-api/tty/tty_buffer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ Flip Buffer Management
======================

.. kernel-doc:: drivers/tty/tty_buffer.c
:identifiers: tty_prepare_flip_string tty_insert_flip_string_fixed_flag
tty_insert_flip_string_flags __tty_insert_flip_char
:identifiers: tty_prepare_flip_string
tty_flip_buffer_push tty_ldisc_receive_buf

.. kernel-doc:: include/linux/tty_flip.h
:identifiers: tty_insert_flip_string_fixed_flag tty_insert_flip_string_flags
tty_insert_flip_char

----

Other Functions
Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ register_cpus(void)
arch_initcall(register_cpus);

#ifdef CONFIG_MAGIC_SYSRQ
static void sysrq_reboot_handler(int unused)
static void sysrq_reboot_handler(u8 unused)
{
machine_halt();
}
Expand Down
5 changes: 2 additions & 3 deletions arch/alpha/kernel/srmcons.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ srmcons_do_write(struct tty_port *port, const char *buf, int count)
return count;
}

static int
srmcons_write(struct tty_struct *tty,
const unsigned char *buf, int count)
static ssize_t
srmcons_write(struct tty_struct *tty, const u8 *buf, size_t count)
{
unsigned long flags;

Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/boot/dts/amlogic/meson-a1.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
};

uart_AO: serial@1c00 {
compatible = "amlogic,meson-gx-uart",
compatible = "amlogic,meson-a1-uart",
"amlogic,meson-ao-uart";
reg = <0x0 0x1c00 0x0 0x18>;
interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;
Expand All @@ -118,7 +118,7 @@
};

uart_AO_B: serial@2000 {
compatible = "amlogic,meson-gx-uart",
compatible = "amlogic,meson-a1-uart",
"amlogic,meson-ao-uart";
reg = <0x0 0x2000 0x0 0x18>;
interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
Expand Down
2 changes: 1 addition & 1 deletion arch/loongarch/kernel/sysrq.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static void sysrq_tlbdump_othercpus(struct work_struct *dummy)
static DECLARE_WORK(sysrq_tlbdump, sysrq_tlbdump_othercpus);
#endif

static void sysrq_handle_tlbdump(int key)
static void sysrq_handle_tlbdump(u8 key)
{
sysrq_tlbdump_single(NULL);
#ifdef CONFIG_SMP
Expand Down
8 changes: 4 additions & 4 deletions arch/m68k/emu/nfcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ static void nfcon_tty_close(struct tty_struct *tty, struct file *filp)
{
}

static int nfcon_tty_write(struct tty_struct *tty, const unsigned char *buf,
int count)
static ssize_t nfcon_tty_write(struct tty_struct *tty, const u8 *buf,
size_t count)
{
nfputs(buf, count);
return count;
}

static int nfcon_tty_put_char(struct tty_struct *tty, unsigned char ch)
static int nfcon_tty_put_char(struct tty_struct *tty, u8 ch)
{
char temp[2] = { ch, 0 };
u8 temp[2] = { ch, 0 };

nf_call(stderr_id, virt_to_phys(temp));
return 1;
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/sysrq.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static void sysrq_tlbdump_othercpus(struct work_struct *dummy)
static DECLARE_WORK(sysrq_tlbdump, sysrq_tlbdump_othercpus);
#endif

static void sysrq_handle_tlbdump(int key)
static void sysrq_handle_tlbdump(u8 key)
{
sysrq_tlbdump_single(NULL);
#ifdef CONFIG_SMP
Expand Down
27 changes: 0 additions & 27 deletions arch/powerpc/include/asm/fs_pd.h

This file was deleted.

1 change: 0 additions & 1 deletion arch/powerpc/platforms/8xx/mpc885ads_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <linux/device.h>
#include <linux/delay.h>

#include <linux/fs_uart_pd.h>
#include <linux/fsl_devices.h>
#include <linux/mii.h>
#include <linux/of_address.h>
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/platforms/8xx/tqm8xx_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <linux/device.h>
#include <linux/delay.h>

#include <linux/fs_uart_pd.h>
#include <linux/fsl_devices.h>
#include <linux/mii.h>
#include <linux/of_fdt.h>
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/sysdev/fsl_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <linux/phy.h>
#include <linux/spi/spi.h>
#include <linux/fsl_devices.h>
#include <linux/fs_uart_pd.h>
#include <linux/reboot.h>

#include <linux/atomic.h>
Expand All @@ -35,7 +34,6 @@
#include <asm/cpm2.h>
#include <asm/fsl_hcalls.h> /* For the Freescale hypervisor */

extern void init_smc_ioports(struct fs_uart_platform_info*);
static phys_addr_t immrbase = -1;

phys_addr_t get_immrbase(void)
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -3988,7 +3988,7 @@ static void xmon_init(int enable)
}

#ifdef CONFIG_MAGIC_SYSRQ
static void sysrq_handle_xmon(int key)
static void sysrq_handle_xmon(u8 key)
{
if (xmon_is_locked_down()) {
clear_all_bpt();
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/include/asm/vio.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ struct vio_dring_state {
struct ldc_trans_cookie cookies[VIO_MAX_RING_COOKIES];
};

#define VIO_TAG_SIZE ((int)sizeof(struct vio_msg_tag))
#define VIO_TAG_SIZE (sizeof(struct vio_msg_tag))
#define VIO_VCC_MTU_SIZE (LDC_PACKET_SIZE - VIO_TAG_SIZE)

struct vio_vcc {
Expand Down
4 changes: 2 additions & 2 deletions arch/sparc/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void arch_trigger_cpumask_backtrace(const cpumask_t *mask, int exclude_cpu)

#ifdef CONFIG_MAGIC_SYSRQ

static void sysrq_handle_globreg(int key)
static void sysrq_handle_globreg(u8 key)
{
trigger_all_cpu_backtrace();
}
Expand Down Expand Up @@ -370,7 +370,7 @@ static void pmu_snapshot_all_cpus(void)
spin_unlock_irqrestore(&global_cpu_snapshot_lock, flags);
}

static void sysrq_handle_globpmu(int key)
static void sysrq_handle_globpmu(u8 key)
{
pmu_snapshot_all_cpus();
}
Expand Down
2 changes: 1 addition & 1 deletion arch/um/drivers/line.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void line_flush_chars(struct tty_struct *tty)
line_flush_buffer(tty);
}

int line_write(struct tty_struct *tty, const unsigned char *buf, int len)
ssize_t line_write(struct tty_struct *tty, const u8 *buf, size_t len)
{
struct line *line = tty->driver_data;
unsigned long flags;
Expand Down
3 changes: 1 addition & 2 deletions arch/um/drivers/line.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ extern void line_cleanup(struct tty_struct *tty);
extern void line_hangup(struct tty_struct *tty);
extern int line_setup(char **conf, unsigned nlines, char **def,
char *init, char *name);
extern int line_write(struct tty_struct *tty, const unsigned char *buf,
int len);
extern ssize_t line_write(struct tty_struct *tty, const u8 *buf, size_t len);
extern unsigned int line_chars_in_buffer(struct tty_struct *tty);
extern void line_flush_buffer(struct tty_struct *tty);
extern void line_flush_chars(struct tty_struct *tty);
Expand Down
Loading

0 comments on commit 8e1e495

Please sign in to comment.