All of lore.kernel.org
 help / color / mirror / Atom feed
* Can you use the USB HID interface within a driver?
@ 2008-11-01 11:44 Adam Nielsen
  2008-11-01 12:08 ` Oliver Neukum
  2008-11-01 20:26 ` Jiri Kosina
  0 siblings, 2 replies; 8+ messages in thread
From: Adam Nielsen @ 2008-11-01 11:44 UTC (permalink / raw)
  To: LKML Mailinglist

Hi all,

I'm about to start writing a driver for a Gigabyte Odin PC power supply. 
  This device has a USB connection which allows you to monitor 
temperature, voltages, current, etc.

Before I start coding the USB side of things, I'd just like some advice 
as to the best way of communicating with the device.

I would rather write the driver in kernel space (so that it "just works" 
and provides a hwmon interface without installing extra software), 
however the device already appears to the system as a USB HID device, 
and so gets claimed by the existing usbhid driver.

Is there any way to interface with the HID driver from within another 
driver?  Or will I have to claim the device first (or disconnect 
usbhid), and communicate with it myself?

I've tried to find some example code from a driver that already does 
this (such as a USB keyboard driver) but I'm having some trouble finding 
one!  The closest drivers I can find are all the ones in 
drivers/hid/usbhid, but they all seem to be "embedded" in hid-core.c. 
Does that mean I need to modify hid-core.c to call my driver?

Or perhaps someone could point me in the direction of a USB HID driver 
that does things "properly" already?

Many thanks,
Adam.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-11-02 12:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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     ` Driver for new hid class (was: Can you use the USB HID interface within a driver?) Adam Nielsen
2008-11-02 12:14       ` Driver for new hid class Jiri Slaby

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.