|
Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
|
Interfaces for Enhanced Serial Peripheral Interface (eSPI) target hardware. More...
Topics | |
| eSPI Driver Backend API | |
| eSPI Emulation Interface | |
| eSPI Emulation Interface | |
| eSPI SAF | |
| Interfaces for eSPI SAF (Serial Attached Flash) controllers. | |
Files | |
| file | espi.h |
| Main header file for eSPI (Enhanced Serial Peripheral Interface) driver API. | |
| file | espi_realtek_rts5912.h |
| Special operations for the Realtek RTS5912 ESPI driver. | |
Data Structures | |
| struct | espi_evt_data_kbc |
| Event data format for KBC events. More... | |
| struct | espi_evt_data_acpi |
| Event data format for ACPI events. More... | |
| struct | espi_evt_data_pvt |
| Event data format for Private Channel (PVT) events. More... | |
| struct | espi_event |
| eSPI event More... | |
| struct | espi_cfg |
| eSPI bus configuration parameters More... | |
| struct | espi_request_packet |
| eSPI peripheral request packet. More... | |
| struct | espi_oob_packet |
| eSPI out-of-band transaction packet format More... | |
| struct | espi_flash_packet |
| eSPI flash transactions packet format More... | |
Macros | |
| #define | ESPI_INT_ALL_MASK |
| Selects all eSPI generic interrupts. | |
| #define | ESPI_INT_BUS_ONLY_MASK |
| Selects only eSPI bus HW interrupts. | |
| #define | ESPI_INT_NONE_MASK 0U |
| Disables all eSPI HW events. | |
| #define | HOST_KBC_EVT_IBF BIT(0) |
| KBC 8042 event: Input Buffer Full. | |
| #define | HOST_KBC_EVT_OBE BIT(1) |
| KBC 8042 event: Output Buffer Empty. | |
| #define | ESPI_EVENT_DATA_ACPI_TYPE_HOST_TO_EC_DATA 0 |
| ACPI event: Input Buffer Full. | |
| #define | ESPI_EVENT_DATA_ACPI_TYPE_HOST_TO_EC_CMD 1U |
| ACPI event: Input Buffer Full. | |
| #define | ESPI_EVENT_DATA_ACPI_TYPE_HOST_RD_EC_TO_HOST 2U |
| ACPI event: Output Buffer Empty: Host read data EC put in EC-to-Host register. | |
Typedefs | |
| typedef void(* | espi_callback_handler_t) (const struct device *dev, struct espi_callback *cb, struct espi_event espi_evt) |
| Define the application callback handler function signature. | |
Functions | |
| int | espi_config (const struct device *dev, struct espi_cfg *cfg) |
| Configure operation of an eSPI device. | |
| bool | espi_get_channel_status (const struct device *dev, enum espi_channel ch) |
| Query whether a logical channel is ready. | |
| int | espi_read_request (const struct device *dev, struct espi_request_packet *req) |
| Sends memory, I/O or message read request over eSPI. | |
| int | espi_write_request (const struct device *dev, struct espi_request_packet *req) |
| Sends memory, I/O or message write request over eSPI. | |
| int | espi_read_lpc_request (const struct device *dev, enum lpc_peripheral_opcode op, uint32_t *data) |
| Reads SOC data from an LPC peripheral with information updated over eSPI. | |
| int | espi_write_lpc_request (const struct device *dev, enum lpc_peripheral_opcode op, uint32_t *data) |
| Writes data to an LPC peripheral which generates an eSPI transaction. | |
| int | espi_send_vwire (const struct device *dev, enum espi_vwire_signal signal, uint8_t level) |
| Sends system/platform signal as a virtual wire packet. | |
| int | espi_receive_vwire (const struct device *dev, enum espi_vwire_signal signal, uint8_t *level) |
| Retrieves level status for a signal encapsulated in a virtual wire. | |
| int | espi_send_oob (const struct device *dev, struct espi_oob_packet *pckt) |
| Sends SMBus transaction (out-of-band) packet over eSPI bus. | |
| int | espi_receive_oob (const struct device *dev, struct espi_oob_packet *pckt) |
| Receives SMBus transaction (out-of-band) packet from eSPI bus. | |
| int | espi_read_flash (const struct device *dev, struct espi_flash_packet *pckt) |
| Sends a read request packet for shared flash. | |
| int | espi_write_flash (const struct device *dev, struct espi_flash_packet *pckt) |
| Sends a write request packet for shared flash. | |
| int | espi_flash_erase (const struct device *dev, struct espi_flash_packet *pckt) |
| Sends an erase request packet for shared flash. | |
| static void | espi_init_callback (struct espi_callback *callback, espi_callback_handler_t handler, enum espi_bus_event evt_type) |
| Callback model. | |
| static int | espi_add_callback (const struct device *dev, struct espi_callback *callback) |
| Add an application callback. | |
| static int | espi_remove_callback (const struct device *dev, struct espi_callback *callback) |
| Remove an application callback. | |
| static int | espi_interrupt_config (const struct device *dev, uint32_t espi_flags, uint32_t espi_vendor_flags) |
| Control eSPI interrupts. | |
USB-C port over current signal aliases | |
| #define | ESPI_VWIRE_SIGNAL_OCB_0 ESPI_VWIRE_SIGNAL_TARGET_GPIO_0 |
| USB-C port 0 over current signal. | |
| #define | ESPI_VWIRE_SIGNAL_OCB_1 ESPI_VWIRE_SIGNAL_TARGET_GPIO_1 |
| USB-C port 1 over current signal. | |
| #define | ESPI_VWIRE_SIGNAL_OCB_2 ESPI_VWIRE_SIGNAL_TARGET_GPIO_2 |
| USB-C port 2 over current signal. | |
| #define | ESPI_VWIRE_SIGNAL_OCB_3 ESPI_VWIRE_SIGNAL_TARGET_GPIO_3 |
| USB-C port 3 over current signal. | |
Interfaces for Enhanced Serial Peripheral Interface (eSPI) target hardware.
| #define ESPI_EVENT_DATA_ACPI_TYPE_HOST_RD_EC_TO_HOST 2U |
#include <zephyr/drivers/espi.h>
ACPI event: Output Buffer Empty: Host read data EC put in EC-to-Host register.
| #define ESPI_EVENT_DATA_ACPI_TYPE_HOST_TO_EC_CMD 1U |
| #define ESPI_EVENT_DATA_ACPI_TYPE_HOST_TO_EC_DATA 0 |
| #define ESPI_INT_ALL_MASK |
#include <zephyr/drivers/espi.h>
Selects all eSPI generic interrupts.
Note this does not include UART tunneled over eSPI interrupts Since this is usually desired by eSPI driver clients
| #define ESPI_INT_BUS_ONLY_MASK |
| #define ESPI_INT_NONE_MASK 0U |
#include <zephyr/drivers/espi.h>
Disables all eSPI HW events.
| #define ESPI_VWIRE_SIGNAL_OCB_0 ESPI_VWIRE_SIGNAL_TARGET_GPIO_0 |
#include <zephyr/drivers/espi.h>
USB-C port 0 over current signal.
| #define ESPI_VWIRE_SIGNAL_OCB_1 ESPI_VWIRE_SIGNAL_TARGET_GPIO_1 |
#include <zephyr/drivers/espi.h>
USB-C port 1 over current signal.
| #define ESPI_VWIRE_SIGNAL_OCB_2 ESPI_VWIRE_SIGNAL_TARGET_GPIO_2 |
#include <zephyr/drivers/espi.h>
USB-C port 2 over current signal.
| #define ESPI_VWIRE_SIGNAL_OCB_3 ESPI_VWIRE_SIGNAL_TARGET_GPIO_3 |
#include <zephyr/drivers/espi.h>
USB-C port 3 over current signal.
| #define HOST_KBC_EVT_IBF BIT(0) |
#include <zephyr/drivers/espi.h>
KBC 8042 event: Input Buffer Full.
| #define HOST_KBC_EVT_OBE BIT(1) |
#include <zephyr/drivers/espi.h>
KBC 8042 event: Output Buffer Empty.
| typedef void(* espi_callback_handler_t) (const struct device *dev, struct espi_callback *cb, struct espi_event espi_evt) |
#include <zephyr/drivers/espi.h>
Define the application callback handler function signature.
The handler should return quickly. Processing that is not time critical can be deferred, for example to a work queue. Deferring adds scheduling latency, so events that need a prompt response, such as eSPI bus reset and virtual wire events, should be handled in the handler.
| dev | Device struct for the eSPI device. |
| cb | Original struct espi_callback owning this handler. |
| espi_evt | event details that trigger the callback handler. |
| enum espi_bus_event |
#include <zephyr/drivers/espi.h>
eSPI bus event.
eSPI bus event to indicate events for which user can register callbacks
| enum espi_channel |
#include <zephyr/drivers/espi.h>
eSPI channel.
Identifies each eSPI logical channel supported by eSPI target hardware. Each channel allows independent traffic, but the assignment of channel type to channel number is fixed.
Note that generic commands are not associated with any channel, so traffic over eSPI can occur if all channels are disabled or not ready
| enum espi_cycle_type |
#include <zephyr/drivers/espi.h>
eSPI cycle types supported over eSPI peripheral channel
| enum espi_interrupt_flags |
#include <zephyr/drivers/espi.h>
eSPI interrupt flags.
Generic eSPI interrupt events selected with espi_interrupt_config(). Vendor-specific interrupt events are selected with the separate vendor-specific bitmap. These are defined and documented by each eSPI driver vendor.
| Enumerator | |
|---|---|
| ESPI_BUS_EVENTS | Enables eSPI bus reset interrupts and channel negotiation changes. |
| ESPI_VIRTUAL_WIRE_CHANNEL_EVENTS | Enables eSPI VW received interrupt. |
| ESPI_OOB_CHANNEL_EVENTS | Enables eSPI OOB received interrupt. |
| ESPI_FLASH_CHANNEL_EVENTS | Enables eSPI Flash operations interrupt. |
| ESPI_PERIPHERAL_UART_EVENTS | Enables UART interrupt if HW supports it. |
| ESPI_PERIPHERAL_DEBUG_PORT80_EVENTS | Enables Port80 eSPI interrupt if HW supports it. The capture threshold that raises this interrupt could be set in devicetree, where the hardware supports it. The API does not support changing it at runtime, including through espi_interrupt_config(). |
| ESPI_PERIPHERAL_8042_KBC_EVENTS | Enables 8042 interrupt if HW supports it. |
| ESPI_PERIPHERAL_HOST_IO_EVENTS | Enables all ACPI eSPI host interface interrupt if HW supports it. |
| ESPI_PERIPHERAL_SHARED_MEMORY_EVENTS | Enables eSPI shared memory interrupt if HW supports it. |
| enum espi_io_mode |
#include <zephyr/drivers/espi.h>
eSPI I/O mode capabilities
| Enumerator | |
|---|---|
| ESPI_IO_MODE_SINGLE_LINE | Single data line mode (traditional SPI). |
| ESPI_IO_MODE_DUAL_LINES | Dual data line mode. |
| ESPI_IO_MODE_QUAD_LINES | Quad data line mode. |
| enum espi_pc_event |
#include <zephyr/drivers/espi.h>
eSPI peripheral channel events.
eSPI peripheral channel event types to signal users.
| Enumerator | |
|---|---|
| ESPI_PC_EVT_BUS_CHANNEL_READY | Bus channel ready event. |
| ESPI_PC_EVT_BUS_MASTER_ENABLE | Bus master enable event. |
#include <zephyr/drivers/espi.h>
eSPI peripheral notification type.
eSPI peripheral notification event details to indicate which peripheral trigger the eSPI callback
| Enumerator | |
|---|---|
| ESPI_PERIPHERAL_UART | UART peripheral. |
| ESPI_PERIPHERAL_8042_KBC | 8042 Keyboard peripheral |
| ESPI_PERIPHERAL_HOST_IO | Host I/O peripheral. |
| ESPI_PERIPHERAL_DEBUG_PORT80 | Debug Port 80 peripheral. |
| ESPI_PERIPHERAL_HOST_IO_PVT | Private Host I/O peripheral. |
| ESPI_PERIPHERAL_HOST_IO_PVT2 | Private Host I/O peripheral 2. |
| ESPI_PERIPHERAL_HOST_IO_PVT3 | Private Host I/O peripheral 3. |
| ESPI_PERIPHERAL_EC_HOST_CMD | Embedded Controller Host Command peripheral.
|
| enum espi_vwire_signal |
#include <zephyr/drivers/espi.h>
eSPI system platform signals that can be sent or received through virtual wire channel
#include <zephyr/drivers/espi.h>
eSPI LPC peripheral opcodes
Opcodes for LPC peripheral operations that are tunneled through eSPI. These opcodes are used to interact with legacy LPC devices.
| Enumerator | |
|---|---|
| E8042_OBF_HAS_CHAR | Check if 8042 output buffer has character. |
| E8042_IBF_HAS_CHAR | Check if 8042 input buffer has character. |
| E8042_WRITE_KB_CHAR | Write character to 8042 keyboard buffer. |
| E8042_WRITE_MB_CHAR | Write character to 8042 mouse buffer. |
| E8042_RESUME_IRQ | Resume 8042 interrupt processing. |
| E8042_PAUSE_IRQ | Pause 8042 interrupt processing. |
| E8042_CLEAR_OBF | Clear 8042 output buffer. |
| E8042_READ_KB_STS | Read 8042 keyboard status. |
| E8042_SET_FLAG | Set 8042 flag. |
| E8042_CLEAR_FLAG | Clear 8042 flag. |
| E8042_READ_KB_CHAR | Read character from 8042 keyboard buffer. |
| E8042_READ_MB_CHAR | Read character from 8042 mouse buffer. |
| EACPI_OBF_HAS_CHAR | Check if ACPI output buffer has character. |
| EACPI_IBF_HAS_CHAR | Check if ACPI input buffer has character. |
| EACPI_WRITE_CHAR | Write character to ACPI output buffer. |
| EACPI_READ_STS | Read ACPI status. |
| EACPI_WRITE_STS | Write ACPI status. |
| EACPI_READ_CHAR | Read character from ACPI input buffer. |
| EACPI_RESUME_IRQ | Resume ACPI interrupt processing. |
| EACPI_PAUSE_IRQ | Pause ACPI interrupt processing. |
| EACPI_GET_SHARED_MEMORY | Shared memory region support to return the ACPI response data.
|
| ECUSTOM_HOST_SUBS_INTERRUPT_EN | Enable host subsystem interrupt (custom).
|
| ECUSTOM_HOST_CMD_GET_PARAM_MEMORY | Get host command parameter memory (custom).
|
| ECUSTOM_HOST_CMD_GET_PARAM_MEMORY_SIZE | Get host command parameter memory size (custom).
|
| ECUSTOM_HOST_CMD_SEND_RESULT | Send host command result (custom).
|
|
inlinestatic |
#include <zephyr/drivers/espi.h>
Add an application callback.
| dev | Pointer to the device structure for the driver instance. |
| callback | A valid Application's callback structure pointer. |
Note: enables to add as many callback as needed on the same device.
#include <zephyr/drivers/espi.h>
Configure operation of an eSPI device.
This routine provides a generic interface to override eSPI hardware capabilities.
If this eSPI controller is acting as target, the values set here will be discovered as part through the GET_CONFIGURATION command issued by the eSPI controller during initialization.
If this eSPI controller is acting as controller, the values set here will be used by eSPI controller to determine minimum common capabilities with eSPI target then send via SET_CONFIGURATION command.
| dev | Pointer to the device structure for the driver instance. |
| cfg | the device runtime configuration for the eSPI controller. |
| 0 | on success. |
| -EIO | General input / output error, failed to configure device. |
| -EINVAL | Invalid capabilities, failed to configure device. |
| -ENOTSUP | Capability not supported by eSPI target. |
| int espi_flash_erase | ( | const struct device * | dev, |
| struct espi_flash_packet * | pckt ) |
#include <zephyr/drivers/espi.h>
Sends an erase request packet for shared flash.
This routine provides an interface to send a request to erase the flash components shared between the eSPI controller and eSPI targets.
| dev | Pointer to the device structure for the driver instance. |
| pckt | Address of the representation of erase flash transaction. |
| -ENOTSUP | eSPI flash logical channel transactions not supported. |
| -EBUSY | eSPI flash channel is not ready or disabled by controller. |
| -EIO | General input / output error, failed request to controller. |
| bool espi_get_channel_status | ( | const struct device * | dev, |
| enum espi_channel | ch ) |
#include <zephyr/drivers/espi.h>
Query whether a logical channel is ready.
This routine allows to check if logical channel is ready before use. Note that queries for channels not supported will always return false.
| dev | Pointer to the device structure for the driver instance. |
| ch | the eSPI channel for which status is to be retrieved. |
|
inlinestatic |
#include <zephyr/drivers/espi.h>
Callback model.
Helper to initialize an espi_callback structure properly.
| callback | A valid Application's callback structure pointer. |
| handler | A valid handler function pointer. |
| evt_type | indicates the eSPI event relevant for the handler. for VWIRE_RECEIVED event the data will indicate the new level asserted |
|
inlinestatic |
#include <zephyr/drivers/espi.h>
Control eSPI interrupts.
This routine enables and disables the interrupt events of the eSPI driver: the eSPI bus and channel events, and the events of the eSPI peripheral channel hardware blocks.
Each call sets the complete set of enabled events. In both bitmaps, a bit set to 1 enables the corresponding event and a bit set to 0 disables it; the new set replaces the previous one. To disable some events and keep the others enabled, pass the events to keep enabled.
Default interrupt policy: during initialization, the driver enables the interrupts of the eSPI hardware blocks that are enabled in devicetree. Clients can change the enabled set at runtime with this routine.
Enabling and disabling take effect when this routine returns:
This routine selects which events are delivered, not how they are reported: each callback receives a struct espi_event whose fields identify the source of the event.
After an eSPI bus reset, a client that changed the enabled set at runtime applies it again from its ESPI_BUS_RESET callback.
| dev | Pointer to the device structure for the driver instance. |
| espi_flags | Bitmap of generic eSPI interrupt events, see espi_interrupt_flags. |
| espi_vendor_flags | Bitmap of vendor-specific interrupt events, defined and documented by the eSPI driver vendor. 0 selects no vendor-specific event. |
| 0 | If successful. |
| -EIO | General input / output error, failed to configure device. |
| -EINVAL | invalid capabilities, failed to configure device. |
| -ENOTSUP | capability not supported by eSPI target. |
| int espi_read_flash | ( | const struct device * | dev, |
| struct espi_flash_packet * | pckt ) |
#include <zephyr/drivers/espi.h>
Sends a read request packet for shared flash.
This routine provides an interface to send a request to read the flash component shared between the eSPI controller and eSPI targets.
| dev | Pointer to the device structure for the driver instance. |
| pckt | Address of the representation of read flash transaction. |
| -ENOTSUP | eSPI flash logical channel transactions not supported. |
| -EBUSY | eSPI flash channel is not ready or disabled by controller. |
| -EIO | General input / output error, failed request to controller. |
| int espi_read_lpc_request | ( | const struct device * | dev, |
| enum lpc_peripheral_opcode | op, | ||
| uint32_t * | data ) |
#include <zephyr/drivers/espi.h>
Reads SOC data from an LPC peripheral with information updated over eSPI.
This routine provides a generic interface to read a block whose information was updated by an eSPI transaction. Reading may trigger a transaction. The eSPI packet is assembled by the HW block.
| dev | Pointer to the device structure for the driver instance. |
| op | Enum representing opcode for peripheral type and read request. |
| data | Parameter to be read from to the LPC peripheral. |
| 0 | on success. |
| -ENOTSUP | eSPI peripheral is off or not supported. |
| -EINVAL | For unimplemented lpc opcode, but in range. |
| int espi_read_request | ( | const struct device * | dev, |
| struct espi_request_packet * | req ) |
#include <zephyr/drivers/espi.h>
Sends memory, I/O or message read request over eSPI.
This routine provides a generic interface to send a read request packet.
| dev | Pointer to the device structure for the driver instance. |
| req | Address of structure representing a memory, I/O or message read request. |
| 0 | on success. |
| -ENOTSUP | eSPI controller doesn't support raw packets and instead low memory transactions are handled by controller hardware directly. |
| -EIO | General input / output error, failed to send over the bus. |
| int espi_receive_oob | ( | const struct device * | dev, |
| struct espi_oob_packet * | pckt ) |
#include <zephyr/drivers/espi.h>
Receives SMBus transaction (out-of-band) packet from eSPI bus.
This routine provides an interface to receive and decode an SMBus transaction from eSPI bus
| dev | Pointer to the device structure for the driver instance. |
| pckt | Address of the packet representation of SMBus transaction. |
| -EIO | General input / output error, failed request to controller. |
| int espi_receive_vwire | ( | const struct device * | dev, |
| enum espi_vwire_signal | signal, | ||
| uint8_t * | level ) |
#include <zephyr/drivers/espi.h>
Retrieves level status for a signal encapsulated in a virtual wire.
This routine provides a generic interface to request a virtual wire packet from eSPI controller and retrieve the signal level.
| dev | Pointer to the device structure for the driver instance. | |
| signal | the signal to be requested from eSPI controller. | |
| [out] | level | the level of signal requested 0b LOW, 1b HIGH. |
| -EIO | General input / output error, failed request to controller. |
|
inlinestatic |
#include <zephyr/drivers/espi.h>
Remove an application callback.
| dev | Pointer to the device structure for the driver instance. |
| callback | A valid application's callback structure pointer. |
callback. Attempts to remove other registrations on the same device may result in undefined behavior, including failure to invoke callbacks that remain registered and unintended invocation of removed callbacks.Note: enables to remove as many callbacks as added through espi_add_callback().
| int espi_send_oob | ( | const struct device * | dev, |
| struct espi_oob_packet * | pckt ) |
#include <zephyr/drivers/espi.h>
Sends SMBus transaction (out-of-band) packet over eSPI bus.
This routine provides an interface to encapsulate an SMBus transaction and send into packet over eSPI bus
| dev | Pointer to the device structure for the driver instance. |
| pckt | Address of the packet representation of SMBus transaction. |
| -EIO | General input / output error, failed request to controller. |
| int espi_send_vwire | ( | const struct device * | dev, |
| enum espi_vwire_signal | signal, | ||
| uint8_t | level ) |
#include <zephyr/drivers/espi.h>
Sends system/platform signal as a virtual wire packet.
This routine provides a generic interface to send a virtual wire packet from target to controller.
The call is synchronous: it returns once the eSPI controller has read the new level of the virtual wire. Consecutive calls, such as the two edges of a pulse, need no delay between them. If the eSPI controller does not read the virtual wire within the driver timeout, the call returns -ETIMEDOUT and the new level stays set until the eSPI controller reads it.
The driver timeout bounds the wait, so the call never waits indefinitely for the eSPI controller. It is a time in microseconds, not a number of polls, defined by each driver as a constant or a vendor Kconfig option, with a default of 10 ms or less.
The eSPI target does not signal the transmission with an interrupt, so the driver polls for it with a busy wait that does not sleep. The call can be made from ISR context, where the wait adds up to the driver timeout to the interrupt latency. When the wait runs with interrupts locked, by the caller or by the driver, other interrupts are delayed by the same amount.
| dev | Pointer to the device structure for the driver instance. |
| signal | The signal to be sent to eSPI controller. |
| level | The level of signal requested. LOW (0) or HIGH (1). |
| 0 | Virtual wire transmitted. |
| -EIO | General input / output error, failed to send over the bus. |
| -EINVAL | Invalid signal. |
| -ETIMEDOUT | eSPI controller did not read the virtual wire within the driver timeout. |
| int espi_write_flash | ( | const struct device * | dev, |
| struct espi_flash_packet * | pckt ) |
#include <zephyr/drivers/espi.h>
Sends a write request packet for shared flash.
This routine provides an interface to send a request to write to the flash components shared between the eSPI controller and eSPI targets.
| dev | Pointer to the device structure for the driver instance. |
| pckt | Address of the representation of write flash transaction. |
| -ENOTSUP | eSPI flash logical channel transactions not supported. |
| -EBUSY | eSPI flash channel is not ready or disabled by controller. |
| -EIO | General input / output error, failed request to controller. |
| int espi_write_lpc_request | ( | const struct device * | dev, |
| enum lpc_peripheral_opcode | op, | ||
| uint32_t * | data ) |
#include <zephyr/drivers/espi.h>
Writes data to an LPC peripheral which generates an eSPI transaction.
This routine provides a generic interface to write data to a block which triggers an eSPI transaction. The eSPI packet is assembled by the HW block.
| dev | Pointer to the device structure for the driver instance. |
| op | Enum representing an opcode for peripheral type and write request. |
| data | Represents the parameter passed to the LPC peripheral. |
| 0 | on success. |
| -ENOTSUP | eSPI peripheral is off or not supported. |
| -EINVAL | For unimplemented lpc opcode, but in range. |
| int espi_write_request | ( | const struct device * | dev, |
| struct espi_request_packet * | req ) |
#include <zephyr/drivers/espi.h>
Sends memory, I/O or message write request over eSPI.
This routine provides a generic interface to send a write request packet.
| dev | Pointer to the device structure for the driver instance. |
| req | Address of structure representing a memory, I/O or message write request. |
| 0 | on success. |
| -ENOTSUP | eSPI controller doesn't support raw packets and instead low memory transactions are handled by controller hardware directly. |
| -EIO | General input / output error, failed to send over the bus. |