#
6c88202d |
|
03-Dec-2021 |
Lt-Henry <quiqueiii@gmail.com> |
hid_shared: factorize more code between USB and HID * Removed i2c keyboard handler, as it was just a hid shared handler duplicate with kdl stuff removed * I've created a new macro def for the kdl code, splitting generic kdl code from specific usb one * I2C custom KDL code can be added in the future (I don't know if it is already possible) I am not very happy with this solution, but imho it is better than having two keyboard handlers. In fact, they were already out of sync from last patch series Change-Id: I36513e57a2ce4f004fc7e05ccff5a6b2517fc139 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4758 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
|
#
2b4bf3ee |
|
04-Apr-2020 |
Jérôme Duval <jerome.duval@gmail.com> |
i2c_hid: driver for i2c-hid devices This is getting more common in tablets and laptops. It replaces PS/2 for the internal keyboard and pointing devices. This is simpler and cheaper than using up USB ports, and also simpler than the old and quirky PS/2 protocol. The HID spec is the same no matter what transport is used (it is also applicable for Bluetooth). Ideally we could create a separate HID bus manager that would handle all these devices in a generic way, but that is a lot of work nad extra complications for uncertain gains. For now, just move the common files to a shared directory where both drivers can use them. As a result the files are compiled twice, which is what we want, because currently they hardcode some device paths that need to be different for each driver. Change-Id: I0327f6864dd0a4372b708f7b7ecf299aa86a6ea9 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2466 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
|
#
6e47dfbe |
|
03-Sep-2013 |
Stephan Aßmus <superstippi@gmx.de> |
USB HID: Split out tablet support into TabletProtocolHandler * The previous approach of combining tablet and mouse support in MouseProtocolHandler was unintuitive and had the potential problem that if a device has multiple HID descriptors, one simulating a simple mouse, that one may be found first and there is no mechanism of choosing the best handler for a device. Now we can look for tablets before looking for mice. * Implement pressure, eraser and tilt support. Untested. This mostly comes from the patch in #7354, but eraser support should work more like intended by the Be API. * It appears that my Wacom Intuos 2 cannot be accessed via the HID framework, except as regular mouse. So I couldn't actually test these changes. I believe what worked before, i.e. QEMU absolute mouse position support, should work as good as before. Please shout if not! * If more recent Wacom tablets /could/ work with these changes, they will not, because the HID driver still explicitely ignores Wacom devices and the dedicated Wacom driver will not pick up newer devices, with its hard-coded and un-generic device support.
|
#
0e37c8a9 |
|
04-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
Implement a HIDWriter that provides a high and lower level interface for writing report descriptors. These descriptors aren't optimized for efficiency (the writer doesn't attempt to avoid writing unneeded global items for example) but they will only serve as input for the HIDParser that parses them correctly regardless. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41921 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6e53f9a9 |
|
03-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Make the quirky device mechanism a bit more useful by allowing an init function that is triggered before the protocol handlers are added. * Use the quirky device mechanism to support the Sony SIXAXIS controller (the PS3 one). It requires a specific get_report to become operational. Note that you still have to push the PS button to enable it after plugging in. Note also that only the two analog sticks are reported as axis, the analog values of the buttons as well as the motion sensors aren't described by the HID descriptor and therefore aren't accessible. The digital button states (on/off only) work however. A fixed descriptor could possibly be crafted to support the missing features later on though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41902 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f46bc7f1 |
|
30-May-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Add a JoystickProtocolHandler to usb_hid that supports the BJoystick protocol. This includes input scaling, so the resulting input ranges should always match the ones of the BJoystick data (hence no calibration should be required). * It supports joysticks, gamepads and multi-axis controllers. I've only tested it with a Microsoft SideWinder Gamepad Pro so far, which now works as expected with stickit. * Fixes #7429. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41851 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
305aff3f |
|
28-May-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Changed the way how devices are enumerated and protocol handlers are added to handle the different device classes. Handlers are now added based on the application collections that the HID descriptor describes instead of by enumerating the different report items inside the reports. This means that a device is now logically treated as a mouse when it comes with an application collection that designates it as a mouse, instead of when there is a report that contains an X and a Y axis. This resolves the conflicts that gamepads and joysticks were added as mice due to them containing such elements. This therefore fixes #4499 and opens up the way to properly handle other device types like joysticks (#7429), gamepads, tablets (#7354, #5989 and #7481) and so on. I'll work on gamepads/joysticks next and see where we stand for tablets later. * Added a few enumeration functions to HIDCollection to support the above. * Fix the root collection handling. A device doesn't describe a single root collection and then adds everything as a child. Instead it just has multiple collections on level 0. We account for that now by always creating an empty logical collection as the root collection where all the collections of the descriptor get added. * Rename the {Mouse|Keyboard}Device.{cpp|h} to {Mouse|Keyboard}ProtocolHandler.{cpp|h} as that more clearly describes their purpose. These classes are protocol handlers, i.e. they handle the ioctl based mouse and keyboard protocol between the driver and the input_server add-ons. * Change a lot of stuff to use references instead of pointers where it makes sense (not necessarily complete yet). I've tested this successfully on a keyboard with extended keys, a combo device with a keyboard with extended keys and a mouse, a mouse and a gamepad (that now doesn't do anything anymore) and found no regressions. However, since there are a lot of very varied ways how to describe such functions with HID, it's not too unlikely that some more curiously described devices will now stop working. These have to be handled case by case and their usages have to be added to the added to the appropriate handlers (or new handlers have to be written). Please test and create bug reports (preferrably including the report descriptor that is written out to /tmp). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41794 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8e1857f7 |
|
26-Jul-2009 |
Michael Lotz <mmlr@mlotz.ch> |
* Completely rework the USB HID driver to make use of the HID framework introduced earlier. * Reworked the previous device classes to make them ProtocolHandlers handling their respective input_server <-> driver protocol. * Implement setting report item data and building/sending reports based on that. * Remove the old HID parsing code. This enables us to use all HID devices as we now parse and use the HID descriptors/reports. Non-boot-porotocol devices should therefore work. The next step will be to implement a generic input/output framework in userland that can communicate with a generic protocol handler in usb_hid. This will then enable applications to make use of all the non-mapped HID stuff directly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31790 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9e48bf8e |
|
25-May-2008 |
Michael Lotz <mmlr@mlotz.ch> |
Rewriting the usb_hid driver. It has now gotten a driver part and a device part structured into the HIDDevice base class and KeyboardDevice and MouseDevice subclasses. This can be extended easily to support more device types like game controllers, joysticks and other HID devices. The parsing code remains untouched while the interpretation code has been integrated into the device classes. The driver should work much the same way as before including the boot protocol only keyboard limitation. On the other hand composite devices that combine multiple devices should now work, as long as they expose those devices as two seperate interfaces. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25657 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b8859c2a |
|
11-Jan-2008 |
Michael Lotz <mmlr@mlotz.ch> |
* Add handling for B_INTERRUPTED so USB keyboards can work again * Beginnings of devfs interaction to properly publish/unpublish under Haiku git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23412 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
da0f9ae0 |
|
02-Aug-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added Haiku as host platform supported by the build system ("haiku_host"). Completely untested yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21802 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c49e0c68 |
|
18-Sep-2006 |
Jérôme Duval <korli@users.berlios.de> |
dropped a useless arg of the KernelAddon rule, hope I don't mess anything git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18879 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
78f9905a |
|
04-Aug-2006 |
Jérôme Duval <korli@users.berlios.de> |
usb_hid now uses our kernel ring_buffer implementation even on BeOS fixes bug #722 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18392 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e48655c1 |
|
24-Jul-2006 |
Axel Dörfler <axeld@pinc-software.de> |
The driver can now be built again for R5. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18252 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
338b8dc3 |
|
29-Oct-2005 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged changes from branch build_system_redesign at revision 14573. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6355993d |
|
29-Jun-2005 |
Axel Dörfler <axeld@pinc-software.de> |
No wonder I had to remove the grist to make it build.... :-) Thanks John! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13356 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
002af7f9 |
|
29-Jun-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Fixed build of usb_hid, partially by John Drinkwater. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13347 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
52b9aaef |
|
30-Mar-2005 |
Jérôme Duval <korli@users.berlios.de> |
fixed to build, now named usb_hid git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12166 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a84a3aae |
|
18-Mar-2005 |
Jérôme Duval <korli@users.berlios.de> |
Renamed hid in usb_hid git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11901 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6e47dfbeaf66b98863b4274617203bb3491b791e |
|
03-Sep-2013 |
Stephan Aßmus <superstippi@gmx.de> |
USB HID: Split out tablet support into TabletProtocolHandler * The previous approach of combining tablet and mouse support in MouseProtocolHandler was unintuitive and had the potential problem that if a device has multiple HID descriptors, one simulating a simple mouse, that one may be found first and there is no mechanism of choosing the best handler for a device. Now we can look for tablets before looking for mice. * Implement pressure, eraser and tilt support. Untested. This mostly comes from the patch in #7354, but eraser support should work more like intended by the Be API. * It appears that my Wacom Intuos 2 cannot be accessed via the HID framework, except as regular mouse. So I couldn't actually test these changes. I believe what worked before, i.e. QEMU absolute mouse position support, should work as good as before. Please shout if not! * If more recent Wacom tablets /could/ work with these changes, they will not, because the HID driver still explicitely ignores Wacom devices and the dedicated Wacom driver will not pick up newer devices, with its hard-coded and un-generic device support.
|
#
0e37c8a9fc3880d3e77dd529613cee20fc7b069e |
|
04-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
Implement a HIDWriter that provides a high and lower level interface for writing report descriptors. These descriptors aren't optimized for efficiency (the writer doesn't attempt to avoid writing unneeded global items for example) but they will only serve as input for the HIDParser that parses them correctly regardless. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41921 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6e53f9a99099590f263fab95a742ab6160b1b1a8 |
|
03-Jun-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Make the quirky device mechanism a bit more useful by allowing an init function that is triggered before the protocol handlers are added. * Use the quirky device mechanism to support the Sony SIXAXIS controller (the PS3 one). It requires a specific get_report to become operational. Note that you still have to push the PS button to enable it after plugging in. Note also that only the two analog sticks are reported as axis, the analog values of the buttons as well as the motion sensors aren't described by the HID descriptor and therefore aren't accessible. The digital button states (on/off only) work however. A fixed descriptor could possibly be crafted to support the missing features later on though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41902 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f46bc7f19efb1f6c816a10f2441eafdca37bfc71 |
|
30-May-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Add a JoystickProtocolHandler to usb_hid that supports the BJoystick protocol. This includes input scaling, so the resulting input ranges should always match the ones of the BJoystick data (hence no calibration should be required). * It supports joysticks, gamepads and multi-axis controllers. I've only tested it with a Microsoft SideWinder Gamepad Pro so far, which now works as expected with stickit. * Fixes #7429. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41851 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
305aff3f787ca5d2e0e5ef44fe3487ca3fb7adae |
|
28-May-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Changed the way how devices are enumerated and protocol handlers are added to handle the different device classes. Handlers are now added based on the application collections that the HID descriptor describes instead of by enumerating the different report items inside the reports. This means that a device is now logically treated as a mouse when it comes with an application collection that designates it as a mouse, instead of when there is a report that contains an X and a Y axis. This resolves the conflicts that gamepads and joysticks were added as mice due to them containing such elements. This therefore fixes #4499 and opens up the way to properly handle other device types like joysticks (#7429), gamepads, tablets (#7354, #5989 and #7481) and so on. I'll work on gamepads/joysticks next and see where we stand for tablets later. * Added a few enumeration functions to HIDCollection to support the above. * Fix the root collection handling. A device doesn't describe a single root collection and then adds everything as a child. Instead it just has multiple collections on level 0. We account for that now by always creating an empty logical collection as the root collection where all the collections of the descriptor get added. * Rename the {Mouse|Keyboard}Device.{cpp|h} to {Mouse|Keyboard}ProtocolHandler.{cpp|h} as that more clearly describes their purpose. These classes are protocol handlers, i.e. they handle the ioctl based mouse and keyboard protocol between the driver and the input_server add-ons. * Change a lot of stuff to use references instead of pointers where it makes sense (not necessarily complete yet). I've tested this successfully on a keyboard with extended keys, a combo device with a keyboard with extended keys and a mouse, a mouse and a gamepad (that now doesn't do anything anymore) and found no regressions. However, since there are a lot of very varied ways how to describe such functions with HID, it's not too unlikely that some more curiously described devices will now stop working. These have to be handled case by case and their usages have to be added to the added to the appropriate handlers (or new handlers have to be written). Please test and create bug reports (preferrably including the report descriptor that is written out to /tmp). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41794 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8e1857f79521285ff4ecf2ab2a258191dd4aa0a8 |
|
26-Jul-2009 |
Michael Lotz <mmlr@mlotz.ch> |
* Completely rework the USB HID driver to make use of the HID framework introduced earlier. * Reworked the previous device classes to make them ProtocolHandlers handling their respective input_server <-> driver protocol. * Implement setting report item data and building/sending reports based on that. * Remove the old HID parsing code. This enables us to use all HID devices as we now parse and use the HID descriptors/reports. Non-boot-porotocol devices should therefore work. The next step will be to implement a generic input/output framework in userland that can communicate with a generic protocol handler in usb_hid. This will then enable applications to make use of all the non-mapped HID stuff directly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31790 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9e48bf8e429c4939c2c80cae1b6615b9af5bdda2 |
|
25-May-2008 |
Michael Lotz <mmlr@mlotz.ch> |
Rewriting the usb_hid driver. It has now gotten a driver part and a device part structured into the HIDDevice base class and KeyboardDevice and MouseDevice subclasses. This can be extended easily to support more device types like game controllers, joysticks and other HID devices. The parsing code remains untouched while the interpretation code has been integrated into the device classes. The driver should work much the same way as before including the boot protocol only keyboard limitation. On the other hand composite devices that combine multiple devices should now work, as long as they expose those devices as two seperate interfaces. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25657 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b8859c2a292e149e8d1f219451456f3a9dd5ecc0 |
|
11-Jan-2008 |
Michael Lotz <mmlr@mlotz.ch> |
* Add handling for B_INTERRUPTED so USB keyboards can work again * Beginnings of devfs interaction to properly publish/unpublish under Haiku git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23412 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
da0f9ae040921d1af3cdbac209bdf16fe80f95b3 |
|
02-Aug-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added Haiku as host platform supported by the build system ("haiku_host"). Completely untested yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21802 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c49e0c68b013ebe90a3a48d5e98b5788ba2e6542 |
|
18-Sep-2006 |
Jérôme Duval <korli@users.berlios.de> |
dropped a useless arg of the KernelAddon rule, hope I don't mess anything git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18879 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
78f9905a575cfec5a730c9e73a0acd64c9ad7505 |
|
04-Aug-2006 |
Jérôme Duval <korli@users.berlios.de> |
usb_hid now uses our kernel ring_buffer implementation even on BeOS fixes bug #722 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18392 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e48655c17f8ba5e70c9edfc44b5210846bacec6a |
|
24-Jul-2006 |
Axel Dörfler <axeld@pinc-software.de> |
The driver can now be built again for R5. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18252 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
338b8dc301721b1f472e8297a898d4eaa2f2ee3a |
|
29-Oct-2005 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged changes from branch build_system_redesign at revision 14573. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6355993de95aea217a598d2accff6e30d5ad4fef |
|
29-Jun-2005 |
Axel Dörfler <axeld@pinc-software.de> |
No wonder I had to remove the grist to make it build.... :-) Thanks John! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13356 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
002af7f9c0cfa67119af20e5425a8e75e54cabf5 |
|
29-Jun-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Fixed build of usb_hid, partially by John Drinkwater. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13347 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
52b9aaefa16eefcacbdd82f2d71fe69e8e51a6cf |
|
30-Mar-2005 |
Jérôme Duval <korli@users.berlios.de> |
fixed to build, now named usb_hid git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12166 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a84a3aae19bfae676b2e5b41a48aaa7e7b7f92cf |
|
18-Mar-2005 |
Jérôme Duval <korli@users.berlios.de> |
Renamed hid in usb_hid git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11901 a95241bf-73f2-0310-859d-f6bbb57e9c96
|