TransWikia.com

Bind/Unbind Linux Module Automatically

Unix & Linux Asked by Vladius on December 20, 2020

I’m currently trying to create my own USB HID mouse driver as an override of the standard generic USB, which always gets in the way. How can I unbind the generic driver and rebind it to my specific automatically?

My Zuoya MMR6 module/driver: https://github.com/vladipus/zuoya-mmr6

One Answer

Created the following udev rules, which helped much with the issue:

KERNEL=="0003:18F8:1486.*"
PROGRAM="/bin/sh -c 'echo -n %k > /sys/bus/hid/drivers/hid-generic/unbind;
echo -n %k > /sys/bus/hid/drivers/hid-zuoya-mmr6/bind'"

Those can be automatically installed to /etc/udev/rules.d/ by the driver installation scripts/routine.

Answered by Vladius on December 20, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP