Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp5257521ybb; Tue, 24 Mar 2020 13:52:45 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtmDI+EvPJbxCAPocgnqbkPwHF0HzzfOvyt1Ntoy5EX+SEJ0IQ2FmU66x97z5BU8/vLNLRd X-Received: by 2002:a9d:2004:: with SMTP id n4mr6445ota.74.1585083165682; Tue, 24 Mar 2020 13:52:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585083165; cv=none; d=google.com; s=arc-20160816; b=OiDFdHMgFMCMgG8E5ycJYkXnQsxdngG1erufNaaUfslGK9PwQjF3+R7oKF0rUkksul XMP2dy8k6OBJQoxwwO4mnCzK/SXdx/96uMvRK318BIbsOmPjuUGSGEKO8UXoL6Uvce2w JpD6kg/3Fld8V4WC7KTNt91GtzdvOY1p8cGBCjPJfHn9X0Fx0sLns5+eGTeNljrBLmPB h4mlpI2w75phsjg/ZmxXUalkKAvIpNRIhe/v11SEWCi08EDHwD3NAQlPlENU+bFJB+hS MAy5nLiFZgD6u7LJn3KDm0BaNAs6QjNmID8DL/lW+1ePnJ798oey78CtlXvv8zYD/nfx HESg== 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=RUH2GpKiZzcp+HWMY8/0tgoroE59nDoZuKy+VZo5HoQ=; b=tnYM56xtWNlYzfDMV4Q8DlYBMIY4sL5PWbryesHFkc7KWPhAYRQRx5GJnFfQ9LDBUy sEen3uaqSu5mq7MgMM7D/AoZnTK/XvhBQ8PHTEMB6uLRwXgWfIzaGXTU/fm2tRxTfkG7 ipDyM06GjLxKopWZPIO/Ro1HPaSnDhycfUxmPgLX9MkwJx5C0QgliyYAH5oQ0RYq3puw lK9zyNPuGn4bJY89TkyuWQe/qrI0apChCio+8HDlgKLj3UXd1qpAC3tJDvJnmeR9P7em p4P4R9Muj6EWw9evp0DorNJ5eeM+7V7HljuhLAF3Lt2G4NlMHwyIPn3oqvPV7FoJj8JI maJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ntboDvPp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n21si4336154otf.130.2020.03.24.13.52.30; Tue, 24 Mar 2020 13:52:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ntboDvPp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727781AbgCXUwP (ORCPT + 99 others); Tue, 24 Mar 2020 16:52:15 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:34492 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727023AbgCXUwP (ORCPT ); Tue, 24 Mar 2020 16:52:15 -0400 Received: by mail-pl1-f196.google.com with SMTP id a23so7929262plm.1 for ; Tue, 24 Mar 2020 13:52:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RUH2GpKiZzcp+HWMY8/0tgoroE59nDoZuKy+VZo5HoQ=; b=ntboDvPpO4mkIqoOhoGXBG65LwzTrCrhDR8XrhgItSkYAvVx0nDaIFCBhgwlE8+b3B y6p8/oHwZoumQYYk3A1AzzxHVkXT6O6foFkaxu4imEmIvRAWv/oMpfPHGgbxrTvRWSJk gIFK1Am2GLRwaAk5axXIPgh23srMlz0n3DanoTyOa9GDaxu/vLb4pd80gJuGfXRZvFfN 9yYECe7ugpWAGzj2sy3/0p4O61zScSUI1p0bkfKRlTrUSt8hghGolfUp584p846q7sI+ TWvUS7SFV62KctatZgmzNHcZ4+uPfa12URZyyig2GjXYpWMhIgTHXJNzdoKULwuNqvOT xpMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=RUH2GpKiZzcp+HWMY8/0tgoroE59nDoZuKy+VZo5HoQ=; b=qugirZcyb47YDu7hcmPd+Bq4p3trwVAiDPMcXhe2x2hn4HWMayG1Y52Y3PojLizV8d BO3NdfHlXKn5pKULs5R0cFVZFiSaQ2bN5lG3i8zPyc4bzhW+Ym4xs9myIDv1+nJ9oDUL dxwNhnzdlI14eO1hDGRkVVcXLUqUij+NjGXqMDnwU2hvucEHxH0CDcPuOkcxMWSfPhC/ h5R8lzmNDXiziRn12N36q53FMXnfR0wtagepUtWWgVV5rzfCjEalF76+2r94G5GcWlw1 S3N+G02JBejqCKZGvUay+55/AY1PjPDiCV9aY0KbFWqgCAoKiRAFHtfyyd3aCee0i28K F6LQ== X-Gm-Message-State: ANhLgQ3f20joclf5UGhLk7gIwhZUaHnqVY+uyPf/Yl89/GZPIGlN5mbt oEkWrDvOCq3Ii6uRvpJ8kBTKFQ== X-Received: by 2002:a17:902:b281:: with SMTP id u1mr6218733plr.287.1585083133418; Tue, 24 Mar 2020 13:52:13 -0700 (PDT) Received: from minitux (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id z6sm16696078pfn.212.2020.03.24.13.52.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2020 13:52:12 -0700 (PDT) Date: Tue, 24 Mar 2020 13:52:10 -0700 From: Bjorn Andersson To: Arnaud Pouliquen Cc: Ohad Ben-Cohen , Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Mathieu Poirier , Suman Anna , Fabien DESSENNE , linux-stm32@st-md-mailman.stormreply.com, Alan Cox , xiang xiao Subject: Re: [PATCH v7 2/2] tty: add rpmsg driver Message-ID: <20200324205210.GE119913@minitux> References: <20200324170407.16470-1-arnaud.pouliquen@st.com> <20200324170407.16470-3-arnaud.pouliquen@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200324170407.16470-3-arnaud.pouliquen@st.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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