Re: [PATCH] serial: fsl_lpuart: add support for GPIO-controlled modem lines

From: João Loureiro

Date: Wed Sep 23 2026 - 16:57:06 EST


On Wed, Sep 23, 2026 at 02:53PM +0200, Greg Kroah-Hartman wrote:
> On Wed, Aug 19, 2026 at 04:44:53PM +0200, João Loureiro wrote:
> > --- a/drivers/tty/serial/Kconfig
> > +++ b/drivers/tty/serial/Kconfig
> > @@ -1301,6 +1301,7 @@ config SERIAL_FSL_LPUART
> > tristate "Freescale lpuart serial port support"
> > depends on HAS_DMA
> > select SERIAL_CORE
> > + select SERIAL_MCTRL_GPIO if GPIOLIB
>
> Why not depends?

Because SERIAL_MCTRL_GPIO is a hidden symbol. It is declared as a bare
"tristate" with no prompt at the end of the same Kconfig file, so it can
only ever be enabled by a select. With "depends on SERIAL_MCTRL_GPIO"
nothing could ever satisfy the dependency and SERIAL_FSL_LPUART would
become unselectable.

The dependency is also not a hard one. serial_mctrl_gpio.h provides
no-op static inlines for the !CONFIG_GPIOLIB case, so fsl_lpuart still
builds and behaves exactly as before when GPIOLIB is off; the GPIO modem
lines are an optional extra rather than a requirement. A depends would
silently drop LPUART from those configurations.

Finally, this is what every other user of the helpers does:
SERIAL_ATMEL, SERIAL_IMX, SERIAL_SH_SCI, SERIAL_STM32, SERIAL_MXS_AUART,
SERIAL_SA1100, SERIAL_CLPS711X and SERIAL_AR933X all spell it as
"select SERIAL_MCTRL_GPIO if GPIOLIB" in the same file, so this keeps
fsl_lpuart consistent with them.

Thanks,
João