From mboxrd@z Thu Jan 1 00:00:00 1970 From: poleyschen@gmail.com (Pol Eyschen) Date: Sat, 10 Sep 2016 20:58:07 +0200 Subject: Extend device driver? In-Reply-To: <20160910151412.GA9954@kroah.com> References: <20160910151412.GA9954@kroah.com> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On 10/09/16 17:14, Greg KH wrote: > On Sat, Sep 10, 2016 at 04:41:34PM +0200, Pol Eyschen wrote: >> Hi everyone, >> >> I want to implement some custom functions of my mouse (Madcatz RAT5) in >> Linux, e.g custom DPI-values. As this requires writing over USB to the >> firmware of the mouse I was thinking of writing a module to accomplish >> this. However I don't want to reimplement a whole mouse-driver,so I >> wanted to ask if there is a possibility of binding the device to 2 >> modules or having my module extend usbhid, so that my module would only >> be used to perform these custom operations while usbhid stays in charge >> of the whole "mouse business". > > Please just use the hidraw userspace driver/library instead, that way > you don't have to unbind the kernel driver and everything should work > just fine without having to touch the kernel at all. > > Hope this helps, > > greg k-h > I looked at hidraw, unfortunately it doesn't work for me, as the mouse expects control URBs with proprietary requests, hence my thought for a kernel module.