fuchsia.hardware.spmi

Added: HEAD

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

NameType
address uint16
size_bytes uint32

Response

NameType
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

NameType
address uint16
data vector<uint8>[8]

Response

NameType
payload Device_ExtendedRegisterWriteLong_Result

GetProperties

Get the properties of the SPMI device.

Request

<EMPTY>

Response

NameType
payload Device_GetProperties_Result

STRUCTS

Device_ExtendedRegisterReadLong_Response

Defined in fuchsia.hardware.spmi/spmi.fidl

FieldTypeDescriptionDefault
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.

NameValueDescription
1

The driver encountered an otherwise unspecified error while performing the operation.

2

The operation is not implemented, supported, or enabled.

3

An argument is invalid.

4

The operation failed because the current state of the driver does not allow it, or a precondition of the operation is not satisfied.

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

OrdinalFieldTypeDescription
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.

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

OrdinalVariantTypeDescription
response Device_ExtendedRegisterReadLong_Response
err DriverError
framework_err internal

Device_ExtendedRegisterWriteLong_Result strict

Defined in fuchsia.hardware.spmi/spmi.fidl

OrdinalVariantTypeDescription
response Device_ExtendedRegisterWriteLong_Response
err DriverError
framework_err internal

Device_GetProperties_Result strict

Defined in fuchsia.hardware.spmi/spmi.fidl

OrdinalVariantTypeDescription
response Device_GetProperties_Response
framework_err internal

CONSTANTS

NameValueTypeDescription
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

NameTypeTransport
device fuchsia.hardware.spmi/Device Channel