From: Sean Young <sean@mess.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
linux-media@vger.kernel.org
Subject: Re: [PATCH 2/3] input: serio: allow more than one byte to be sent at once
Date: Wed, 13 May 2020 18:04:11 +0100 [thread overview]
Message-ID: <20200513170411.GD9559@gofer.mess.org> (raw)
In-Reply-To: <20200512173727.GC89269@dtor-ws>
On Tue, May 12, 2020 at 10:37:27AM -0700, Dmitry Torokhov wrote:
> On Tue, May 12, 2020 at 10:07:24AM +0100, Sean Young wrote:
> > Now it would be nice to have a discussion about this rather than being
> > dismissed with:
> >
> > > > > Ummm, serial protocol data size is at most 9 bits so I have no earthly
> > > > > idea how they expect to get 16.
> >
> > Which is just a tad insulting.
>
> That was not meant to be insulting, however serial protocol defines that
> the data size is at most 9 bits, so expecting that one can transmit
> anything more than that _atomically_ is wrong. If your device/firmware
> requires 16 bits to be transferred as indivisible units, then serial
> port abstraction is wrong one to be used.
Honestly thank you for explaining that. I had no idea this was an abstract
point about the demarcations of serial port-ness.
There is no physical rs-232 cabling involved at all in this case.
> Now serio is layer "above" serial ports (but does not have to have
> an underlying serial port) that provides byte-oriented communication
> that is expected to mostly flow into host. Its does not expect heavy
> data flows coming from the host and into the device (if you look at all
> the touchscreens, psmouse, etc, they all send initialization sequences
> to the device, and then all the data flows into the host). Therefore
> there is little benefit in optimizing serio writes.
True, I didn't think this would make much of an measurable improvement,
but still, some.
> You are using performance clams as a clutch for the requirement of
> sending u16s, but as I mentioned it is wrong if you use serial ports
> abstraction layer. Greg mentioned ir-usb. You can maybe enhance it, or
> create a similar driver that connects USB to rc-core and ensures that
> you can communicate with the device with exact format it needs.
Yes, I'll go down this route.
Thank you for the discussion, it was very helpful.
Sean
next prev parent reply other threads:[~2020-05-13 17:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 13:53 [PATCH 1/3] input: add support for the USB IR Toy and USB IR Droid Sean Young
2020-05-07 13:53 ` [PATCH 2/3] input: serio: allow more than one byte to be sent at once Sean Young
2020-05-07 20:25 ` Dmitry Torokhov
2020-05-07 20:59 ` Sean Young
2020-05-11 6:51 ` Greg KH
2020-05-12 9:07 ` Sean Young
2020-05-12 17:37 ` Dmitry Torokhov
2020-05-13 17:04 ` Sean Young [this message]
2020-05-13 8:16 ` Greg KH
2020-05-13 16:09 ` Sean Young
2020-05-07 13:53 ` [PATCH 3/3] media: rc: add support for Infrared Toy and IR Droid devices Sean Young
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=20200513170411.GD9559@gofer.mess.org \
--to=sean@mess.org \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).