State of a physical USB connector (receptacle), as reported by the port controller that manages it, such as a USB Type-C port controller (TCPC).
The port controller decides how the USB data side should behave from what is attached (for
example, Type-C CC state and BC1.2 charger detection), and USB drivers such as the PHY and
controller follow it. Power-related state (presence, current limits) is reported separately
through fuchsia.hardware.power.usb.
PROTOCOLS
Connector
Defined in fuchsia.hardware.usb.connector/connector.fidl
Protocol for querying static capabilities and watching dynamic state changes of a physical USB connector.
GetSpec
Returns static hardware characteristics of the USB connector that do not change during operation.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Connector_GetSpec_Result
|
Watch
Hanging get for the connector state. Returns immediately on the first call, then when the
state has changed since the last returned value. State transitions are delivered in order
and not coalesced across calls (for example, DEVICE -> NONE -> DEVICE delivers NONE on
the next call and DEVICE on the following call).
If present, setup_wake_lease keeps the system awake while the server processes the call.
If the call is answered immediately, as the first call always is, the server hands it back
as wake_lease unless it returns a wake lease of its own. If the call is parked, the server
drops it.
If present, wake_lease is a wake lease that the client should hold while it handles the
returned state. On a suspend-capable system, the server must return a wake lease on every
transition of a field in Spec.wake_on (which must include data_role, including
transitions to NONE so downstream drivers can drain transfers and power down before
suspend), or hand back setup_wake_lease on an immediate reply when no server lease is
attached.
Returns:
ZX_ERR_BAD_STATE: AWatchcall is already pending on this channel; the existing pending call remains intact.
Request
| Name | Type |
|---|---|
setup_wake_lease |
fuchsia.power.system/LeaseToken
|
Response
| Name | Type |
|---|---|
payload |
Connector_Watch_Result
|
STRUCTS
Connector_GetSpec_Response
Defined in fuchsia.hardware.usb.connector/connector.fidl
| Field | Type | Description | Default |
|---|---|---|---|
spec |
Spec
|
No default |
Connector_Watch_Response resource
Defined in fuchsia.hardware.usb.connector/connector.fidl
| Field | Type | Description | Default |
|---|---|---|---|
state |
ConnectorState
|
No default | |
wake_lease |
fuchsia.power.system/LeaseToken
|
No default |
ENUMS
DataRole flexible
Type: uint32
Defined in fuchsia.hardware.usb.connector/connector.fidl
The USB data role the controller behind a connector should operate in.
| Name | Value | Description |
|---|---|---|
NONE |
0 |
No USB data: nothing is attached, the partner provides no USB data (for example a
dedicated charger), or data is not yet allowed (for example charger detection is still
running on the port controller's own data switch; platforms whose charger detector
borrows the SoC PHY require a future |
DEVICE |
1 |
Peripheral: the data lines are connected to a USB host. |
HOST |
2 |
Host: the data lines are connected to a USB device. |
Orientation flexible
Type: uint32
Defined in fuchsia.hardware.usb.connector/connector.fidl
Orientation of the plug in a USB Type-C receptacle, indicating which CC pin the partner is attached on so a Type-C mux can route lanes according to the active mode.
| Name | Value | Description |
|---|---|---|
NORMAL |
1 |
The partner is attached on CC1. |
REVERSE |
2 |
The partner is attached on CC2 (the plug is flipped). |
TABLES
ConnectorState
Defined in fuchsia.hardware.usb.connector/connector.fidl
Dynamic state of a USB connector.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
data_role |
DataRole
|
The data role the USB controller should operate in. Always set by the server. |
2 |
orientation |
Orientation
|
The Type-C plug orientation, set whenever a partner's CC orientation is resolved
(independently of |
Spec
Defined in fuchsia.hardware.usb.connector/connector.fidl
Static hardware characteristics and driver capabilities of a physical USB connector.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
supported_data_roles |
vector<DataRole>
|
Data roles supported by this connector (for example |
2 |
wake_on |
ConnectorState
|
|
UNIONS
Connector_GetSpec_Result strict
Defined in fuchsia.hardware.usb.connector/connector.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Connector_GetSpec_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Connector_Watch_Result strict resource
Defined in fuchsia.hardware.usb.connector/connector.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Connector_Watch_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
SERVICES
Service
Defined in fuchsia.hardware.usb.connector/connector.fidl
| Name | Type | Transport |
|---|---|---|
| connector |
fuchsia.hardware.usb.connector/Connector
|
Channel |