History log of /openbsd-src/sys/dev/usb/uhidev.h (Results 1 – 25 of 40)
Revision Date Author Comments
# 627096b6 21-Mar-2022 thfr <thfr@openbsd.org>

Add support for XBox One gamecontroller, including report descriptor.
Based on previous XBox 360 controller code and NetBSD's implementation.

Tested by me and solene@.
Input by solene@ and stsp@.
ok

Add support for XBox One gamecontroller, including report descriptor.
Based on previous XBox 360 controller code and NetBSD's implementation.

Tested by me and solene@.
Input by solene@ and stsp@.
ok stsp@ phessler@
ok solene@ for an earlier version.

show more ...


# 3286dae3 22-Nov-2021 anton <anton@openbsd.org>

Drop the old problematic claim multiple report ids logic now that all
uhidev drivers have been fixed.


# befafe11 15-Nov-2021 anton <anton@openbsd.org>

Third attempt to solve the claim multiple report ids conflict. Using the
report id to signal that multiple ones should be claimed by the match
routines does not work. All valid report ids 1-255 canno

Third attempt to solve the claim multiple report ids conflict. Using the
report id to signal that multiple ones should be claimed by the match
routines does not work. All valid report ids 1-255 cannot of course be
used and 0 which is reserved by the USB HID specification is internally
used to represents devices lacking an explicit report id.

Therefore, use presence of the claimed array to signal that multiple
report ids can be claimed.

Tested by gnezdo@

show more ...


# faac88c0 15-Nov-2021 anton <anton@openbsd.org>

In preparation for once again trying the resolve the claim multiple
report ids conflict, extract the claim multiple report ids conditional
in order to minimize the required upcoming changes to resolv

In preparation for once again trying the resolve the claim multiple
report ids conflict, extract the claim multiple report ids conditional
in order to minimize the required upcoming changes to resolve the
conflict.

Tested by gnezdo@

show more ...


# 919cc5e9 11-Nov-2021 anton <anton@openbsd.org>

Here we go again, revert the second attempt to resolve the
UHIDEV_CLAIM_MULTIPLE_REPORTID conflict.

Breaks fido(4) as reported by gnezdo@


# ed0cd979 10-Nov-2021 anton <anton@openbsd.org>

Second attempt to resolve UHIDEV_CLAIM_MULTIPLE_REPORTID conflict, this
time without using sentinel that cannot be represented using a single
byte. Instead, use 0 as this report ID is reserved accord

Second attempt to resolve UHIDEV_CLAIM_MULTIPLE_REPORTID conflict, this
time without using sentinel that cannot be represented using a single
byte. Instead, use 0 as this report ID is reserved according to the USB
HID specification. Fixes attachment of some upd devices which exposes up
to 256 report IDs.

Thanks to Damien Couderc <openbsd at petrocore dot eu> for reporting and
testing.

show more ...


# b21bb9a8 09-Nov-2021 anton <anton@openbsd.org>

The uhidevsubmatch() routine was imported from NetBSD back in 2002 along with
the reportid locator. The same locator was removed in 2004 making the routine
redundant.

ok gnezdo@ mpi@


# 671067d0 30-Oct-2021 ratchov <ratchov@openbsd.org>

Revert previous commit as it's causing panic when devices are detached

ok sthen, anton


# 57aafeb6 29-Oct-2021 anton <anton@openbsd.org>

A USB HID report ID must be represented using a single byte ranging
between 1-255 where 0 is reserved. The pseudo report ID
UHIDEV_CLAIM_MULTIPLE_REPORTID is currently colliding with the valid
report

A USB HID report ID must be represented using a single byte ranging
between 1-255 where 0 is reserved. The pseudo report ID
UHIDEV_CLAIM_MULTIPLE_REPORTID is currently colliding with the valid
report ID 255. Therefore crank it which gets rid of the collision and
increase the related fields in order to cope with larger integers.

Thanks to Damien Couderc <openbsd at petrocore dot eu> for reporting and
testing.

show more ...


# 6cdbbe9b 12-Sep-2021 anton <anton@openbsd.org>

Revert recent uhidev report size changes. It's reported to break fido devices
for as of now unknown reasons.


# b7ded75d 10-Sep-2021 anton <anton@openbsd.org>

Minor KNF nit, align struct field.


# adb06565 10-Sep-2021 anton <anton@openbsd.org>

Instead of letting uhidev drivers get the report sizes, do it once in
uhidev and pass the same sizes as part of the attach arguments. Makes
the uhidev drivers a bit less repetitive.

It might look te

Instead of letting uhidev drivers get the report sizes, do it once in
uhidev and pass the same sizes as part of the attach arguments. Makes
the uhidev drivers a bit less repetitive.

It might look tempting to let uhidev assign the sizes after a driver has
attached, removing the need to repeat this logic in each driver. This
does however not work since the input size must be known while calling
uhidev_open() in order to open the interrupt pipe; and uhidev_open() is
called from several attach routines.

Note that this change only works and applies to when attaching to a
single report ID.

ok jcs@

show more ...


# 59a500d9 18-Mar-2021 anton <anton@openbsd.org>

In revision 1.91 of uhidev.c, jcs@ made sure to only detach devices
claiming multiple report ids once. This allows uhidpp to piggy back on
the same functionality making uhidev_unset_report_dev() redu

In revision 1.91 of uhidev.c, jcs@ made sure to only detach devices
claiming multiple report ids once. This allows uhidpp to piggy back on
the same functionality making uhidev_unset_report_dev() redundant.

show more ...


# f31b43ce 08-Mar-2021 jcs <jcs@openbsd.org>

Allow uhidev child devices to claim selective report ids

There may be multiple matching devices on a single uhidev device but
the first device that responds to UHIDEV_CLAIM_ALLREPORTID will
block th

Allow uhidev child devices to claim selective report ids

There may be multiple matching devices on a single uhidev device but
the first device that responds to UHIDEV_CLAIM_ALLREPORTID will
block the others from attaching.

Change this to UHIDEV_CLAIM_MULTIPLE_REPORTID and require any
devices wanting some/all report ids to fill in the claimed array in
uhidev_attach_arg with just the reports it needs. uhidev can then
run match routines for other drivers with the available report ids.

ok anton

show more ...


# 6a552525 11-Feb-2021 anton <anton@openbsd.org>

Add uhidev_unset_report_dev(), doing the opposite of
uhidev_set_report_dev(). Needed by some upcoming changes to uhidpp.

ok mglocker@


# e013a115 04-Feb-2021 anton <anton@openbsd.org>

Add uhidev_set_report_dev() allowing usb drivers to early on install a
handler for a specific report id. Needed by an upcoming driver in order
to communicate with the device already in the attach rou

Add uhidev_set_report_dev() allowing usb drivers to early on install a
handler for a specific report id. Needed by an upcoming driver in order
to communicate with the device already in the attach routine.

ok mglocker@ as part of a larger diff

show more ...


# 253b28d0 25-Aug-2018 jcs <jcs@openbsd.org>

Move HID->bus constant conversion for HID report types out of ihidev
into hidmt.

The HID code uses hid_feature, hid_input, and hid_output constants
to refer to report types internally that then need

Move HID->bus constant conversion for HID report types out of ihidev
into hidmt.

The HID code uses hid_feature, hid_input, and hid_output constants
to refer to report types internally that then need to be converted
to their bus-level counterparts before actually getting sent out (so
hid_feature becomes UHID_FEATURE_REPORT for USB,
I2C_HID_REPORT_TYPE_FEATURE for i2c).

This conversion was hard-coded in ihidev but ihidev_[gs]et_report
should assume the type passed is already an i2c-level define, not a
hid one. This is how uhidev does it.

Add a conversion routine callback that any hidmt callers need to set
so that hidmt can convert hid constants to the bus-level versions.

Also add a similar conversion function to uhidev.

ok deraadt

show more ...


# 81ae23d9 09-Jan-2016 jcs <jcs@openbsd.org>

move UHID_* definitions back to usbhid.h where they were before the
HID separation


# 8a83145e 08-Jan-2016 jcs <jcs@openbsd.org>

Move HID support files out of dev/usb into new dev/hid directory

These files aren't USB-specific and were used by the previous
Bluetooth implementation, and will be used by the upcoming
HID-over-i2C

Move HID support files out of dev/usb into new dev/hid directory

These files aren't USB-specific and were used by the previous
Bluetooth implementation, and will be used by the upcoming
HID-over-i2C implementation

ok deraadt
previous version ok kettenis and mpi

show more ...


# 3541a1e3 09-Jan-2015 mpi <mpi@openbsd.org>

Add an asynchronous version of uhidev_get_report(), from David Higgs
with some tweaks.

Nothing use it for the moment, but upcoming upd(4) improvements need
it.


# e6a02383 11-Dec-2014 mpi <mpi@openbsd.org>

Change uhidev(4) set/get report functions in various way.

Always pass the parent uhidev(4) descriptor corresponding to the single
USB device with multiple reportIDs instead of a child.

Make uhidev_

Change uhidev(4) set/get report functions in various way.

Always pass the parent uhidev(4) descriptor corresponding to the single
USB device with multiple reportIDs instead of a child.

Make uhidev_get_report() aware of non NUL reportID by prepending a byte
to the given buffer, just like uhidev_set_report{,async}() already do.

Return the number of bytes written or read upon success and -1 otherwise.
This allow callers to deal with short reads without having do mess with
xfer error codes madness.

Reviewed and tested by David Higgs.

show more ...


# 1756c2e3 24-Apr-2014 mpi <mpi@openbsd.org>

Change the usbd_*_report() family of functions to take a usbd_device
and a infaceno argument instead of an iface pointer. While here,
remove some unused functions and inlined usbd_read_report_desc s

Change the usbd_*_report() family of functions to take a usbd_device
and a infaceno argument instead of an iface pointer. While here,
remove some unused functions and inlined usbd_read_report_desc since
it is used only once.

This is part of plumbing required to convert the various USB HID devices
to handle multiples report IDs.

ok andre@

show more ...


# 2b5428ee 15-Apr-2014 mpi <mpi@openbsd.org>

Modify the uhidev_*_report() methods to always take a report ID argument
instead of using the default, per-driver, one. This is a step to move
away from the 1 report ID <-> 1 driver design which is

Modify the uhidev_*_report() methods to always take a report ID argument
instead of using the default, per-driver, one. This is a step to move
away from the 1 report ID <-> 1 driver design which is no longer true
since the addition of upd(4).

ok andre@

show more ...


# f964a65c 19-Mar-2014 mpi <mpi@openbsd.org>

Add a temporary hack to let a subdriver claim all the reportIDs of
a device. This should be removed once all the drivers attaching to
uhidev(4) are converted.

ok andre@, sthen@


# e570b297 15-Mar-2014 mpi <mpi@openbsd.org>

Remove debug leftover.


12