Linux-mediatek Archive on lore.kernel.org
 help / color / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: devicetree@vger.kernel.org, heikki.krogerus@linux.intel.com,
	david@lechnology.com, arnd@arndb.de,
	linux-serial@vger.kernel.org,
	Steven Liu <steven.liu@mediatek.com>,
	jan.kiszka@siemens.com, sean.wang@mediatek.com, hpeter@gmail.com,
	linux-kernel@vger.kernel.org, tthayer@opensource.altera.com,
	Ryder Lee <ryder.lee@mediatek.com>,
	robh+dt@kernel.org, linux-mediatek@lists.infradead.org,
	joel@jms.id.au, p.zabel@pengutronix.de, jslaby@suse.com,
	matthias.bgg@gmail.com, robert.jarzmik@free.fr,
	linux-arm-kernel@lists.infradead.org, vigneshr@ti.com
Subject: Re: [PATCH v4] tty: serial: don't do termios for BTIF
Date: Mon, 29 Jun 2020 10:40:51 +0200
Message-ID: <20200629084051.GA1234189@kroah.com> (raw)
In-Reply-To: <20200629082927.GA3703480@smile.fi.intel.com>

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 <sean.wang@mediatek.com>
> > > 
> > > 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

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

      reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 19:59 sean.wang
2020-06-27 14:12 ` Greg KH
2020-06-29  8:29   ` Andy Shevchenko
2020-06-29  8:40     ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200629084051.GA1234189@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=david@lechnology.com \
    --cc=devicetree@vger.kernel.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=hpeter@gmail.com \
    --cc=jan.kiszka@siemens.com \
    --cc=joel@jms.id.au \
    --cc=jslaby@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robert.jarzmik@free.fr \
    --cc=robh+dt@kernel.org \
    --cc=ryder.lee@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=steven.liu@mediatek.com \
    --cc=tthayer@opensource.altera.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-mediatek Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mediatek/0 linux-mediatek/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mediatek linux-mediatek/ https://lore.kernel.org/linux-mediatek \
		linux-mediatek@lists.infradead.org
	public-inbox-index linux-mediatek

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mediatek


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git