On December 11, 2010 at 12:54 PM "Stephan Aßmus" <superstippi@xxxxxx> wrote: > > BTW, the driver I'm working on, is > > for non wacom devices. In my case I have a pair of cheap Trust tablets > > (which I already have moving arround haiku! :-D ) as they are very > > cheap, they seem to not follow standards and publish themselves as > > generic HID devices, so I actually have to patch usbhid driver to > > discard those vendorID. Is this the way to go? > > Actually the Wacom tablets are HID devices as well. The Haiku source > code also contains another tablet driver which is supposed to work with > any HID tablet, but I don't know what state that is in, it is currently > not part of default Haiku images, IIRC. Ideally, we would not have > separate drivers for tablets, or even different vendors of tablets, but > would explore and configure tablets purely via the HID protocol in the > HID driver and input_server add-on. For the time being, it is ok to > block the HID driver from picking up specific vendors, but this is not a > long term solution, especially since 3rd party drivers cannot do the > same without replacing the HID driver. Yes, please don't add extra drivers for hardware covered by HID. There are some devices that need separate drivers due to them incorrectly implementing the HID protocol (which essentially renders them non-HID anyway), but those should be rather rare. Everything else is a bug or missing feature in usb_hid and should simply be fixed / implemented there. In the case of absolute coordinate input devices, they just aren't taken into account in usb_hid yet due to the lack of being able to transport the information to the input_server. There already is HIDReportItem::Relative() to tell whether the item reports relative or absolute data. The actual problem lies with the mouse_movement structure that is used to pass the data from the driver to the input_server, as it only has x- and y-delta fields to report relative data. This one should be extended to allow for absolute devices as well and then in usb_hid/MouseDevice.cpp at MouseDevice::_ReadReport() the fXAsix and fYAxis HIDReprotItems should be checked for !Relative() data and the corresponding fields in mouse_movement (or even better a new, better fitting structure) be filled out. If tablets generally have a different set of controls exported than what the MouseDevice currently looks for and reads out then a TabletDevice subclass of ProtocolHandler should be added that caters for those specific needs. The HID framework in usb_hid is very flexible and easily allows for such extensions without the need for separate drivers. Regards Michael