Re: [PATCH v2] tty: serial: don't do termios for BTIF

From: Andy Shevchenko
Date: Mon Apr 20 2020 - 06:46:30 EST


On Mon, Apr 20, 2020 at 10:06:38AM +0800, sean.wang@xxxxxxxxxxxx wrote:
> From: Sean Wang <sean.wang@xxxxxxxxxxxx>
>
> Bluetooth Interface (BTIF) is designed dedicatedly for MediaTek SOC with
> BT in order to be instead of the UART interface between BT module and Host
> CPU, and not exported to user space to access.
>
> As the UART design, BTIF will be an APB slave and can transmit or receive
> data by MCU access, but doesn't provide termios function like baudrate and
> flow control setup.
>
> Even LCR on offset 0xC that is just a FAKELCR
> a. If FAKELCR[7] is equaled to 1, RBR(0x00), THR(0x00), IER(0x04)
> will not be readable/writable.
>
> b. If FAKELCR is equaled to 0xBF, RBR(0x00), THR(0x00), IER(0x04),
> IIR(0x08), and LSR(0x14) will not be readable/writable.
>
> So adding a new capability 'UART_CAP_NMOD' for the unusual unsupported
> case.

...

> +#define UART_CAP_NMOD (1 << 18) /* UART doesn't do termios */

I would rather spell it as NTIO or NO_TIO (as TIO is a well established prefix
for termios IOCTLs).


--
With Best Regards,
Andy Shevchenko