[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66fe1087-1a6d-1a96-a043-8013bfb6f2c1@st.com>
Date: Wed, 25 Mar 2020 12:36:30 +0100
From: Arnaud POULIQUEN <arnaud.pouliquen@...com>
To: Joe Perches <joe@...ches.com>, Ohad Ben-Cohen <ohad@...ery.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
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>
CC: 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 3/24/20 6:23 PM, Joe Perches wrote:
> On Tue, 2020-03-24 at 18:04 +0100, Arnaud Pouliquen wrote:
>> This driver exposes a standard TTY interface on top of the rpmsg
>> framework through a rpmsg service.
>>
>> This driver supports multi-instances, offering a /dev/ttyRPMSGx entry
>> per rpmsg endpoint.
>
> trivial notes:
>
>> diff --git a/Documentation/serial/tty_rpmsg.rst b/Documentation/serial/tty_rpmsg.rst
> []
>> +The rpmsg tty driver implements serial communication on the RPMsg bus to makes possible for user-space programs to send and receive rpmsg messages as a standard tty protocol.
>
> Very long text lines missing newlines?
>
> []
>> +To be compliant with this driver, the remote firmware must create its data end point associated with the "rpmsg-tty-raw" service.
> []
>> +To be compatible with this driver, the remote firmware must create or use its end point associated with "rpmsg-tty-ctrl" service, plus a second endpoint for the data flow.
>> +On Linux rpmsg_tty probes, the data endpoint address and the CTS (set to disable)
>
> []
>
>> diff --git a/drivers/tty/rpmsg_tty.c b/drivers/tty/rpmsg_tty.c
> []
>> +typedef void (*rpmsg_tty_rx_cb_t)(struct rpmsg_device *, void *, int, void *,
>> + u32);
>
> unused typedef?
yes i will clean it.
>
> []
>
>> +static int __init rpmsg_tty_init(void)
>> +{
> []
>> + err = tty_register_driver(rpmsg_tty_driver);
>> + if (err < 0) {
>> + pr_err("Couldn't install rpmsg tty driver: err %d\n", err);
>> + goto error_put;
>> + }
>
> Might use vsprintf extension %pe
>
> pr_err("Couldn't install rpmsg tty driver: %pe\n", ERR_PTR(err));
Seems not possible here as err is an integer value and not a pointer cast to an integer,
or I missed something?
Thanks for the review,
Arnaud
>
>> + err = register_rpmsg_driver(&rpmsg_tty_rpmsg_drv);
>> + if (err < 0) {
>> + pr_err("Couldn't register rpmsg tty driver: err %d\n", err);
>
> etc.
>
>
Powered by blists - more mailing lists