Please update the subject. This patch does more than remove the sysfs file. "Move loopback support to TIOCM_LOOP"? Quoting Akash Asthana (2019-11-13 02:49:21) > Remove code from the driver that create and maintain loopback sysfs node. > Instead use the ioctl TIOCMSET with TIOCM_LOOP argument to set HW to > loopback mode. > > Signed-off-by: Akash Asthana <akashast@xxxxxxxxxxxxxx> > --- > Changes in V5: > - As per Greg's and Stephen's comment on v4 patch, removed loopback sysfs > file related code. > > drivers/tty/serial/qcom_geni_serial.c | 30 ++++-------------------------- > 1 file changed, 4 insertions(+), 26 deletions(-) > > diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c > index 56dad67..52f5ea2 100644 > --- a/drivers/tty/serial/qcom_geni_serial.c > +++ b/drivers/tty/serial/qcom_geni_serial.c > @@ -238,10 +214,14 @@ static void qcom_geni_serial_set_mctrl(struct uart_port *uport, > unsigned int mctrl) > { > u32 uart_manual_rfr = 0; > + struct qcom_geni_serial_port *port = to_dev_port(uport, uport); > > if (uart_console(uport)) > return; > > + if (mctrl & TIOCM_LOOP) > + port->loopback = MAX_LOOPBACK_CFG; How does this work? The loopback is supposed to be the max all the time and not match some qup number or something?