Skip to content

usb: add capability-driven runtime validation - #573

Draft
Srikanth Muppandam (smuppand) wants to merge 2 commits into
qualcomm-linux:mainfrom
smuppand:feature/usb-dt-capability-validation
Draft

usb: add capability-driven runtime validation#573
Srikanth Muppandam (smuppand) wants to merge 2 commits into
qualcomm-linux:mainfrom
smuppand:feature/usb-dt-capability-validation

Conversation

@smuppand

Copy link
Copy Markdown
Contributor

Summary

Enhance USB host, HID, and mass-storage suites with capability-driven runtime validation. Document and expose the PMIC GLINK/UCSI, thermal, regulator, and power-domain checks supplied by the shared foundation.

Depends on the platform runtime foundation PR and should remain Draft until that PR merges.

Changes

USB host

  • Inventory runtime USB root hubs, devices, interfaces, speeds, drivers, and power state.
  • Distinguish inactive host mode from malformed or inconsistent runtime state.
  • Retain structured USB inventory artifacts.

USB HID

  • Discover connected HID-class interfaces dynamically.
  • Validate actual interface driver binding.
  • Report the affected USB interface and observed binding state on failure.
  • Cleanly skip when no HID fixture is connected.

USB mass storage

  • Discover USB mass-storage interfaces and associated block devices.
  • Validate interface binding and block-device exposure.
  • Add an optional, bounded, non-destructive 512-byte read check.
  • Avoid mounting, formatting, or modifying the storage device.
  • Cleanly skip when no mass-storage fixture is connected.

DeviceTree capability validation

  • Document PMIC GLINK and UCSI runtime validation.
  • Document Type-C role and runtime-object evidence.
  • Document thermal-zone, cooling-device, regulator, and power-domain evidence.
  • Preserve optional-capability handling while failing declared but malformed runtime state.

Portability and orchestration

  • Use only image-provided components.
  • Disable package recovery for image-validation suites.
  • Preserve Yocto, Debian, Ubuntu, and CentOS compatibility.
  • Use shared result orchestration and bounded stdout diagnostics.

Result classification

  • Optional USB fixture absent: SKIP
  • USB host mode inactive: SKIP
  • Discovered interface or storage device healthy: PASS
  • Discovered interface unbound, malformed, or missing required runtime objects: FAIL
  • Optional PMIC GLINK/UCSI or thermal capability absent: corresponding check is not applicable
  • Declared capability present but malformed or unbound: FAIL

Add shared runtime inventory and validation primitives for I2C, PCIe, USB, device-tree health, firmware discovery, and QRTR topology. Keep capability detection dynamic across platforms and expose bounded diagnostics for consumer suites.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Add shared-inventory consumers for USB host, HID, and mass-storage runtime checks, including bounded optional read verification. Extend device-tree capability coverage for PMIC GLINK UCSI, thermal, regulator, and power-domain evidence while preserving clean skips for absent optional hardware.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant