[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200324205210.GE119913@minitux>
Date: Tue, 24 Mar 2020 13:52:10 -0700
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: Arnaud Pouliquen <arnaud.pouliquen@...com>
Cc: Ohad Ben-Cohen <ohad@...ery.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>, linux-kernel@...r.kernel.org,
linux-remoteproc@...r.kernel.org,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Suman Anna <s-anna@...com>,
Fabien DESSENNE <fabien.dessenne@...com>,
linux-stm32@...md-mailman.stormreply.com,
Alan Cox <gnomes@...rguk.ukuu.org.uk>,
xiang xiao <xiaoxiang781216@...il.com>
Subject: Re: [PATCH v7 2/2] tty: add rpmsg driver
On Tue 24 Mar 10:04 PDT 2020, Arnaud Pouliquen wrote:
[..]
> diff --git a/drivers/tty/Makefile b/drivers/tty/Makefile
> index 020b1cd9294f..c2465e7ebc2a 100644
> --- a/drivers/tty/Makefile
> +++ b/drivers/tty/Makefile
> @@ -34,5 +34,6 @@ obj-$(CONFIG_PPC_EPAPR_HV_BYTECHAN) += ehv_bytechan.o
> obj-$(CONFIG_GOLDFISH_TTY) += goldfish.o
> obj-$(CONFIG_MIPS_EJTAG_FDC_TTY) += mips_ejtag_fdc.o
> obj-$(CONFIG_VCC) += vcc.o
> +obj-$(CONFIG_RPMSG_TTY) += rpmsg_tty.o
>
> obj-y += ipwireless/
> diff --git a/drivers/tty/rpmsg_tty.c b/drivers/tty/rpmsg_tty.c
[..]
> +static struct rpmsg_device_id rpmsg_driver_tty_id_table[] = {
> + { .name = TTY_CH_NAME_RAW },
> + { .name = TTY_CH_NAME_WITH_CTS},
I still don't like the idea that the tty devices are tied to channels by
fixed names.
This makes the driver unusable for communicating with any firmware out
there that provides tty-like data over a channel with a different name -
such as modems with channels providing an AT command interface (they are
not named "rpmsg-tty-raw").
I also fail to see how you would distinguish ttys when the firmware
provides more than a single tty - e.g. say you have a modem-like device
that provides an AT command channel and a NMEA stream.
These are the reasons why drivers/rpmsg/rpmsg_char registers a "control
device", from which you can spawn new char devices. As I've said before,
I really think the same approach should be taken for ttys - perhaps by
just extending the rpmsg_char to allow it to create tty devices in
addition to the "packet based" char device?
Regards,
Bjorn
Powered by blists - more mailing lists