LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Adam Nielsen <a.nielsen@shikadi.net>
To: Jiri Kosina <jkosina@suse.cz>
Cc: LKML Mailinglist <linux-kernel@vger.kernel.org>
Subject: Driver for new hid class (was: Can you use the USB HID interface within a driver?)
Date: Sun, 02 Nov 2008 16:43:23 +1000 [thread overview]
Message-ID: <490D4C0B.603@shikadi.net> (raw)
In-Reply-To: <490CE432.5040005@shikadi.net>
>> For 2.6.28, the HID code has been completely refactored, and converted
>> into a proper bus, making it possible to write driver easily in a way
>> that the driver implements only parts where device deviates from the
>> HID standard, and lets the rest to be handled by generic code. I guess
>> this is what you are looking for?
>
> Yes, that sounds like exactly what I'm after! This device seems to be
> HID with a custom protocol over the top, so presumably I can let the HID
> driver handle all the USB initialisation and just focus on the protocol.
Okay, I've upgraded to 2.6.28-rc2 and started writing a driver for the
new hid class. It didn't take long for me to get stuck though :-(
When I load my module, it calls hid_register_driver() which returns
0/success. However that's as far as it gets. I've defined a probe
function to attach to the device, but this never gets called.
Is there something else I need to do? The USB IDs are right, and I
tried replugging the device with my "driver" loaded but it seems to be
ignored. It seems the device appears as a full HID input
implementation, so it gets an evdev device associated with it.
Does this mean I need to blacklist it to stop the HID input driver from
claiming it? Or should my driver be able to claim it in preference to
the input driver as mine is for a specific device, as opposed to the
whole class?
Thanks,
Adam.
next prev parent reply other threads:[~2008-11-02 6:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-01 11:44 Can you use the USB HID interface within a driver? Adam Nielsen
2008-11-01 12:08 ` Oliver Neukum
2008-11-01 12:32 ` Adam Nielsen
2008-11-01 14:52 ` Kay Sievers
2008-11-01 20:26 ` Jiri Kosina
2008-11-01 23:20 ` Adam Nielsen
2008-11-02 6:43 ` Adam Nielsen [this message]
2008-11-02 12:14 ` Driver for new hid class Jiri Slaby
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=490D4C0B.603@shikadi.net \
--to=a.nielsen@shikadi.net \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: Driver for new hid class (was: Can you use the USB HID interface within a driver?)' \
/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
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).