On Mon, Jul 03, 2006 at 07:24:30PM -0400, Daniel Bonekeeper wrote: > I think that I didn't make myself clear on that... let me try to > explain on what I'm thinking to do. Let's take as example Dan's driver > at http://prdownload.berlios.de/dpfp/dpfp-driver-0.1.2.tar.bz2. > > On our usb_device_id, we specify the vendor of the device, etc. We > could also (I don't know if this is the best place to do that) specify > which kind of device is it (printer, storage, fingerprint reader, HID, > etc). No, why would we want to do that? > Let's suppose that we have some #define's or a enum that specify > the hundreds of different device types (is that possible ? :) Nothing > that a USB_GENERIC can't solve lol). > > enum usb_device_type { > USB_DEVICE_SCANNER, > USB_DEVICE_KEYBOARD, > USB_DEVICE_MOUSE, > USB_DEVICE_FINGERPRINT_READER, > USB_DEVICE_GENERIC, > ... > }; No, please see the USB layer for why we don't need this. > So our usb_device_id array could also include the kind of device and a > pointer to our structure describing the device capabilities, something > like: > > static struct usb_devcap_fingerprint_reader > usb_devcap_fingerprint_reader_mskeyboard = { > .width = 100, > .height = 100, > .colors = 2, > .cap_encrypted_output = 0, > .image_type = FINGEPRINT_IMAGE_BMP, > } > > static struct usb_device_id dpfp_table[] = { > { > /* Microsoft Keyboard with Fingerprint reader */ > USB_DEVICE(0x045e, 0x00bb), > .driver_info = DPFP_TYPE_URU4000B, > USB_DEVICE_FINGERPRINT_READER, > (usb_devcap_fingerprint_reader *) > usb_devcap_fingerprint_reader_mskeyboard, > }, > {} /* terminating null entry */ > }; Yes, that's fine to do. I'll await a real patch before critiquing anything else :) thanks, greg k-h -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/