Re: is there a reason "usbhid.quirks" parameter is not root writable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 13 Nov 2015, Bjørn Mork wrote:

> "Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx> writes:
> > On Thu, 12 Nov 2015, Greg KH wrote:
> >
> >> You can add a runtime quirk to the device itself when it shows up in
> >> sysfs for the hid driver.  Use that instead of the module parameter for
> >> that specific device.
> >
> >   sorry, i'm not sure what you're suggesting here.
>
> I don't know if this was what Greg meant, but you can always use
>
>  /sys/bus/usb/drivers/usbhid/unbind
>
> to unbind the device from the usbhid driver.  Then you can manually
> bind it to some other driver supporting the same device using the
> same mechanism (with s/un// of course), or load another supporting
> driver to make it probe and bind the device.

  ah, got it, thanks. i've never done that but the concept seems easy
enough.

> Hmm, I was going to point you to the file documenting bind/unbind
> for the usb bus, but it doesn't seem to exist?  There you have a
> task for someone wanting to improve the docs :)

  and that's one of the things i mention occasionally when newbies ask
how to get started working on the kernel. write/improve the docs. what
a perfect example.

> Anyway, it goes like this: Look at the device driver binding in sysfs:
>
> $ ls -l /sys/bus/usb/drivers/usbhid
> total 0
> lrwxrwxrwx 1 root root    0 Nov 13 09:06 4-4:1.0 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.0
> --w------- 1 root root 4096 Nov 13 09:06 bind
> lrwxrwxrwx 1 root root    0 Nov 13 09:06 module -> ../../../../module/usbhid
> -rw-r--r-- 1 root root 4096 Nov 13 09:06 new_id
> -rw-r--r-- 1 root root 4096 Nov 13 09:06 remove_id
> --w------- 1 root root 4096 Nov 13 09:06 uevent
> --w------- 1 root root 4096 Nov 13 09:06 unbind
>
>
> Unbind the device you want to move somewhere else:
>
> $ echo 4-4:1.0 >/sys/bus/usb/drivers/usbhid/unbind
>
> Bind it to 'otherdriver':
>
> $ echo 4-4:1.0 >/sys/bus/usb/drivers/'otherdriver'/bind
>
> (wich will only succeed of that driver's probe succeeds, of course.  If
> you need to add a device ID to another driver, then do that using
> 'new_id' instead.  Which will trigger automatic probing of 'free'
> devices)

  thank you kindly, i'll give this a shot.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux