On Mon, Nov 17, 2025 at 11:48:16PM +0530, Ayaan Mirza Baig wrote:
The Greybus UART protocol supports only 8 data bits, no parity, one stop bit, and no hardware flow control.
Where did you get that from? Did you even look at the code you are changing?
Mask out unsupported termios flags before applying settings and force the supported configuration. This removes the old FIXME and aligns the driver with TTY subsystem expectations.
Please just leave the FIXMEs in place since you clearly do no understand what you are doing.
Signed-off-by: Ayaan Mirza Baig ayaanmirzabaig85@gmail.com
drivers/staging/greybus/uart.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c index 10df5c37c83e..cc7337bf5088 100644 --- a/drivers/staging/greybus/uart.c +++ b/drivers/staging/greybus/uart.c @@ -495,8 +495,14 @@ static void gb_tty_set_termios(struct tty_struct *tty, newline.data_bits = tty_get_char_size(termios->c_cflag);
- /* FIXME: needs to clear unsupported bits in the termios */
- gb_tty->clocal = ((termios->c_cflag & CLOCAL) != 0);
- /* Mask out unsupported termios flags for Greybus UART */
- termios->c_cflag &= ~(CSIZE | CSTOPB | PARENB | PARODD |
CRTSCTS | CMSPAR | CBAUD | CBAUDEX);- termios->c_cflag |= CS8; /* Force 8 data bits */
- termios->c_cflag &= ~PARENB; /* No parity */
- termios->c_cflag &= ~CSTOPB; /* One stop bit */
- gb_tty->clocal = (termios->c_cflag & CLOCAL);
Johan