All of lore.kernel.org
 help / color / mirror / Atom feed
* Stop usbhid from claiming usb device on hotplug
@ 2015-05-29 20:58 Armin Moradi
  2015-05-29 21:14 ` Greg KH
  0 siblings, 1 reply; 12+ messages in thread
From: Armin Moradi @ 2015-05-29 20:58 UTC (permalink / raw)
  To: kernelnewbies

Hi all,

I'm writing a kernel module, but probe() is never called since usbhid
claims the usb device as soon as the device is plugged in.

Tried/potential solutions:

#1: I have tried to write the usb hid id to
/sys/bus/usb/drivers/usbhid/unbind (e.g. echo "1-1.1:1.4" >
/sys/bus/usb/drivers/usbhid/unbind) and that properly unbinds the
device from usbhid, but I want my module to claim the device when it's
plugged in. Adding the above command to udev didn't do much as I
couldn't find a way to tell my module to claim it as it was plugged
in. It seems to me that usbhid claims the device, then udev rule
unbinds it, but since usbhid already claimed it at plugin, my module's
probe() wasn't called regardless.

#2: I also tried unloading usbhid and loading my module and *then*
usbhid. When the device was plugged in, usbhid still took over and my
module's probe() still wasn't called. Even if that worked, it wouldn't
feel like a proper solution.

#3: I could potentially blacklist the device in drivers sources, but
that doesn't seem a good option because I may want to have usbhid
manage the device at some point

At this point, I have no idea what else I could try! Any help or
direction would be appreciated.

Thanks.

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

end of thread, other threads:[~2015-06-01 15:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-29 20:58 Stop usbhid from claiming usb device on hotplug Armin Moradi
2015-05-29 21:14 ` Greg KH
2015-05-30  5:43   ` Armin Moradi
2015-05-30  7:39     ` Greg KH
2015-05-30  7:54       ` Abhishek bist
2015-05-30  8:07         ` Armin Moradi
2015-05-31  1:28           ` Valdis.Kletnieks at vt.edu
2015-06-01  0:22             ` Armin Moradi
     [not found]               ` <9295AF3E-40D2-44CC-B640-FE6B2DC3AF31@gmail.com>
2015-06-01  1:09                 ` Valdis.Kletnieks at vt.edu
     [not found]                   ` <647BA384-BA56-40DE-8045-EF0BFB352791@gmail.com>
2015-06-01  6:36                     ` Valdis.Kletnieks at vt.edu
     [not found]                       ` <F8196AC5-37AB-405C-8D84-9314D85A7E7B@gmail.com>
2015-06-01 14:55                         ` Armin Moradi
     [not found]                           ` <556C73C8.9050707@gmail.com>
2015-06-01 15:33                             ` Armin Moradi

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.