History log of /haiku/src/add-ons/kernel/drivers/input/usb_hid/QuirkyDevices.cpp
Revision Date Author Comments
# 48cd211d 31-Mar-2024 PulkoMandy <pulkomandy@pulkomandy.tk>

usb_hid: add quirk to enable 6th button on Elecom M-XT4DR trackball

Linux implementation: https://www.spinics.net/lists/kernel/msg2665216.html

In our case it is not possible to read the original descriptor from
quirk handlers, so, I had to hardcode it all. The descriptor is the same
as the original one with just 3 bytes changed (detailed in comments).

Other Elecom hardware requires similar quirks, but can have different
number of buttons, so I did not add it for now.

Change-Id: Ie24c8535f3b4535eb414a4e35a62696ea1f9056d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7580
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 7b03963e 06-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Add a quirky device entry for XBOX 360 controllers.
* As they don't claim to be HID, they don't provide a report descriptor either,
so we build one. The built descriptor is similar to the one found in FreeBSD
for the same class of devices. Might fix/help #7649, for lack of hardware I
can't test this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42003 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 575517e6 06-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Remove the report ID argument of HIDWriter::DefineInput{Data|Paddding} to
allow for creating descriptors that don't use report IDs at all.
* Adjust sixaxis_build_descriptor and set the global report ID once at the
beginning instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42001 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c67c6b53 06-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Add device class, subclass and protocol to the quirky device structure.
* Add these to the usb_support_descriptor when adding from the quirky devices.
* Extend the SIXAXIS comment a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42000 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d3260cdb 04-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Reimplement the descriptor patching mechanism for quirky devices by a function
to build a new descriptor using a HIDWriter. This way a completely new
descriptor can be built on the fly or a fixed already patched blob can be
written to the writer if desired.
* Implemented writing a new report descriptor for Sony SIXAXIS controllers. The
descriptor also includes the pressure sensitive button states (exposed as 12
axes) and the accelerometers/gyroscope (exposed as another 4 axes). While the
motion sensing data is now available (and fun to look at), the usefulness is
fairly limited, as the values are not scaled/transformed in any way. It might
be possible to generically do such transformations using unit descriptions,
but those are not implemented yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41925 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


# 7b03963e8a061872dbe7eb05d78b63708d08105b 06-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Add a quirky device entry for XBOX 360 controllers.
* As they don't claim to be HID, they don't provide a report descriptor either,
so we build one. The built descriptor is similar to the one found in FreeBSD
for the same class of devices. Might fix/help #7649, for lack of hardware I
can't test this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42003 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 575517e6174d099df1f1cb60f9aeccc6b5a7b99b 06-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Remove the report ID argument of HIDWriter::DefineInput{Data|Paddding} to
allow for creating descriptors that don't use report IDs at all.
* Adjust sixaxis_build_descriptor and set the global report ID once at the
beginning instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42001 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c67c6b5300e2f9e34fe2f25e2d2c3dfe84bfce9d 06-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Add device class, subclass and protocol to the quirky device structure.
* Add these to the usb_support_descriptor when adding from the quirky devices.
* Extend the SIXAXIS comment a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42000 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d3260cdb5f9ae580205ab3093f93301484b17ce9 04-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Reimplement the descriptor patching mechanism for quirky devices by a function
to build a new descriptor using a HIDWriter. This way a completely new
descriptor can be built on the fly or a fixed already patched blob can be
written to the writer if desired.
* Implemented writing a new report descriptor for Sony SIXAXIS controllers. The
descriptor also includes the pressure sensitive button states (exposed as 12
axes) and the accelerometers/gyroscope (exposed as another 4 axes). While the
motion sensing data is now available (and fun to look at), the usefulness is
fairly limited, as the values are not scaled/transformed in any way. It might
be possible to generically do such transformations using unit descriptions,
but those are not implemented yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41925 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