All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Chris Healy <cphealy@gmail.com>,
	Guenter Roeck <linux@roeck-us.net>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] serdev: Add serdev_device_write subroutine
Date: Fri, 17 Mar 2017 11:31:31 -0500	[thread overview]
Message-ID: <CAL_JsqJG3=KiPASd4=yOLxC2CryBuZQPT4MPevXqQjBpdjzmXw@mail.gmail.com> (raw)
In-Reply-To: <CAHQ1cqEb1vBX3dV2K9nmtV+7wTDFjAREJhViGWGp9HXB5VQDSw@mail.gmail.com>

On Thu, Mar 16, 2017 at 8:33 AM, Andrey Smirnov
<andrew.smirnov@gmail.com> wrote:
> On Wed, Mar 15, 2017 at 7:18 AM, Rob Herring <robh@kernel.org> wrote:
>> On Tue, Mar 14, 2017 at 8:48 AM, Andrey Smirnov
>> <andrew.smirnov@gmail.com> wrote:
>>> Add serdev_device_write() which is a blocking call allowing to transfer
>>> arbitraty amount of data (potentially exceeding amount that
>>> serdev_device_write_buf can process in a single call)
>>>
>>> Cc: cphealy@gmail.com
>>> Cc: Guenter Roeck <linux@roeck-us.net>
>>> Cc: linux-serial@vger.kernel.org
>>> Cc: linux-kernel@vger.kernel.org
>>> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
>>> ---
>>>  drivers/tty/serdev/core.c | 37 +++++++++++++++++++++++++++++++++++++
>>>  include/linux/serdev.h    | 23 +++++++++++++++++------
>>>  2 files changed, 54 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
>>> index f4c6c90..759e834 100644
>>> --- a/drivers/tty/serdev/core.c
>>> +++ b/drivers/tty/serdev/core.c
>>> @@ -128,6 +128,41 @@ int serdev_device_write_buf(struct serdev_device *serdev,
>>>  }
>>>  EXPORT_SYMBOL_GPL(serdev_device_write_buf);
>>>
>>> +int serdev_device_write(struct serdev_device *serdev,
>>> +                       const unsigned char *buf, size_t count)
>>
>> _write vs. _write_buf are not all that clear what the difference is.
>> but I don't have a better name.
>>
>
> serdev_device_send?

send vs. write_buf? Still not that clear.

>> Perhaps a timeout param is needed? This could never complete if CTS
>> remains deasserted.
>
> Yeah, I think it is a good idea, I'll add that in v2.

Maybe just combine the 2 functions and a timeout of 0 follows the
original behavior of serdev_device_write_buf. I'm not sure if we could
handle write_wakeup in that case though.

Rob

  reply	other threads:[~2017-03-17 16:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 13:48 [PATCH 0/2] serdev API extension Andrey Smirnov
2017-03-14 13:48 ` [PATCH 1/2] serdev: Add serdev_device_write subroutine Andrey Smirnov
2017-03-14 23:17   ` Andy Shevchenko
2017-03-16 14:23     ` Andrey Smirnov
2017-03-16 15:09       ` Andy Shevchenko
2017-03-17 13:33         ` Andrey Smirnov
2017-03-15 14:18   ` Rob Herring
2017-03-16 13:33     ` Andrey Smirnov
2017-03-17 16:31       ` Rob Herring [this message]
2017-03-14 13:48 ` [PATCH 2/2] serdev: Add minimal bus locking API Andrey Smirnov
2017-03-14 23:20   ` Andy Shevchenko
2017-03-16 14:37     ` Andrey Smirnov
2017-03-15 14:25   ` Rob Herring

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='CAL_JsqJG3=KiPASd4=yOLxC2CryBuZQPT4MPevXqQjBpdjzmXw@mail.gmail.com' \
    --to=robh@kernel.org \
    --cc=andrew.smirnov@gmail.com \
    --cc=cphealy@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.