Repository navigation
usb: misc: add a USB Billboard Device Class driver - #2253
Closed
RyanTheTide wants to merge 1 commit into
Closed
RyanTheTide wants to merge 1 commit into
RyanTheTide wants to merge 1 commit into
Conversation
USB-C docks, adapters and displays that offer Alternate Modes expose a USB 2.0 Billboard device (class 0x11). Its BOS carries a Billboard Capability descriptor listing every mode the device container supports (SVID, mode index, optional string) and a two-bit bmConfigured result per mode telling the host whether the mode was entered, plus optional Billboard AUM Capability descriptors with each mode's VDO. Linux has no driver for the class, so these devices sit unbound in every dock (lsusb -t shows Driver=[none]) and a dock whose DisplayPort path failed says nothing. Bind to the Billboard interface and: - expose the descriptor in sysfs under <interface>/billboard/ (num_modes, preferred_mode, vconn_power, version, additional_failure_info, additional_info_url, and altmode<N>/ with svid, mode, vdo, state, description), readable without root; - log one line per mode at bind time, at warning level for modes the device reports as attempted-but-not-entered or as an unspecified error. The descriptor layouts go into the uapi ch9.h so user space can share them. The capability is copied at probe, since a device reset replaces udev->bos. Nothing is sent to the device beyond the string descriptors the core already reads. This follows the 2024 debugfs posting by Niklas Neronin; review asked for the data outside debugfs and for the structs in uapi, which this does. It also fixes that posting's bmConfigured decode, which shifted by the mode index instead of twice the index. Tested on a Realtek RTS5411 dock billboard (0bda:5418, Billboard 1.21, one DisplayPort mode, configured). Link: https://lore.kernel.org/linux-usb/20240206125623.1208161-1-niklas.neronin@linux.intel.com/ Suggested-by: Niklas Neronin <niklas.neronin@linux.intel.com> Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Superseded by #2263 (same change, updated commit trailers). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A driver for the USB Billboard Device Class (class 0x11). Every USB-C dock, adapter or display with an Alternate Mode exposes a Billboard device, and until now it sat unbound (
lsusb -tshowsDriver=[none]). Example: the Realtek 0bda:5418 Billboard behind the RTS5411 hub in a Plugable UD-ULTC4K dock.The driver binds to the Billboard interface, reads the Billboard Capability descriptor from the BOS the core already holds, plus any Billboard AUM Capability descriptors, and then:
<intf>/billboard/{num_modes,preferred_mode,vconn_power,version,additional_failure_info,additional_info_url}and<intf>/billboard/altmode<N>/{svid,mode,vdo,state,description}(ABI doc included)The descriptor structs go into uapi
ch9.h. The driver sends nothing to the device beyond string descriptors. It does not depend on the SoC or board: it binds to any Billboard on any machine.CONFIG_USB_BILLBOARD=mis added toasahi.config.Prior work
This follows Niklas Neronin's 2024 debugfs-only posting (https://lore.kernel.org/linux-usb/20240206125623.1208161-1-niklas.neronin@linux.intel.com/), which was never merged. Review there asked for the data outside debugfs and for the structs in uapi. This version does both and fixes that posting's bmConfigured decode, which shifted by the mode index instead of twice the index.
Tests
gcc -std=c99 -pedantic -Werrorclean; static asserts on the layout (cap 44 bytes + 4 per mode, AUM cap 8 bytes, bcdVersion at offset 40).🤖 Generated with Claude Code