mirror-linux/drivers/tty/serial
Hugo Villeneuve e43a7ae58d serial: sc16is7xx: fix regression with GPIO configuration
[ Upstream commit 0499942928 ]

Commit 679875d1d8 ("sc16is7xx: Separate GPIOs from modem control lines")
and commit 21144bab4f ("sc16is7xx: Handle modem status lines")
changed the function of the GPIOs pins to act as modem control
lines without any possibility of selecting GPIO function.

As a consequence, applications that depends on GPIO lines configured
by default as GPIO pins no longer work as expected.

Also, the change to select modem control lines function was done only
for channel A of dual UART variants (752/762). This was not documented
in the log message.

Allow to specify GPIO or modem control line function in the device
tree, and for each of the ports (A or B).

Do so by using the new device-tree property named
"nxp,modem-control-line-ports" (property added in separate patch).

When registering GPIO chip controller, mask-out GPIO pins declared as
modem control lines according to this new DT property.

Fixes: 679875d1d8 ("sc16is7xx: Separate GPIOs from modem control lines")
Fixes: 21144bab4f ("sc16is7xx: Handle modem status lines")
Cc: stable@vger.kernel.org
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Lech Perczak <lech.perczak@camlingroup.com>
Tested-by: Lech Perczak <lech.perczak@camlingroup.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230807214556.540627-5-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:43:05 +02:00
..
8250 serial: 8250: Fix oops for port->pm on uart_change_pm() 2023-08-23 17:52:38 +02:00
cpm_uart serial: cpm_uart: Fix a COMPILE_TEST dependency 2023-06-09 10:34:26 +02:00
jsm drivers: serial: jsm: fix some leaks in probe 2022-09-22 16:11:43 +02:00
21285.c TTY/Serial driver update for 6.1-rc1 2022-10-07 16:36:24 -07:00
Kconfig serial: cpm_uart: Fix a COMPILE_TEST dependency 2023-06-09 10:34:26 +02:00
Makefile serial: remove VR41XX serial driver 2022-07-16 08:16:01 +02:00
altera_jtaguart.c tty: serial: do unlock on a common path in altera_jtaguart_console_putc() 2022-09-30 14:58:46 +02:00
altera_uart.c serial: altera_uart: fix locking in polling mode 2022-12-31 13:32:40 +01:00
amba-pl010.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
amba-pl011.c serial: amba-pl011: fix high priority character transmission in rs486 mode 2023-01-24 07:24:39 +01:00
apbuart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
apbuart.h
ar933x_uart.c serial: ar933x: Deassert Transmit Enable on ->rs485_config() 2022-09-22 16:43:05 +02:00
arc_uart.c serial: arc_uart: fix of_iomap leak in `arc_serial_probe` 2023-05-24 17:32:44 +01:00
atmel_serial.c serial: atmel: don't enable IRQs prematurely 2023-07-23 13:49:40 +02:00
atmel_serial.h tty: serial: atmel: Use FIELD_PREP/FIELD_GET 2022-09-22 16:32:25 +02:00
bcm63xx_uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
clps711x.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
digicolor-usart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
dz.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
dz.h
earlycon-arm-semihost.c
earlycon-riscv-sbi.c
earlycon.c tty: move from strlcpy with unused retval to strscpy 2022-08-30 14:21:59 +02:00
fsl_linflexuart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
fsl_lpuart.c tty: serial: fsl_lpuart: Clear the error flags by writing 1 for lpuart32 platforms 2023-08-23 17:52:31 +02:00
icom.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
imx.c tty: serial: imx: fix rs485 rx after tx 2023-07-23 13:49:41 +02:00
imx_earlycon.c
ip22zilog.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
ip22zilog.h
kgdb_nmi.c
kgdboc.c
lantiq.c serial: lantiq: add missing interrupt ack 2023-06-21 16:00:57 +02:00
liteuart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
lpc32xx_hs.c tty: serial: extract tx_ready() from __serial_lpc32xx_tx() 2022-09-22 16:14:08 +02:00
max310x.c serial: max310x: fix IO data corruption in batched operations 2023-05-11 23:03:01 +09:00
max3100.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
mcf.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
men_z135_uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
meson_uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
milbeaut_usio.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
mpc52xx_uart.c tty: serial: switch mpc52xx_uart_int_{r,t}x_chars() to bool 2022-09-22 16:14:08 +02:00
mps2-uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
msm_serial.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
mux.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
mvebu-uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
mxs-auart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
omap-serial.c tty: serial: extract serial_omap_put_char() from transmit_chars() 2022-09-22 16:14:08 +02:00
owl-uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
pch_uart.c tty: pcn_uart: fix memory leak with using debugfs_lookup() 2023-03-11 13:55:39 +01:00
pic32_uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
pmac_zilog.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
pmac_zilog.h
pxa.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
qcom_geni_serial.c serial: qcom-geni: fix opp vote on shutdown 2023-09-06 21:27:01 +01:00
rda-uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
rp2.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sa1100.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
samsung_tty.c tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() when iterating clk 2023-07-23 13:49:41 +02:00
sb1250-duart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sc16is7xx.c serial: sc16is7xx: fix regression with GPIO configuration 2023-09-13 09:43:05 +02:00
sccnxp.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
serial-tegra.c serial: tegra: handle clk prepare error in tegra_uart_hw_init() 2023-09-13 09:42:56 +02:00
serial_core.c serial: core: lock port for start_rx() in uart_resume_port() 2023-07-19 16:21:53 +02:00
serial_mctrl_gpio.c Documentation: serial: move GPIO kernel-doc to the functions 2022-07-28 10:37:42 +02:00
serial_mctrl_gpio.h
serial_txx9.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sh-sci.c tty: serial: sh-sci: Fix Rx on RZ/G2L SCI 2023-04-13 16:55:28 +02:00
sh-sci.h
sifive.c serial: sifive: Fix sifive_serial_console_setup() section 2023-08-03 10:24:08 +02:00
sprd_serial.c serial: sprd: Fix DMA buffer leak issue 2023-09-13 09:42:52 +02:00
st-asc.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
stm32-usart.c serial: stm32: Ignore return value of uart_remove_one_port() in .remove() 2023-08-23 17:52:23 +02:00
stm32-usart.h serial: stm32: make info structs static to avoid sparse warnings 2022-07-28 10:35:23 +02:00
suncore.c
sunhv.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sunplus-uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sunsab.c serial: sunsab: Fix error handling in sunsab_init() 2022-12-31 13:32:40 +01:00
sunsab.h
sunsu.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sunzilog.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sunzilog.h
tegra-tcu.c Merge 7e2cd21e02 ("Merge tag 'tty-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty") into tty-next 2022-09-25 09:22:13 +02:00
timbuart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
timbuart.h
uartlite.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
ucc_uart.c serial: ucc_uart: Remove custom frame size calculation 2022-08-30 14:28:33 +02:00
vt8500_serial.c tty: serial: move and cleanup vt8500_tx_empty() 2022-09-22 16:14:07 +02:00
xilinx_uartps.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
zs.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
zs.h