Re: Help newbie second usb mouse

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

 



On Sat, Apr 24, 2010 at 12:12:10AM +0200, Karin Pavjlik wrote:
> Am Dienstag, den 20.04.2010, 06:47 -0700 schrieb Greg KH:
> > On Tue, Apr 20, 2010 at 03:37:41PM +0200, Karin Pavjlik wrote:
> > > Im' a newbie, trying to program my first driver. I'll try to make an
> > > additional driver for the second USB mouse plugged into my laptop
> > > (genius netscroll+). 
> > 
> > Hm, why?  Does the in-kernel driver not already work for you?
> 
> No. just for learning, I have to make a project.

HID is not a simple protocol, good luck :)

> > How do I disable the second mouse from behiving like a
> > > mouse?
> > Unbind it from userspace through sysfs if you really want to do this.
> > Or make the usbfs ioctl call to disable it.  Either will work.
> 
> Cool.
> 
> > > b) Where is the current usb mouse driver source code for this? 
> > usbhid.
> 
> > > c) any tips? I'm reading the oreilly book. 
> > What exactly are you trying to do?  There are already drivers for your
> > device written (one very complete, one tiny) in the kernel tree, so
> > rewriting them, while fun, might not be needed :)
> 
> Just trying to understand a little bit of USB, I thought starting with
> something simple as a mouse, from zero, could be nice. usbhid seems
> *BIG*.

That's because HID is complex, sorry.  That mouse isn't the simplest
device...

But look at the "boot protocol" usb mouse driver for a simple mouse
driver, that might help make things easier.  Note that this driver does
not work on all mice, so yours might have problems.

good luck,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux