fuchsia.hardware.usb.policy

Communication between USB driver components and the USB policy manager In this context, the USB policy manager is the client and the USB driver components - such as the dwc3 driver - are the servers.

The first supported driver component is for the USB controller hardware, whether used as USB Host or a USB Device. Any data which does not apply to the current mode of the controller should be left undefined.

Added: HEAD

PROTOCOLS

Controller

Defined in fuchsia.hardware.usb.policy/controller.fidl

Protocol for communicating with a low-level USB hardware controller.

This interface allows the USB policy component to act as a client and monitor the hardware's state.

WatchDeviceState

Notify a client of an updated device state value via a hanging get. The first time this is called, it will return right away with the current state. Subsequent calls will hang until there is a change to report. Returns a table containing the updated device state.

Request

<EMPTY>

Response

NameType
payload DeviceStateWatcher_WatchDeviceState_Result

DeviceStateWatcher

Defined in fuchsia.hardware.usb.policy/controller.fidl

An interface to watch for updates to the USB device state.

WatchDeviceState

Notify a client of an updated device state value via a hanging get. The first time this is called, it will return right away with the current state. Subsequent calls will hang until there is a change to report. Returns a table containing the updated device state.

Request

<EMPTY>

Response

NameType
payload DeviceStateWatcher_WatchDeviceState_Result

ENUMS

DeviceState flexible

Type: uint32

Defined in fuchsia.hardware.usb.policy/controller.fidl

Device States mirrors the descriptions in Section 9.1 of the USB 2.0 spec

NameValueDescription
0
1
2
5

3 is reserved for RECONNECTING, which is an unused legacy value for wireless USB 4 is reserved for UNAUTHENTICATED, which is an unused legacy value for wireless USB

6
7
8

TABLES

DeviceStateUpdate

Defined in fuchsia.hardware.usb.policy/controller.fidl

A table representing the current state of a USB device.

OrdinalFieldTypeDescription
state DeviceState

The current USB device state.

address uint8

The USB device address.

UNIONS

DeviceStateWatcher_WatchDeviceState_Result strict

Defined in fuchsia.hardware.usb.policy/controller.fidl

OrdinalVariantTypeDescription
response DeviceStateUpdate
err zx/Status
framework_err internal

SERVICES

Service

Defined in fuchsia.hardware.usb.policy/controller.fidl

NameTypeTransport
controller fuchsia.hardware.usb.policy/Controller Channel