From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 895CBC433DF for ; Sat, 27 Jun 2020 14:15:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4792C21655 for ; Sat, 27 Jun 2020 14:15:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HutQpiLq"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="TfrrfsmE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4792C21655 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DnKOVzNTOQPccZOlHcPfMbvKJpAMd0HE63Px/duR9I8=; b=HutQpiLqoLw/ndqSts9a26TR5 td/DiRlz974FYFT0BkOlYV5I/Fts+5SqCN8YBhRq/caNPziKP8uosescecAC7I93hSXIkpWOmY/Og iJkniYYJgnAmuqL9dCLcvIe+MPx6sLTkHr5Z7SsHnB/D8B4nq0LHm3O554ibvUBj/DntswBTuqc84 PQiV7nGe/S5qHd8Tj5JnMFezFRzyiOUaq4Jqjgi7p/ddxVrpvzHk8AmR3CLQgnLHwkkZa5k982av1 6BVozv8gEJ3rrYEyWDCiLVjK9FN439wld7rZtcxNBmyqUl1PMQ6enwuKIPNVTTNjstmWi/OVKbX8e UpkINgLBg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpBZJ-0003jM-Va; Sat, 27 Jun 2020 14:12:34 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpBZG-0003j8-HY; Sat, 27 Jun 2020 14:12:31 +0000 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AFB4C2184D; Sat, 27 Jun 2020 14:12:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593267149; bh=Mm9Jr0Y6Toy3xKZiWCZpBQOjWvs88DP6/BkXW7NSloI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TfrrfsmELqDgVdyohdtQg5RGnq/X72CkFtYXD+vVAHqE8bU22zy+qL2STz3ewIsSp a82+ne6RpaLkVeJ5rbGMc/Yhr/6tyXaN6oAKecHhJLWOK+X4sw/UL9jgy/NSwDNSEn EEzmq/TNa+IF7b03gev789SKgOHxnvk12u9q00r8= Date: Sat, 27 Jun 2020 16:12:22 +0200 From: Greg KH To: sean.wang@mediatek.com Subject: Re: [PATCH v4] tty: serial: don't do termios for BTIF Message-ID: <20200627141222.GC1901451@kroah.com> References: <78efa2b1e2599deff4d838b05b4054ec5ac2976a.1592595601.git.sean.wang@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <78efa2b1e2599deff4d838b05b4054ec5ac2976a.1592595601.git.sean.wang@mediatek.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, heikki.krogerus@linux.intel.com, david@lechnology.com, arnd@arndb.de, linux-serial@vger.kernel.org, Steven Liu , jan.kiszka@siemens.com, hpeter@gmail.com, linux-kernel@vger.kernel.org, tthayer@opensource.altera.com, Ryder Lee , robh+dt@kernel.org, linux-mediatek@lists.infradead.org, joel@jms.id.au, p.zabel@pengutronix.de, jslaby@suse.com, matthias.bgg@gmail.com, andriy.shevchenko@linux.intel.com, robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org, vigneshr@ti.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Jun 20, 2020 at 03:59:14AM +0800, sean.wang@mediatek.com wrote: > From: Sean Wang > > 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_NTIO' for the unusual unsupported > case. > > The bluetooth driver would use BTIF device as a serdev. So the termios > still function would be called in kernelspace from ttyport_open in > drivers/tty/serdev/serdev-ttyprt.c. > > Fixes: 1c16ae65e250 ("serial: 8250: of: Add new port type for MediaTek BTIF controller on MT7622/23 SoC") > Cc: Steven Liu > Signed-off-by: Sean Wang > Signed-off-by: Ryder Lee > > -- > v1->v2: > no change on termios->c_cflag and refine commit message > > v2->v3: > change the naming from NMOD to NTIO as TIO is a well established prefix > for termios IOCTLs. > > v3->v4: > 1. remove appropriate tag > 2. add the explanation why the termios is required even when the connection > isn't exported to userspace. > --- > drivers/tty/serial/8250/8250.h | 1 + > drivers/tty/serial/8250/8250_port.c | 5 ++++- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h > index 52bb21205bb6..0d9d3bfe48af 100644 > --- a/drivers/tty/serial/8250/8250.h > +++ b/drivers/tty/serial/8250/8250.h > @@ -82,6 +82,7 @@ struct serial8250_config { > #define UART_CAP_MINI (1 << 17) /* Mini UART on BCM283X family lacks: > * STOP PARITY EPAR SPAR WLEN5 WLEN6 > */ > +#define UART_CAP_NTIO (1 << 18) /* UART doesn't do termios */ Naming is hard. I will never remember what "NTIO" is, how about we make it explicit: define UART_CAP_IGNORE_TERMIOS And the _CAP_ name is getting out of hand, this isn't a "capability", it's a "quirk for this port" but that's a battle to worry about later... thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel