Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3076546ybt; Mon, 29 Jun 2020 14:42:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygRbuKcF5wgeTqxniVKTiQZq0Lkx2E8IN+Z/My8wFShBYzZevK4nMeDexFbE/7T3s++IzV X-Received: by 2002:aa7:d5cd:: with SMTP id d13mr20326700eds.370.1593466951915; Mon, 29 Jun 2020 14:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593466951; cv=none; d=google.com; s=arc-20160816; b=s0sSSmmWmquHGqCHdusk/mklcxtNAvo9RvUVzmztuh+ESrasfUtvlINhr1MYtN8hWr EdKRBl0ImrVZyQli5jcInh2O6f71OfHtX1CN1PqHnS7AdYlpGqen24Jeah4b3EqTnHuA g7D7VnFp9m8R8cjXwnuE5gCOkkFDyPfdHXnG0LWGAtOFKvxiX+bzd/bvqDnxfgJSa+qO rAPvDtHITD4jD77FDRm25gH0+nhT4xAqsWg7XEvDhFnxVeGqgxVhT4ZEv8xHHKed0vs/ s5JtFYZC2TxVbzVArLz4dyNqU6rU13oPBWfl5p9D5JXhd3g9ccHveEJq3hpKTGxDZfb4 PKhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Iz1uCBGFZHEAYD0btul4IZiN2sLDCUTt8jpVkhtZlsw=; b=LjgwWMd75Lan88PZq0aUeOW9woc3fqYMld3x/XX9RTWDo5n4P70cP931t124Uy1yEq HEPIcgPmM9vcwcLKHV/NAPQOJKaMi17RKZysWCy1AdiAtC/uDzh7DEEMIjhN6mhyYwrs chOzndP+HaD7ekeTq08UVRXhFaSkMitUOeqcjQczaCnDBiMeMlGrCIz86tEp1QeZEcV6 teBFosI6LsoUit3LEKlWmqActbVVwi8ApM21j0MyGj596OEQuVReY5SuxnpnvpDmtgF9 m8mhrUEgim3h7DK387Olf92kDRp2nzJjn0gXiW9f7Gg9CGo9O4CzuN5xx2JJEgT9H3ur EfOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VfCp9hE0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n26si523180ejz.133.2020.06.29.14.42.09; Mon, 29 Jun 2020 14:42:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VfCp9hE0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728166AbgF2Vlg (ORCPT + 99 others); Mon, 29 Jun 2020 17:41:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:60596 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbgF2SkR (ORCPT ); Mon, 29 Jun 2020 14:40:17 -0400 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 9501723370; Mon, 29 Jun 2020 08:41:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593420062; bh=NgETdEp/TPGsMKNJQFJucR9ZSygTH08g48sTzqUJy8M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VfCp9hE0U1V55QP8CtGkrKq/7ClTTCkOVeDpojaZzjd7aUXx+6pITg+YyxFaYu4jr naHIJq0reLlZHSS6rTDqZoD6oWcAgnDmap4zDCam+du0CHBSo+I67WBnoXL2IzwO6f 66sWli0Vhn6A4ZyHu6XwMOh6ciaE6hDAN4crXajo= Date: Mon, 29 Jun 2020 10:40:51 +0200 From: Greg KH To: Andy Shevchenko Cc: sean.wang@mediatek.com, robh+dt@kernel.org, jslaby@suse.com, robert.jarzmik@free.fr, arnd@arndb.de, p.zabel@pengutronix.de, joel@jms.id.au, david@lechnology.com, jan.kiszka@siemens.com, heikki.krogerus@linux.intel.com, hpeter@gmail.com, vigneshr@ti.com, matthias.bgg@gmail.com, tthayer@opensource.altera.com, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Steven Liu , Ryder Lee Subject: Re: [PATCH v4] tty: serial: don't do termios for BTIF Message-ID: <20200629084051.GA1234189@kroah.com> References: <78efa2b1e2599deff4d838b05b4054ec5ac2976a.1592595601.git.sean.wang@mediatek.com> <20200627141222.GC1901451@kroah.com> <20200629082927.GA3703480@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200629082927.GA3703480@smile.fi.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 29, 2020 at 11:29:27AM +0300, Andy Shevchenko wrote: > On Sat, Jun 27, 2020 at 04:12:22PM +0200, Greg KH wrote: > > 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. > > > > +#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... > > For quirks we have a separate field in struct uart_port. Perhaps that can be used? That would be much nicer, if possible. thanks, greg k-h