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)
Oct 13 2024, 9:58 AM
Unknown Object (File)
Oct 10 2024, 9:06 AM
Unknown Object (File)
Oct 8 2024, 10:20 PM
Unknown Object (File)
Oct 8 2024, 3:17 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 59820
Build 56705: arc lint + arc unit