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>
This commit is contained in:

committed by
Simon Glass

parent
2d8ede58ca
commit
a607028331
@@ -311,6 +311,19 @@ int cros_ec_spi_command(struct cros_ec_dev *dev, uint8_t cmd, int cmd_version,
|
||||
const uint8_t *dout, int dout_len,
|
||||
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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user