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

From: sean.wang
Date: Tue Jun 16 2020 - 23:51:16 EST


From: Sean Wang <sean.wang@xxxxxxxxxxxx>

>On Thu, Apr 23, 2020 at 02:02:08AM +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.
>
>Why does it matter? If the connection isn't exported to userspace, who would run those termios functions on the port?

The bluetooth driver would use BTIF device as a serdev.

The termios function would be called in kernelspace from ttyport_open and then
to tty_set_termios defined in drivers/tty/serdev/serdev-ttyport.c.

>
>thanks,
>
>greg k-h