From: "Adam Kropelin" <akropel1@rochester.rr.com>
To: "Jiri Kosina" <jkosina@suse.cz>
Cc: "Li Yu" <raise.sail@gmail.com>, <yanghong@ccoss.com.cn>,
"linux-usb-devel" <linux-usb-devel@lists.sourceforge.net>,
<hongzhiyi@ccoss.com.cn>, "Marcel Holtmann" <marcel@holtmann.org>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"LKML" <linux-kernel@vger.kernel.org>
Subject: Re: [linux-usb-devel] [RFC] HID bus design overview.
Date: Thu, 5 Apr 2007 10:08:31 -0400 [thread overview]
Message-ID: <045101c7778b$e45406e0$84163e05@kroptech.com> (raw)
In-Reply-To: Pine.LNX.4.64.0704051034100.4173@jikos.suse.cz
Jiri Kosina wrote:
> On Wed, 4 Apr 2007, Adam Kropelin wrote:
>> On Apcupsd we've recently introduced a libusb-based driver that does
>> all HID parsing in userspace. Not only does that free us from
>> hiddev, it also frees us from the umpteen other proprietary HID
>> interfaces across various platforms. Although the hiddev-based
>> driver is still the default for Linux platforms, I plan to change
>> that in the next major release and thus begin migrating folks off of
>> hiddev.
>
> Great. Do you use libusb to obtain raw hid events?
We do, along with libusbhid from *BSD to handle report descriptor
parsing and report field extraction/insertion.
> Could you by any
> chance look at current implementation of hidraw (it's in -mm or I can
> send it to you as a separate patch) and check whether you have any
> comments on this?
I pulled down 2.6.21-rc5-mm4 and took a look at hidraw. I like the
simplicity of it for sure. One feature that seems to be missing is the
ability to force an input report to be fetched via a control transfer.
Several APC UPSes have the unfortunate tendency to change report values
without sending an interrupt report to notify you, so you have to poll
them occasionally. Also, how does one fetch string descriptors via
hidraw?
> It would be good if you could use hidraw rather
> than reading raw usb data through libusb.
I have to admit I don't see much value in switching Apcupsd to hidraw
rather than libusb. (I see lots of value switching it away from hiddev,
though :) We need a HID engine in userspace to handle descriptor parsing
with any non-hiddev solution. Plus, APC UPSes tend to have buggy HID
implementations that require a bit of care to communicate with properly.
Having an "intelligent" kernel layer in the middle tends to just get in
the way (see the truncated report handling patch for hid-core I just
sent).
But honestly, the deal-breaker is that with libusb I can hit Linux, all
the *BSDs, Darwin, Solaris, and even Windows with a single userspace
driver. That's just too valuable to ignore.
--Adam
next prev parent reply other threads:[~2007-04-05 14:09 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-05 7:32 [DOC] The documentation for HID Simple Driver Interface 0.5.0 Li Yu
2007-03-05 20:44 ` Marcel Holtmann
2007-03-05 20:11 ` Dmitry Torokhov
2007-03-05 22:40 ` Marcel Holtmann
2007-03-06 13:25 ` Dmitry Torokhov
2007-03-06 13:47 ` Jiri Kosina
2007-03-06 18:57 ` Marcel Holtmann
2007-03-05 21:47 ` Jiri Kosina
2007-03-05 22:12 ` [linux-usb-devel] " Jiri Kosina
2007-03-05 22:27 ` Dmitry Torokhov
2007-03-06 1:37 ` Liyu
[not found] ` <45ECC5A4.20203@ccoss.com.cn>
2007-03-06 9:40 ` Jiri Kosina
2007-03-06 11:52 ` Harold Sargeant
2007-03-06 7:01 ` Robert Marquardt
2007-03-06 7:37 ` Jiri Kosina
2007-03-19 10:44 ` [RFC] HID bus design overview Li Yu
2007-03-26 8:27 ` [linux-usb-devel] " Marcel Holtmann
2007-03-28 1:58 ` Li Yu
[not found] ` <4609CAF2.3040303@ccoss.com.cn>
2007-03-28 7:51 ` Jiri Kosina
2007-03-28 19:00 ` Dmitry Torokhov
2007-03-28 19:13 ` Jiri Kosina
2007-03-30 3:06 ` Li Yu
2007-03-30 4:33 ` Dmitry Torokhov
2007-03-30 5:37 ` Li Yu
2007-03-30 16:13 ` Dmitry Torokhov
2007-03-31 22:49 ` Jiri Kosina
2007-04-02 1:47 ` Li Yu
2007-04-02 4:15 ` Dmitry Torokhov
2007-04-02 7:07 ` Li Yu
2007-04-02 7:42 ` Greg KH
2007-04-02 9:34 ` Jiri Kosina
2007-04-02 12:40 ` Dmitry Torokhov
2007-04-02 4:09 ` Dmitry Torokhov
2007-04-02 9:37 ` Jiri Kosina
2007-04-02 10:14 ` Robert Marquardt
2007-04-02 12:21 ` Marcel Holtmann
2007-04-02 12:33 ` Jiri Kosina
2007-04-02 16:47 ` Marcel Holtmann
2007-04-03 1:15 ` Li Yu
2007-04-03 3:42 ` Dmitry Torokhov
2007-04-03 8:57 ` Jiri Kosina
2007-04-04 0:55 ` Li Yu
2007-04-04 14:54 ` Marcel Holtmann
2007-04-04 23:01 ` Adam Kropelin
2007-04-04 23:12 ` Jiri Kosina
2007-04-04 23:34 ` Adam Kropelin
2007-04-05 8:36 ` Jiri Kosina
2007-04-05 14:08 ` Adam Kropelin [this message]
[not found] ` <46189FE3.6050206@gmail.com>
2007-04-09 1:54 ` [linux-usb-devel] HID bus prototype - 20070408 Li Yu
2007-04-10 9:40 ` Jiri Kosina
2007-04-10 11:00 ` [linux-usb-devel] " Li Yu
2007-04-05 1:25 ` [linux-usb-devel] [RFC] HID bus design overview Li Yu
2007-04-05 3:09 ` Dmitry Torokhov
2007-04-05 5:28 ` Li Yu
2007-04-05 6:47 ` Li Yu
2007-04-06 0:58 ` Li Yu
2007-03-29 5:37 ` Li Yu
2007-03-29 9:24 ` Jiri Kosina
2007-04-02 12:19 ` Marcel Holtmann
-- strict thread matches above, loose matches on Subject: below --
2007-04-02 11:57 Nicolas Mailhot
2007-04-03 1:40 ` Li Yu
2007-04-03 3:41 ` Dmitry Torokhov
2007-04-03 9:00 ` Jiri Kosina
2007-04-05 18:10 ` Paul Walmsley
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='045101c7778b$e45406e0$84163e05@kroptech.com' \
--to=akropel1@rochester.rr.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hongzhiyi@ccoss.com.cn \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=marcel@holtmann.org \
--cc=raise.sail@gmail.com \
--cc=yanghong@ccoss.com.cn \
/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