Page MenuHomeFreeBSD

libusb: implement `libusb_get_parent`
Needs ReviewPublic

Authored by obiwac_gmail.com on Oct 7 2024, 5:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 11, 4:49 AM
Unknown Object (File)
Mon, Dec 9, 5:51 AM
Unknown Object (File)
Tue, Dec 3, 2:46 PM
Unknown Object (File)
Tue, Dec 3, 2:23 PM
Unknown Object (File)
Thu, Nov 28, 1:58 PM
Unknown Object (File)
Nov 21 2024, 12:26 PM
Unknown Object (File)
Nov 18 2024, 7:52 AM
Unknown Object (File)
Nov 18 2024, 7:29 AM
Subscribers

Details

Reviewers
danfe
kevans
Summary

Newer versions of drivers such as libwacom (graphics tablets) or libfprint (fingerprint scanners) call g_usb_device_get_parent. This in turn calls libusb_get_parent on platforms which implement it, and returns NULL on platforms that don't. This patch implements this function on FreeBSD.

Test Plan

Tried different combinations of different devices connected to different hubs and it all seems to work. Tried on the AMD Framework 13. Used an ad-hoc program to test this but I'd eventually like to add a tree view kind of thing to usbconfig like in lsusb.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 60396
Build 57280: arc lint + arc unit