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.
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
| Name | Type |
|---|---|
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
| Name | Type |
|---|---|
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
| Name | Value | Description |
|---|---|---|
NOT_ATTACHED |
0 |
|
ATTACHED |
1 |
|
POWERED |
2 |
|
DEFAULT |
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 |
ADDRESS |
6 |
|
CONFIGURED |
7 |
|
SUSPENDED |
8 |
TABLES
DeviceStateUpdate
Defined in fuchsia.hardware.usb.policy/controller.fidl
A table representing the current state of a USB device.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
state |
DeviceState
|
The current USB device state. |
2 |
address |
uint8
|
The USB device address. |
UNIONS
DeviceStateWatcher_WatchDeviceState_Result strict
Defined in fuchsia.hardware.usb.policy/controller.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
DeviceStateUpdate
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
SERVICES
Service
Defined in fuchsia.hardware.usb.policy/controller.fidl
| Name | Type | Transport |
|---|---|---|
| controller |
fuchsia.hardware.usb.policy/Controller
|
Channel |