diff options
author | Randall Spangler <rspangler@chromium.org> | 2014-02-27 13:26:10 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-03-17 20:05:47 -0600 |
commit | a60702833150b8f9263a5f1fb9a6b64774cd44f3 (patch) | |
tree | 32581d04ab69321f2044c3cefc0f7560b384a65e /include | |
parent | 2d8ede58ca5873f485c7691b1ca1c1bc6aae7212 (diff) | |
download | u-boot-imx-a60702833150b8f9263a5f1fb9a6b64774cd44f3.zip u-boot-imx-a60702833150b8f9263a5f1fb9a6b64774cd44f3.tar.gz u-boot-imx-a60702833150b8f9263a5f1fb9a6b64774cd44f3.tar.bz2 |
cros_ec: spi: Add support for EC protocol version 3
Protocol version 3 will be attempted first; if the EC doesn't support
it, u-boot will fall back to the old protocol version (2).
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/cros_ec.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/cros_ec.h b/include/cros_ec.h index 1199d92..84f9104 100644 --- a/include/cros_ec.h +++ b/include/cros_ec.h @@ -312,6 +312,19 @@ int cros_ec_spi_command(struct cros_ec_dev *dev, uint8_t cmd, int cmd_version, uint8_t **dinp, int din_len); /** + * Send a packet to a CROS-EC device and return the response packet. + * + * Expects the request packet to be stored in dev->dout. Stores the response + * packet in dev->din. + * + * @param dev CROS-EC device + * @param out_bytes Size of request packet to output + * @param in_bytes Maximum size of response packet to receive + * @return number of bytes in response packet, or <0 on error + */ +int cros_ec_spi_packet(struct cros_ec_dev *dev, int out_bytes, int in_bytes); + +/** * Dump a block of data for a command. * * @param name Name for data (e.g. 'in', 'out') |