PROTOCOLS
Device
Defined in fuchsia.hardware.spmi/spmi.fidl
Each instance of Device
represents a target/secondary SPMI device on a SPMI bus.
To support multiple SPMI devices, multiple nodes must be instantiated.
ExtendedRegisterReadLong
Issue one Extended Register Read Long SPMI command to the SPMI device.
Used to read from a 16 bit SPMI register space. Up to 8 bytes can be read at a time.
When successful, it returns size_bytes
in data
read from address
in the device.
Request
Name | Type |
---|---|
address |
uint16
|
size_bytes |
uint32
|
Response
Name | Type |
---|---|
payload |
Device_ExtendedRegisterReadLong_Result
|
ExtendedRegisterWriteLong
Issue one Extended Register Write Long SPMI command to the SPMI device.
Used to write to a 16 bit SPMI register space. Up to 8 bytes can be written at a time.
When this command is successful, data
will be written to address
in the device.
Request
Name | Type |
---|---|
address |
uint16
|
data |
vector<uint8>[8]
|
Response
Name | Type |
---|---|
payload |
Device_ExtendedRegisterWriteLong_Result
|
GetProperties
Get the properties of the SPMI device.
Request
<EMPTY>
Response
Name | Type |
---|---|
payload |
Device_GetProperties_Result
|
STRUCTS
Device_ExtendedRegisterReadLong_Response
Defined in fuchsia.hardware.spmi/spmi.fidl
Field | Type | Description | Default |
---|---|---|---|
data |
vector<uint8>[8]
|
No default |
Device_ExtendedRegisterWriteLong_Response
Defined in fuchsia.hardware.spmi/spmi.fidl
<EMPTY>
ENUMS
DriverError flexible
Type: uint32
Defined in fuchsia.hardware.spmi/spmi.fidl
Errors that this driver may return.
Name | Value | Description |
---|---|---|
INTERNAL |
1 |
The driver encountered an otherwise unspecified error while performing the operation. |
NOT_SUPPORTED |
2 |
The operation is not implemented, supported, or enabled. |
INVALID_ARGS |
3 |
An argument is invalid. |
BAD_STATE |
4 |
The operation failed because the current state of the driver does not allow it, or a precondition of the operation is not satisfied. |
IO_REFUSED |
5 |
The device returned a NACK (negative Acknowledgment). The client may retry the operation after a NACK was sent for instance due to a parity error. |
TABLES
Device_GetProperties_Response
Defined in fuchsia.hardware.spmi/spmi.fidl
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
sid |
uint8
|
Unique SPMI target/secondary identifier, corresponds to the SPMI specification sid. Up to 16 secondaries are identifed with an id from 0 to 15 inclusive. Required. |
2 |
name |
string[64]
|
User friendly string for the device name. If not set, the device name is unknown. If included, this string must be non-empty. Optional. |
UNIONS
Device_ExtendedRegisterReadLong_Result strict
Defined in fuchsia.hardware.spmi/spmi.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Device_ExtendedRegisterReadLong_Response
|
|
2 |
err |
DriverError
|
|
3 |
framework_err |
internal
|
Device_ExtendedRegisterWriteLong_Result strict
Defined in fuchsia.hardware.spmi/spmi.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Device_ExtendedRegisterWriteLong_Response
|
|
2 |
err |
DriverError
|
|
3 |
framework_err |
internal
|
Device_GetProperties_Result strict
Defined in fuchsia.hardware.spmi/spmi.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Device_GetProperties_Response
|
|
3 |
framework_err |
internal
|
CONSTANTS
Name | Value | Type | Description |
---|---|---|---|
MAX_EXTENDED_LONG_TRANSFER_SIZE |
8
|
uint32 |
The maximum number of bytes that can be read or written in a single Extended Long SPMI command. |
MAX_SPMI_NAME_LEN |
64
|
uint32 |
Maximum length of the SPMI device name. |
SERVICES
Service
Defined in fuchsia.hardware.spmi/spmi.fidl
Name | Type | Transport |
---|---|---|
device |
fuchsia.hardware.spmi/Device
|
Channel |